corda/core-deterministic/testing/common/build.gradle
Chris Rankin 71e7784519
ENT-1467: Document how to configure IntelliJ with a deterministic SDK. (#3371)
* Allow deterministic modules to use a deterministic IntelliJ SDK.
* Document how to configure IntelliJ with a deterministic SDK.
* Small clarifications to deterministic IntelliJ SDK documentation.
2018-06-18 12:40:35 +01:00

34 lines
948 B
Groovy

apply plugin: 'kotlin'
apply plugin: 'idea'
evaluationDependsOn(':jdk8u-deterministic')
def jdkTask = project(':jdk8u-deterministic').assemble
def deterministic_jdk_home = project(':jdk8u-deterministic').jdk_home
dependencies {
compileOnly project(path: ':core-deterministic', configuration: 'runtimeArtifacts')
compileOnly project(path: ':serialization-deterministic', configuration: 'runtimeArtifacts')
compileOnly "junit:junit:$junit_version"
}
tasks.withType(AbstractCompile) {
dependsOn jdkTask
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-bootclasspath' << "$deterministic_jdk_home/jre/lib/rt.jar".toString()
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jdkHome = deterministic_jdk_home
}
idea {
module {
if (project.hasProperty("deterministic_idea_sdk")) {
jdkName project.property("deterministic_idea_sdk") as String
}
}
}