Skip to content

Commit

Permalink
make sure to release with jdk11
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed Jan 28, 2024
1 parent 815eff4 commit 38f3544
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,8 @@ tasks.withType<Test> {
kotlin {
explicitApi()
}

if (JavaVersion.current() > JavaVersion.VERSION_11 && gradle.startParameter.taskNames.contains("publish")) {
throw GradleException("Release this library with JDK 11 or lower, to ensure JDK11 compatibility; current JDK is ${JavaVersion.current()}")
}

0 comments on commit 38f3544

Please sign in to comment.