Skip to content

Commit 8333ec8

Browse files
committed
解决生成的java文件未打入包内bug
1 parent d865528 commit 8333ec8

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.0.1"
1313
if (PLUGIN_ENABLE.toBoolean()) {
14-
classpath "com.github.qq549631030:android-junk-code:1.1.9"
14+
classpath "com.github.qq549631030:android-junk-code:1.2.0"
1515
}
1616
// NOTE: Do not place your application dependencies here; they belong
1717
// in the individual module build.gradle files

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.9
3+
VERSION_NAME=1.2.0
44

55
POM_ARTIFACT_ID=android-junk-code
66
POM_NAME=AndroidJunkCode

library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ class AndroidJunkCodeTask extends DefaultTask {
236236
}
237237

238238
private void writeJavaFile(JavaFile javaFile) {
239-
def outputDirectory = outDir.toPath()
240-
outputDirectory.resolve("java")
239+
def outputDirectory = new File(outDir, "java").toPath()
241240
if (!javaFile.packageName.isEmpty()) {
242241
for (String packageComponent : javaFile.packageName.split("\\.")) {
243242
outputDirectory = outputDirectory.resolve(packageComponent);

0 commit comments

Comments
 (0)