Skip to content

Commit

Permalink
Minimal Java version in Mockito 5 is 11
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-krecan committed May 19, 2023
1 parent 08830c7 commit 98c7500
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
- name: 1. Check out code
uses: actions/checkout@v2 # https://github.com/actions/checkout

- name: 2. Set up Java 8
- name: 2. Set up Java 11
uses: actions/setup-java@v1 # https://github.com/actions/setup-java
with:
java-version: 8
java-version: 11

- name: 3. Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1 # https://github.com/gradle/wrapper-validation-action
Expand All @@ -60,10 +60,10 @@ jobs:
- name: 1. Check out code
uses: actions/checkout@v2 # https://github.com/actions/checkout

- name: 2. Set up Java 8
- name: 2. Set up Java 11
uses: actions/setup-java@v1 # https://github.com/actions/setup-java
with:
java-version: 8
java-version: 11

- name: 3. Build with Kotlin ${{ matrix.kotlin }} and mock-maker ${{ matrix.mock-maker }}
run: |
Expand Down Expand Up @@ -92,10 +92,10 @@ jobs:
with:
fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci

- name: Set up Java 8
- name: Set up Java 11
uses: actions/setup-java@v1
with:
java-version: 8
java-version: 11

- name: Build and release
run: ./gradlew githubRelease publishToSonatype closeAndReleaseStagingRepository releaseSummary
Expand Down
9 changes: 9 additions & 0 deletions mockito-kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

apply plugin: 'kotlin'
apply from: '../gradle/publishing.gradle'
apply plugin: 'org.jetbrains.dokka'
Expand Down Expand Up @@ -45,4 +47,11 @@ dokka {
suffix = "#L"
}
}

tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
}

javadoc.dependsOn dokka
8 changes: 8 additions & 0 deletions tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.4.20'
println "$project uses Kotlin $kotlin_version"
Expand Down Expand Up @@ -26,3 +28,9 @@ dependencies {
testCompile 'junit:junit:4.13.2'
testCompile "com.nhaarman:expect.kt:1.0.1"
}

tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
}

0 comments on commit 98c7500

Please sign in to comment.