Skip to content

Commit

Permalink
解决编译警告
Browse files Browse the repository at this point in the history
  • Loading branch information
huangx committed Sep 9, 2022
1 parent 0fd8ce9 commit b932d37
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,19 @@ 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(manifestFile.absolutePath)
sourceSet.manifest.srcFile(project.files(manifestFile).builtBy(generateJunkCodeTask).singleFile)
project.tasks.all {
if (name == "process${variantName.capitalize()}MainManifest") {
dependsOn(generateJunkCodeTask)
}
}
break
}
}
if (variant.respondsTo("registerGeneratedResFolders")) {
generateJunkCodeTask.ext.generatedResFolders = project
variant.registerGeneratedResFolders(project
.files(resDir)
.builtBy(generateJunkCodeTask)
variant.registerGeneratedResFolders(generateJunkCodeTask.generatedResFolders)
.builtBy(generateJunkCodeTask))
if (variant.hasProperty("mergeResourcesProvider")) {
variant.mergeResourcesProvider.configure { dependsOn(generateJunkCodeTask) }
} else {
Expand Down

0 comments on commit b932d37

Please sign in to comment.