EXPERIMENTAL: tweaks and attempts to set module directives (with/without using gradle module plugin)

This commit is contained in:
josecoll 2019-05-14 19:12:55 +01:00
parent 4603305a35
commit 877cbb1815

View File

@ -208,9 +208,28 @@ configurations {
testArtifacts.extendsFrom testRuntimeClasspath
}
tasks.withType(JavaCompile) {
// Relaxes JPMS visibility constraints across module boundaries
options.compilerArgs << '--add-exports' << 'java.base/sun.security.util=ALL-UNNAMED' << '--add-exports' << 'java.base/sun.security.x509=ALL-UNNAMED'
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
verbose = true
allWarningsAsErrors = false
// Kotlin Compiler does not yet support passing Modularity directives (eg. add-exports, add-reads, patch-module).
// https://youtrack.jetbrains.com/issue/KT-20740
// freeCompilerArgs = ['--add-export','java.base/sun.security.util=ALL-UNNAMED']
}
}
tasks.withType(Test) {
// fork a new test process for every test class
forkEvery = 10
ignoreFailures = true
failFast = false
jvmArgs '--add-exports=java.base/sun.security.util=ALL-UNNAMED'
}
task testJar(type: Jar) {