Skip to content

Commit

Permalink
Remove JDK8 support and fix JDK17 build. (opensearch-project#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Mar 9, 2022
1 parent 0ffb13b commit 7720360
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 50 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/ci-17.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
strategy:
matrix:
java:
- 8
- 11
- 14
- 17

name: Build and Test
runs-on: ubuntu-latest
Expand Down
19 changes: 10 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
ext {
opensearch_group = "org.opensearch"
opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT")
kotlin_version = System.getProperty("kotlin.version", "1.4.32")
kotlin_version = System.getProperty("kotlin.version", "1.6.10")
}

repositories {
Expand All @@ -21,7 +21,7 @@ buildscript {
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.17.1"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.20.0-RC1"
}
}

Expand Down Expand Up @@ -50,7 +50,8 @@ allprojects {
}
}

sourceCompatibility = 1.8
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11

apply plugin: 'java'
apply plugin: 'jacoco'
Expand All @@ -70,15 +71,15 @@ dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
compileOnly "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3" // ${kotlin_version} does not work for coroutines
testCompile "org.opensearch.test:framework:${opensearch_version}"
testCompile "org.jetbrains.kotlin:kotlin-test:${kotlin_version}"
testCompile "org.mockito:mockito-core:3.10.0"
testImplementation "org.opensearch.test:framework:${opensearch_version}"
testImplementation "org.jetbrains.kotlin:kotlin-test:${kotlin_version}"
testImplementation "org.mockito:mockito-core:3.10.0"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testImplementation 'org.mockito:mockito-junit-jupiter:3.10.0'
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'

ktlint "com.pinterest:ktlint:0.41.0"
ktlint "com.pinterest:ktlint:0.44.0"
}

test {
Expand Down Expand Up @@ -126,13 +127,13 @@ task ktlintFormat(type: JavaExec, group: "formatting") {
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = "1.8"
jvmTarget = "11"
}
}

compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
}
}

Expand Down

0 comments on commit 7720360

Please sign in to comment.