Skip to content

Commit

Permalink
chore: get build working with Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Oct 18, 2020
1 parent 5f7bc7b commit de64dde
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
30 changes: 16 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
// id 'org.jmailen.kotlinter' version '3.2.0'
id 'io.gitlab.arturbosch.detekt' version '1.14.1'
id 'org.jetbrains.dokka' version '0.10.1' apply false
id 'org.javamodularity.moduleplugin' version '1.6.0' apply false
id 'org.jetbrains.dokka' version '1.4.10' apply false
id 'org.javamodularity.moduleplugin' version '1.7.0' apply false
}

import org.apache.commons.text.StringEscapeUtils
Expand All @@ -31,8 +31,8 @@ allprojects {
jcenter()
}

targetCompatibility = '1.9'
sourceCompatibility = '1.9'
targetCompatibility = '11'
sourceCompatibility = '11'
}

subprojects {
Expand Down Expand Up @@ -65,7 +65,16 @@ subprojects {
if (System.env.TRAVIS != 'true') {
apply plugin: 'org.jetbrains.dokka'
}
//apply plugin: "org.javamodularity.moduleplugin"
apply plugin: "org.javamodularity.moduleplugin"

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
}

java {
modularity.inferModulePath = true
}

compileTestGroovy {
classpath = classpath.plus(files(compileTestKotlin.destinationDir))
Expand All @@ -82,17 +91,10 @@ subprojects {

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "9"
jvmTarget = "11"
}
}

if (System.env.TRAVIS != 'true') {
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/docs/dokkaJavadoc"
}
}

jar {
manifest {
attributes provider: 'gradle',
Expand Down Expand Up @@ -132,7 +134,7 @@ subprojects {
showExceptions true
showStackTraces true
showStandardStreams false
events "passed", "skipped", "failed" //, "standardOut", "standardError"
events "passed", "skipped", "failed"
}
} else {
// Show test results.
Expand Down
2 changes: 1 addition & 1 deletion core/support/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
implementation "org.apache.commons:commons-lang3:${project.commonsLang3Version}"
implementation "com.google.code.findbugs:jsr305:3.0.2"
Expand Down
2 changes: 1 addition & 1 deletion provider/maven/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies {
compile 'org.apache.maven:maven-plugin-api:3.6.0',
'org.apache.maven.plugin-tools:maven-plugin-annotations:3.6.0'
compile 'org.apache.maven:maven-core:3.6.0'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
implementation 'com.github.ajalt:mordant:1.2.1'

Expand Down
2 changes: 1 addition & 1 deletion releasePrep.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def javaVersion
executeOnShell("./gradlew --version 2>/dev/null | awk '/^JVM:/ { print \$2 }'") {
javaVersion = Version.valueOf(it.trim().replace('_', '+b'))
}
if (!javaVersion?.satisfies('^9')) {
if (!javaVersion?.satisfies('^11')) {
ask("You are building against Java $javaVersion. Do you want to exit?: [Y]") {
System.exit(1)
}
Expand Down

0 comments on commit de64dde

Please sign in to comment.