Skip to content

Commit

Permalink
回滚添加的依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
qq549631030 committed Sep 11, 2022
1 parent b932d37 commit 5bb80a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ class AndroidJunkCodePlugin implements Plugin<Project> {
for (int i = variant.sourceSets.size() - 1; i >= 0; i--) {
def sourceSet = variant.sourceSets[i]
if (!sourceSet.manifestFile.exists()) {
sourceSet.manifest.srcFile(project.files(manifestFile).builtBy(generateJunkCodeTask).singleFile)
project.tasks.all {
if (name == "process${variantName.capitalize()}MainManifest") {
dependsOn(generateJunkCodeTask)
}
}
sourceSet.manifest.srcFile(manifestFile)
break
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ class AndroidJunkCodeTask extends DefaultTask {
void generateClasses() {
def javaDir = new File(outDir, "java")
for (int i = 0; i < config.packageCount; i++) {
String packageName = config.packageBase + "." + generateName(i)
String packageName
if (config.packageBase.isEmpty()) {
packageName = generateName(i)
} else {
packageName = config.packageBase + "." + generateName(i)
}
//生成Activity
for (int j = 0; j < config.activityCountPerPackage; j++) {
def activityPreName = generateName(j)
Expand Down

0 comments on commit 5bb80a7

Please sign in to comment.