Skip to content

Commit

Permalink
调整keep文件名称
Browse files Browse the repository at this point in the history
  • Loading branch information
qq549631030 committed May 24, 2023
1 parent 68203b5 commit d8d07b6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.0.1"
if (PLUGIN_ENABLE.toBoolean()) {
classpath "com.github.qq549631030:android-junk-code:1.2.2"
classpath "com.github.qq549631030:android-junk-code:1.2.3"
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion library/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#project
GROUP=com.github.qq549631030
VERSION_NAME=1.2.2
VERSION_NAME=1.2.3

POM_ARTIFACT_ID=android-junk-code
POM_NAME=AndroidJunkCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ class AndroidJunkCodePlugin implements Plugin<Project> {
def sourceSet = variant.sourceSets[i]
if (!sourceSet.manifestFile.exists()) {
sourceSet.manifest.srcFile(manifestFile)
def processManifestTask = project.tasks.findByName("process${variantName.capitalize()}MainManifest")//AGP 4.1.0+
if (processManifestTask == null) {
processManifestTask = project.tasks.findByName("process${variantName.capitalize()}Manifest")
}
if (processManifestTask) {
processManifestTask.dependsOn(generateJunkCodeTask)
def processManifestTaskProvider = project.tasks.named("process${variantName.capitalize()}Manifest")
if (processManifestTaskProvider) {
processManifestTaskProvider.configure {
it.dependsOn(generateJunkCodeTask)
}
}
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class AndroidJunkCodeTask extends DefaultTask {
}

void generateKeep() {
def keepFile = new File(outDir, "res/raw/keep.xml")
def keepFile = new File(outDir, "res/raw/android_junk_code_keep.xml")
StringBuilder sb = new StringBuilder()
sb.append("<resources xmlns:tools=\"http://schemas.android.com/tools\"\n" +
" tools:keep=\"@layout/${config.resPrefix}*, @drawable/${config.resPrefix}*\" />\n")
Expand Down

0 comments on commit d8d07b6

Please sign in to comment.