corda/serialization/build.gradle

112 lines
3.4 KiB
Groovy

apply plugin: 'kotlin'
apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'com.jfrog.artifactory'
//apply plugin: "org.javamodularity.moduleplugin"
description 'Corda serialization'
repositories {
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
compile project(":core")
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.apache.activemq:artemis-commons:${artemis_version}"
compile "org.ow2.asm:asm:$asm_version"
compile "com.google.guava:guava:$guava_version"
// For AMQP serialisation.
compile "org.apache.qpid:proton-j:$protonj_version"
// ClassGraph: classpath scanning
compile "io.github.classgraph:classgraph:$class_graph_version"
// Pure-Java Snappy compression
compile "org.iq80.snappy:snappy:$snappy_version"
// For caches rather than guava
compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}"
testImplementation "junit:junit:$junit_version"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}"
testCompile "org.assertj:assertj-core:$assertj_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testCompile project(':node-driver')
}
// allprojects not allowed ???
//subprojects {
// // inlined usage of compileJava with moduleOptions not allowed ???
// compileJava {
// moduleOptions {
// 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
}
task testJar(type: Jar) {
classifier "tests"
from sourceSets.test.output
}
artifacts {
testArtifacts testJar
}
jar {
baseName 'corda-serialization'
}
publish {
name jar.baseName
}