Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions build-logic/src/main/kotlin/authmgr-bundle.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ class BundleLicenseGenerator() : ReportRenderer {
}
}

// Task to verify that the production JAR is compatible with Java 11
val checkJava11Compatibility by
// Task to verify that the production JAR is compatible with Java 17
val checkJava17Compatibility by

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we compelled to bump the java version?

If not, it might be easier for clients to keep 11 🤔 WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not compelled, but since Iceberg itself is switching to a Java 17 baseline, I figured it was time to change this. But, OTOH, we can wait until Iceberg 1.11 is out. Let's put this one on hold.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... I see 🙂

tasks.registering {
description = "Verifies that all classes in the production JAR are compatible with Java 11"
description = "Verifies that all classes in the production JAR are compatible with Java 17"
group = "verification"
dependsOn(shadowJar)

Expand All @@ -226,7 +226,7 @@ val checkJava11Compatibility by
}

val incompatibleClasses = mutableListOf<Pair<String, Int>>()
val maxJava11ClassVersion = 55 // Java 11 = class file version 55.0
val maxJava17ClassVersion = 61 // Java 17 = class file version 61.0

ZipFile(jar).use { zip ->
zip.stream().forEach { entry ->
Expand All @@ -237,7 +237,7 @@ val checkJava11Compatibility by
// Extract major version (bytes 6-7)
val bytes = input.readNBytes(2)
val majorVersion = ((bytes[0].toInt() and 0xFF) shl 8) or (bytes[1].toInt() and 0xFF)
if (majorVersion > maxJava11ClassVersion) {
if (majorVersion > maxJava17ClassVersion) {
incompatibleClasses.add(Pair(entry.name, majorVersion))
}
}
Expand All @@ -248,7 +248,7 @@ val checkJava11Compatibility by
if (incompatibleClasses.isNotEmpty()) {
val errorMessage = buildString {
appendLine(
"Found ${incompatibleClasses.size} class(es) incompatible with Java 11 in ${jar.name}:"
"Found ${incompatibleClasses.size} class(es) incompatible with Java 17 in ${jar.name}:"
)
incompatibleClasses
.sortedBy { it.first }
Expand All @@ -261,4 +261,4 @@ val checkJava11Compatibility by
}
}

tasks.named("check") { dependsOn(checkJava11Compatibility) }
tasks.named("check") { dependsOn(checkJava17Compatibility) }
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import org.gradle.api.tasks.compile.JavaCompile
plugins { id("authmgr-java") }

tasks.withType(JavaCompile::class.java).configureEach {
// Default to Java 11 for main sources, Java 21 for test sources
// Default to Java 17 for main sources, Java 21 for test sources
if (name == "compileJava") {
options.release = 11
options.release = 17
} else {
options.release = 21
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (System.getProperty("idea.sync.active").toBoolean()) {

eclipse { project { name = ideName } }

tasks.withType(JavaCompile::class.java).configureEach { options.release = 11 }
tasks.withType(JavaCompile::class.java).configureEach { options.release = 17 }

tasks.named<RatTask>("rat").configure {
// These are Gradle file pattern syntax
Expand Down
2 changes: 1 addition & 1 deletion docs/flink.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
## Prerequisites

* Apache Iceberg 1.9.0 or later is required.
* Dremio AuthManager for Apache Iceberg requires Java 11 or later for runtime.
* Dremio AuthManager for Apache Iceberg requires Java 17 or later for runtime.
* Dremio AuthManager for Apache Iceberg is meant to be used in conjunction with an Iceberg engine
runtime jar, e.g. `iceberg-flink-runtime-1.20`.

Expand Down
2 changes: 1 addition & 1 deletion docs/spark.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
## Prerequisites

* Apache Iceberg 1.9.0 or later is required.
* Dremio AuthManager for Apache Iceberg requires Java 11 or later for runtime.
* Dremio AuthManager for Apache Iceberg requires Java 17 or later for runtime.
* Dremio AuthManager for Apache Iceberg is meant to be used in conjunction with an Iceberg engine
runtime jar, e.g. `iceberg-spark-runtime-3.5_2.12`.

Expand Down
3 changes: 1 addition & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ nimbus-oauth2-oidc-sdk = { module = "com.nimbusds:oauth2-oidc-sdk", version.ref
nimbus-jose-jwt = { module = "com.nimbusds:nimbus-jose-jwt", version.ref = "nimbus-jose-jwt" }
s3mock-testcontainers = { module = "com.adobe.testing:s3mock-testcontainers", version = "4.9.1" }
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
# Last version supporting JDK 11 https://github.com/smallrye/smallrye-config/pull/1287
smallrye-config = { module = "io.smallrye.config:smallrye-config", version = { strictly = "3.10.2" } }
smallrye-config = { module = "io.smallrye.config:smallrye-config", version = "3.12.4" }
testcontainers-bom = { module = "org.testcontainers:testcontainers-bom", version = "2.0.1" }
testcontainers-keycloak = { module = "com.github.dasniko:testcontainers-keycloak", version = "4.1.1" }

Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ if (authMangerBuild.exists()) {
}
}

if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
throw GradleException("Build requires Java 11 or later")
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
throw GradleException("Build requires Java 17 or later")
}

val baseVersion = file("version.txt").readText().trim()
Expand Down
Loading