Skip to content

Commit

Permalink
修复不兼容老版本Gradle问题
Browse files Browse the repository at this point in the history
huangx committed Oct 14, 2021
1 parent 3433105 commit bbd4c10
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Android垃圾代码生成插件

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

### 使用方法

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



app目录的build.gradle模块中:
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.github.qq549631030:android-junk-code:1.1.0"
classpath "com.github.qq549631030:android-junk-code:1.1.1"
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.0.1"

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.1.0
VERSION_NAME=1.1.1

POM_ARTIFACT_ID=android-junk-code
POM_NAME=AndroidJunkCode
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package cn.hx.plugin.junkcode.ext

import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectContainer

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

NamedDomainObjectContainer<JunkCodeConfig> variantConfig

void variantConfig(Action<? super NamedDomainObjectContainer<JunkCodeConfig>> action) {
action.execute(variantConfig)
}
}

0 comments on commit bbd4c10

Please sign in to comment.