Skip to content

Commit bbd4c10

Browse files
author
huangx
committed
修复不兼容老版本Gradle问题
1 parent 3433105 commit bbd4c10

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Android垃圾代码生成插件
22

3-
此插件用于做马甲包时,减小马甲包与主包的代码相似度,避免被OPPO、VIVO等应用市场识别为马甲包
3+
此插件用于做马甲包时,减小马甲包与主包的代码相似度,避免被某些应用市场识别为马甲包
44

55
### 使用方法
66

@@ -11,12 +11,10 @@ buildscript {
1111
mavenCentral()
1212
}
1313
dependencies {
14-
classpath "com.github.qq549631030:android-junk-code:1.1.0"
14+
classpath "com.github.qq549631030:android-junk-code:1.1.1"
1515
}
1616
}
1717
```
18-
**由于jcenter即将关闭后续版本将不再发布到jcenter,转为发布到mavenCentral,groupId从原来的"cn.hx.plugin"改为"com.github.qq549631030"**
19-
2018

2119

2220
app目录的build.gradle模块中:

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:4.2.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12-
classpath "com.github.qq549631030:android-junk-code:1.1.0"
12+
classpath "com.github.qq549631030:android-junk-code:1.1.1"
1313
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
1414
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.0.1"
1515

library/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#project
22
GROUP=com.github.qq549631030
3-
VERSION_NAME=1.1.0
3+
VERSION_NAME=1.1.1
44

55
POM_ARTIFACT_ID=android-junk-code
66
POM_NAME=AndroidJunkCode
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
package cn.hx.plugin.junkcode.ext
22

3+
import org.gradle.api.Action
34
import org.gradle.api.NamedDomainObjectContainer
45

56
class AndroidJunkCodeExt {
67
Map<String, Closure<JunkCodeConfig>> configMap = [:]
78

89
NamedDomainObjectContainer<JunkCodeConfig> variantConfig
10+
11+
void variantConfig(Action<? super NamedDomainObjectContainer<JunkCodeConfig>> action) {
12+
action.execute(variantConfig)
13+
}
914
}

0 commit comments

Comments
 (0)