diff --git a/README.md b/README.md index fa9f9933..c95951c6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ``` buildscript { dependencies { - classpath "cn.hx.plugin:android-junk-code:1.0.3" + classpath "cn.hx.plugin:android-junk-code:1.0.4" } } ``` diff --git a/build.gradle b/build.gradle index 1224f422..194e9f59 100644 --- a/build.gradle +++ b/build.gradle @@ -9,10 +9,10 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:4.1.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.novoda:bintray-release:0.9.2' - classpath "cn.hx.plugin:android-junk-code:1.0.3" + classpath "cn.hx.plugin:android-junk-code:1.0.4" classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.0.0" // NOTE: Do not place your application dependencies here; they belong diff --git a/library/project.properties b/library/project.properties index 89a141af..491ca823 100644 --- a/library/project.properties +++ b/library/project.properties @@ -2,7 +2,7 @@ project.name=AndroidJunkCode project.groupId=cn.hx.plugin project.artifactId=android-junk-code -project.artifactVersion=1.0.3 +project.artifactVersion=1.0.4 project.siteUrl=https://github.com/qq549631030/AndroidJunkCode project.gitUrl=https://github.com/qq549631030/AndroidJunkCode.git project.desc=generate junk code for android \ No newline at end of file diff --git a/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy b/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy index f89da237..a394d40b 100644 --- a/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy +++ b/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy @@ -58,6 +58,7 @@ class AndroidJunkCodeTask extends DefaultTask { for (int j = 0; j < config.otherCountPerPackage; j++) { def className = generateName(j).capitalize() def typeBuilder = TypeSpec.classBuilder(className) + typeBuilder.addModifiers(Modifier.PUBLIC) for (int k = 0; k < config.methodCountPerClass; k++) { def methodName = generateName(k) def methodBuilder = MethodSpec.methodBuilder(methodName) @@ -130,6 +131,7 @@ class AndroidJunkCodeTask extends DefaultTask { generateLayout(layoutName) def typeBuilder = TypeSpec.classBuilder(className) typeBuilder.superclass(ClassName.get("android.app", "Activity")) + typeBuilder.addModifiers(Modifier.PUBLIC) //onCreate方法 def bundleClassName = ClassName.get("android.os", "Bundle") typeBuilder.addMethod(MethodSpec.methodBuilder("onCreate")