2020-04-06 10:00:40 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
2019-11-14 16:22:28 +00:00
|
|
|
import static org.gradle.api.JavaVersion.VERSION_1_8
|
|
|
|
|
2019-11-05 13:44:18 +00:00
|
|
|
plugins {
|
|
|
|
id 'org.jetbrains.kotlin.jvm'
|
|
|
|
id 'net.corda.plugins.publish-utils'
|
|
|
|
id 'com.jfrog.artifactory'
|
|
|
|
id 'java-library'
|
|
|
|
id 'idea'
|
|
|
|
}
|
|
|
|
|
2020-04-06 10:00:40 +00:00
|
|
|
// The DJVM only supports Java 8 byte-code, so the tests must
|
|
|
|
// be compiled for Java 8. The main artifact is only compiled
|
|
|
|
// for Java 8 because it belongs to "Open Core".
|
|
|
|
apply from: "${rootProject.projectDir}/java8.gradle"
|
|
|
|
|
2019-11-05 13:44:18 +00:00
|
|
|
description 'Serialization support for the DJVM'
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
sandboxTesting
|
2020-02-18 09:09:18 +00:00
|
|
|
jdkRt
|
2019-11-05 13:44:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
api project(':core')
|
|
|
|
api project(':serialization')
|
|
|
|
api "net.corda.djvm:corda-djvm:$djvm_version"
|
2019-11-06 16:49:27 +00:00
|
|
|
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
|
|
|
implementation 'org.jetbrains.kotlin:kotlin-reflect'
|
2019-11-05 13:44:18 +00:00
|
|
|
implementation(project(':serialization-djvm:deserializers')) {
|
|
|
|
transitive = false
|
|
|
|
}
|
|
|
|
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_jupiter_version"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version"
|
|
|
|
|
|
|
|
// Test utilities
|
|
|
|
testImplementation "org.assertj:assertj-core:$assertj_version"
|
|
|
|
testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
|
2020-02-18 09:09:18 +00:00
|
|
|
jdkRt "net.corda:deterministic-rt:$deterministic_rt_version"
|
2019-11-05 13:44:18 +00:00
|
|
|
|
|
|
|
// The DJVM will need this classpath to run the unit tests.
|
|
|
|
sandboxTesting files(sourceSets.getByName("test").output)
|
|
|
|
sandboxTesting project(':serialization-djvm:deserializers')
|
|
|
|
sandboxTesting project(path: ':serialization-deterministic', configuration: 'deterministicArtifacts')
|
|
|
|
sandboxTesting "org.slf4j:slf4j-nop:$slf4j_version"
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
archiveBaseName = 'corda-serialization-djvm'
|
2020-04-06 10:00:40 +00:00
|
|
|
archiveClassifier = ''
|
2019-11-05 13:44:18 +00:00
|
|
|
manifest {
|
|
|
|
attributes('Automatic-Module-Name': 'net.corda.serialization.djvm')
|
|
|
|
attributes('Sealed': true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(Test) {
|
|
|
|
useJUnitPlatform()
|
|
|
|
systemProperty 'deterministic-rt.path', configurations.jdkRt.asPath
|
|
|
|
systemProperty 'sandbox-libraries.path', configurations.sandboxTesting.asPath
|
|
|
|
|
|
|
|
// Configure the host timezone to match the DJVM's.
|
|
|
|
systemProperty 'user.timezone', 'UTC'
|
|
|
|
}
|
|
|
|
|
|
|
|
publish {
|
|
|
|
name jar.archiveBaseName.get()
|
|
|
|
}
|
|
|
|
|
|
|
|
idea {
|
|
|
|
module {
|
|
|
|
downloadJavadoc = true
|
|
|
|
downloadSources = true
|
|
|
|
}
|
|
|
|
}
|