Skip to content

Commit 81b5eed

Browse files
committed
avoid circular dependency
1 parent 0b7e7c4 commit 81b5eed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

android-demo/build.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,18 @@ allprojects {
5454

5555
afterEvaluate {
5656
android.applicationVariants.all { variant ->
57-
variant.javaCompiler.dependsOn(generateSources)
57+
variant.javaCompiler.finalizedBy(jsoniterStaticCodgen)
5858
}
5959
}
6060

61-
task generateSources(type:JavaExec) {
61+
task jsoniterStaticCodgen(type:JavaExec) {
6262
classpath configurations.getByName(android.sourceSets.main.compileConfigurationName)
63+
classpath project.buildDir.toString() + '/intermediates/classes/release'
6364
classpath project.buildDir.toString() + '/intermediates/classes/debug'
6465
main = 'com.jsoniter.static_codegen.StaticCodegen'
6566
args 'com.example.myapplication.DemoCodegenConfig'
6667
workingDir = android.sourceSets.main.java.srcDirs[0].toString()
6768
standardOutput = System.out
6869
errorOutput = System.err
69-
}
70+
}
71+

0 commit comments

Comments
 (0)