web3j/web3j-corda

Bind generate wrappers task to Gradle build

xaviarias opened this issue · 1 comments

The Gradle task generateCorDappWrappers should be run automatically when running the build task.

Users should not be required to be aware of the task unless they want to call it explicitly.

This is related to a similar issue in web3j-gradle-plugin. The proposed solution would be to add a Gradle snippet to make compileKotlin depend on generateCorDappWrappers:

compileKotlin {
    kotlinOptions.jvmTarget = '1.8'
    dependsOn 'generateCorDappWrappers'
}

If you have Java code on your project, also add:

sourceSets {
    main.kotlin.srcDirs += "$rootProject/src/main/java"
    test.kotlin.srcDirs += "$rootProject/src/test/java"
}

Note that for this to work, parallel execution must be disabled by adding org.gradle.parallel=false to your Gradle properties. Unfortunately, at the moment is not possible to disable parallel execution on specific tasks.