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

This commit is contained in:
josecoll 2019-05-14 19:15:14 +01:00
parent 2d9ee1d582
commit a0a4318cc0

View File

@ -54,21 +54,49 @@ dependencies {
// addExports = [
// 'java.base/sun.security.util' : 'ALL-UNNAMED'
// ]
// // WARNING: An illegal reflective access operation has occurred
// addOpens = [
// 'java.base/java.time.ZonedDateTime' : 'ALL-UNNAMED'
// // WARNING: Illegal reflective access by net.corda.serialization.internal.amqp.custom.ZonedDateTimeSerializer (file:/Users/josecoll/IdeaProjects/corda-jdk11/serialization/build/libs/corda-serialization-5.0-SNAPSHOT.jar) to method java.time.ZonedDateTime.ofLenient(java.time.LocalDateTime,java.time.ZoneOffset,java.time.ZoneId)
// ]
// }
// }
// test {
// moduleOptions {
// addExports = [
// 'java.base/sun.security.util': 'ALL-UNNAMED',
// 'java.base/sun.security.x509': 'ALL-UNNAMED'
// ]
// addOpens = [
// 'java.base/java.time.ZonedDateTime' : 'ALL-UNNAMED'
// ]
// }
// }
// kotlinCompile {
// moduleOptions {
// addExports = [
// 'java.base/sun.security.util': 'ALL-UNNAMED'
// ]
// addOpens = [
// 'java.base/java.time.ZonedDateTime' : 'ALL-UNNAMED'
// ]
// }
// }
//}
// Alternative configuration without java modularity plugin:
//test {
// jvmArgs('--add-opens', 'java.base/java.time.ZonedDateTime=ALL-UNNAMED')
//}
configurations {
testArtifacts.extendsFrom testRuntimeClasspath
}
tasks.withType(JavaCompile) {
options.compilerArgs += ['--illegal-access=warn']
}
task testJar(type: Jar) {
classifier "tests"
from sourceSets.test.output