Skip to content

Commit

Permalink
Drop support for Java 8 (#9253)
Browse files Browse the repository at this point in the history
* Remove usage of no longer needed "annotation stripper" plugin
* Remove no longer needed `:nessie-model-quarkus` project
* Let all "server side" projects use `nessie-conventions-server`, even if this is currently the same as `nessie-conventions-client`
* Let all "client side" projects use `nessie-conventions-client`
  • Loading branch information
snazy committed Aug 21, 2024
1 parent 513d0f0 commit f079491
Show file tree
Hide file tree
Showing 55 changed files with 61 additions and 338 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ as necessary. Empty sections will not end in the release notes.

### Upgrade notes

- Support for Java 8 has been removed, even for Nessie clients. Minimum runtime requirement for clients
is Java 11.

### Breaking changes

### New Features
Expand Down
2 changes: 1 addition & 1 deletion api/client-testextension/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

plugins {
id("nessie-conventions-server")
id("nessie-conventions-client")
id("nessie-jacoco")
}

Expand Down
8 changes: 0 additions & 8 deletions api/client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import org.apache.tools.ant.taskdefs.condition.Os
plugins {
id("nessie-conventions-client")
id("nessie-jacoco")
alias(libs.plugins.annotations.stripper)
}

publishingHelper { mavenName = "Nessie - Client" }
Expand Down Expand Up @@ -177,13 +176,6 @@ testing {
}
}

annotationStripper {
registerDefault().configure {
annotationsToDrop("^jakarta[.].+".toRegex())
unmodifiedClassesForJavaVersion = 11
}
}

// prevent duplicate checkstyle work
jacksonTestVersions
.map { jacksonVersion -> "Jackson_" + jacksonVersion.replace("[.]".toRegex(), "_") }
Expand Down
89 changes: 0 additions & 89 deletions api/model-quarkus/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion api/model-quarkus/src/main

This file was deleted.

8 changes: 0 additions & 8 deletions api/model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id("nessie-conventions-client")
id("nessie-jacoco")
alias(libs.plugins.annotations.stripper)
alias(libs.plugins.smallrye.openapi)
}

Expand Down Expand Up @@ -102,13 +101,6 @@ generateOpenApiSpec.configure {

artifacts { add(openapiSource.name, file("src/main/resources/META-INF")) }

annotationStripper {
registerDefault().configure {
annotationsToDrop("^jakarta[.].+".toRegex())
unmodifiedClassesForJavaVersion = 11
}
}

tasks.named<Test>("intTest").configure {
dependsOn(generateOpenApiSpec)
systemProperty(
Expand Down
1 change: 0 additions & 1 deletion bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ dependencies {
api(project(":nessie-gc-repository-jdbc"))
api(project(":nessie-gcs-testcontainer"))
api(project(":nessie-model"))
api(project(":nessie-model-quarkus"))
api(project(":nessie-notice"))
api(project(":nessie-jaxrs-testextension"))
api(project(":nessie-jaxrs-tests"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Dremio
* Copyright (C) 2024 Dremio
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,8 +14,6 @@
* limitations under the License.
*/

// Java project using Apache Iceberg, Java 11

plugins {
`java-library`
`maven-publish`
Expand All @@ -25,5 +23,3 @@ plugins {
id("nessie-java")
id("nessie-testing")
}

tasks.withType<JavaCompile>().configureEach { options.release = 11 }
29 changes: 4 additions & 25 deletions build-logic/src/main/kotlin/nessie-conventions-client.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Dremio
* Copyright (C) 2024 Dremio
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,29 +14,8 @@
* limitations under the License.
*/

// Java project, production code built for Java 8
// Conventions for projects being consumed by downstream clients.

plugins {
`java-library`
`maven-publish`
signing
id("nessie-common-base")
id("nessie-common-src")
id("nessie-java")
id("nessie-testing")
}
plugins { id("nessie-common-java") }

tasks.withType<JavaCompile>().configureEach {
if (path.startsWith(":nessie-client:")) {
// :nessie-client is a little special, because it contains a Java 11 version for
// Nessie's dependency-free http client, so setting "release=8", would not work.
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
} else if (name == "compileJava") {
// Client production code must be compatible with Java 8
options.release = 8
} else {
// Test code may depend on server code for in-JVM tests, so need Java 11 for test code
options.release = 11
}
}
tasks.withType<JavaCompile>().configureEach { options.release = 11 }
14 changes: 3 additions & 11 deletions build-logic/src/main/kotlin/nessie-conventions-quarkus.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Dremio
* Copyright (C) 2024 Dremio
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,16 +14,8 @@
* limitations under the License.
*/

// Java project using Quarkus, Java 11 (soon: Java 17)
// Conventions for project being built for/with Quarkus.

plugins {
`java-library`
`maven-publish`
signing
id("nessie-common-base")
id("nessie-common-src")
id("nessie-java")
id("nessie-testing")
}
plugins { id("nessie-common-java") }

tasks.withType<JavaCompile>().configureEach { options.release = 21 }
19 changes: 7 additions & 12 deletions build-logic/src/main/kotlin/nessie-conventions-scala.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,19 @@
* limitations under the License.
*/

// Scala project, Java 11
// Conventions for "Nessie internal" Scala projects, not Spark, not client facing.

plugins {
id("nessie-common-java")
scala
`maven-publish`
signing
id("nessie-common-base")
id("nessie-common-src")
id("nessie-java")
id("nessie-scala")
id("nessie-testing")
}

tasks.withType<JavaCompile>().configureEach { options.release = 11 }
tasks.withType<JavaCompile>().configureEach { options.release = 21 }

tasks.withType<ScalaCompile>().configureEach {
options.release = 11
scalaCompileOptions.additionalParameters.add("-release:11")
sourceCompatibility = "11"
targetCompatibility = "11"
options.release = 21
scalaCompileOptions.additionalParameters.add("-release:21")
sourceCompatibility = "21"
targetCompatibility = "21"
}
14 changes: 3 additions & 11 deletions build-logic/src/main/kotlin/nessie-conventions-server.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Dremio
* Copyright (C) 2024 Dremio
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,16 +14,8 @@
* limitations under the License.
*/

// Java project, non-client facing, server component, Java 11
// Conventions for server-side projects being consumed by downstream projects.

plugins {
`java-library`
`maven-publish`
signing
id("nessie-common-base")
id("nessie-common-src")
id("nessie-java")
id("nessie-testing")
}
plugins { id("nessie-common-java") }

tasks.withType<JavaCompile>().configureEach { options.release = 11 }
31 changes: 0 additions & 31 deletions build-logic/src/main/kotlin/nessie-conventions-server8.gradle.kts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@
* limitations under the License.
*/

// Scala project, Java 11
// Conventions for Nessie Spark extensions.

plugins {
id("nessie-common-java")
scala
`maven-publish`
signing
id("nessie-common-base")
id("nessie-common-src")
id("nessie-java")
id("nessie-scala")
id("nessie-testing")
}

tasks.withType<JavaCompile>().configureEach { options.release = 11 }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Dremio
* Copyright (C) 2024 Dremio
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

// Java project, non-client facing, server component, Java 11
// Conventions for Nessie tools that are not published to Maven.

plugins {
`java-library`
Expand All @@ -24,4 +24,4 @@ plugins {
id("nessie-testing")
}

tasks.withType<JavaCompile>().configureEach { options.release = 11 }
tasks.withType<JavaCompile>().configureEach { options.release = 21 }
2 changes: 1 addition & 1 deletion catalog/format/iceberg-bench/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("nessie-conventions-client")
id("nessie-conventions-server")
id("com.github.johnrengelman.shadow")
alias(libs.plugins.jmh)
}
Expand Down
Loading

0 comments on commit f079491

Please sign in to comment.