Skip to content

Commit

Permalink
avoid circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
taowen committed Dec 13, 2017
1 parent 0b7e7c4 commit 81b5eed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions android-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,18 @@ allprojects {

afterEvaluate {
android.applicationVariants.all { variant ->
variant.javaCompiler.dependsOn(generateSources)
variant.javaCompiler.finalizedBy(jsoniterStaticCodgen)
}
}

task generateSources(type:JavaExec) {
task jsoniterStaticCodgen(type:JavaExec) {
classpath configurations.getByName(android.sourceSets.main.compileConfigurationName)
classpath project.buildDir.toString() + '/intermediates/classes/release'
classpath project.buildDir.toString() + '/intermediates/classes/debug'
main = 'com.jsoniter.static_codegen.StaticCodegen'
args 'com.example.myapplication.DemoCodegenConfig'
workingDir = android.sourceSets.main.java.srcDirs[0].toString()
standardOutput = System.out
errorOutput = System.err
}
}

0 comments on commit 81b5eed

Please sign in to comment.