Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to JDK 21 #58

Merged
merged 5 commits into from
Nov 14, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21
java-package: jdk
architecture: x64

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21
java-package: jdk
architecture: x64

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upload-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21
java-package: jdk
architecture: x64

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21
java-package: jdk
architecture: x64

Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 21
java-package: jdk
architecture: x64

Expand Down
13 changes: 7 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ buildscript {

repositories {
mavenLocal()
jcenter()
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath("com.github.jengelman.gradle.plugins:shadow:5.2.0")
classpath("com.github.johnrengelman:shadow:8.1.1")
}
}

plugins {
java
kotlin("jvm") version "1.5.30" apply false
id("com.github.johnrengelman.shadow") version "5.2.0" apply false
kotlin("jvm") version "2.0.21" apply false
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("com.google.cloud.tools.jib") version "2.2.0" apply false
id("com.github.ben-manes.versions") version "0.28.0"
id("com.palantir.git-version") version "0.12.3"
Expand All @@ -44,8 +45,8 @@ allprojects {

repositories {
mavenLocal()
jcenter()
mavenCentral()
gradlePluginPortal()
maven { url = URI("https://packages.confluent.io/maven/") }
}
}
Expand All @@ -55,7 +56,7 @@ subprojects {
apply(plugin = "maven-publish")

java {
sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_21
}

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
java
kotlin("jvm") version "1.5.30"
kotlin("jvm") version "2.0.21"
}

repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/DistributionWithRuntimeExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ open class DistributionWithRuntimeExtension @Inject constructor(objects: ObjectF
}

class RuntimeConfig(
var version: String = "11",
var version: String = "21",
var platform: Platform = Platform.Linux,
var distribution: String = "AdoptOpenJDK"
var arch: String = "x64",
var distribution: String = "Adoptium"
)

class DistributionConfig(
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/DistributionWithRuntimePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ open class DistributionWithRuntimePlugin : Plugin<Project> {
val runtimeConfig = extension.runtimeConfig.get()
runtimes
.runtimes
.find { it.platform == runtimeConfig.platform && it.version == runtimeConfig.version }
.find { it.platform == runtimeConfig.platform && it.version == runtimeConfig.version && it.arch == runtimeConfig.arch }
?.distributions
?.get(runtimeConfig.distribution)
?: throw IllegalArgumentException("distribution not found: $runtimeConfig")
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/DownloadJreTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ private fun inferArchiveType(url: String): DownloadJreTask.ArchiveType = when {
}

data class Runtimes(val runtimes: List<Runtime>)
data class Runtime(val version: String, val platform: Platform, val distributions: Map<String, String>)
data class Runtime(val version: String, val platform: Platform, val arch: String, val distributions: Map<String, String>)
enum class Platform { MacOs, Linux, Windows }
34 changes: 34 additions & 0 deletions buildSrc/src/main/resources/jre.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,50 @@
{
"version": "11",
"platform": "MacOs",
"arch": "x64",
"distributions": {
"AdoptOpenJDK": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10_openj9-0.20.0/OpenJDK11U-jre_x64_mac_openj9_11.0.7_10_openj9-0.20.0.tar.gz"
}
},
{
"version": "11",
"platform": "Linux",
"arch": "x64",
"distributions": {
"AdoptOpenJDK": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10_openj9-0.20.0/OpenJDK11U-jre_x64_linux_openj9_11.0.7_10_openj9-0.20.0.tar.gz"
}
},
{
"version": "21",
"platform": "MacOs",
"arch": "x64",
"distributions": {
"Adoptium": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jre_x64_mac_hotspot_21.0.5_11.tar.gz"
}
},
{
"version": "21",
"platform": "Linux",
"arch": "x64",
"distributions": {
"Adoptium": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jre_x64_linux_hotspot_21.0.5_11.tar.gz"
}
},
{
"version": "21",
"platform": "MacOs",
"arch": "aarch64",
"distributions": {
"Adoptium": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jre_aarch64_mac_hotspot_21.0.5_11.tar.gz"
}
},
{
"version": "21",
"platform": "Linux",
"arch": "aarch64",
"distributions": {
"Adoptium": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jre_aarch64_linux_hotspot_21.0.5_11.tar.gz"
}
}
]
}
6 changes: 3 additions & 3 deletions docs/contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ TODO

### Requirements
To build and deploy :
- java 11 or later (install with the awesome [sdkman](https://sdkman.io/))
- java 21 or later (install with the awesome [sdkman](https://sdkman.io/))

### Build zoe cli

```bash
# switch to java 11 or later
# switch to java 21 or later
# if you are using sdkman
sdk use java 11
sdk use java 21

# build zoe CLI
./gradlew clean zoe-cli:installDist
Expand Down
4 changes: 2 additions & 2 deletions docs/install/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
There are several ways to install zoe depending on your needs and the operation system you are using:

- [Platform package install](package.md): Self contained platform packages (`.deb`, `.rpm`, etc.) built using the new [jpackage](https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html) utility. These packages contain all the dependencies required including the java virtual machine and do not require the host machine to have its own JDK. This is the easiest way to install zoe (if your platform is supported).
- [Homebrew](homebrew.md): Zoe can also be installed using Homebrew on MacOs and Linux environments. Installed packages do not contain the JDK though, so the host machine is required to have a JDK 11 or higher.
- [Manual tarball install](tarball.md): If none of the above options are available for you, Zoe provides tarballs ready to be used in all platforms (including Windows). The host machine is required to have a JDK 11 or higher.
- [Homebrew](homebrew.md): Zoe can also be installed using Homebrew on MacOs and Linux environments. Installed packages do not contain the JDK though, so the host machine is required to have a JDK 21 or higher.
- [Manual tarball install](tarball.md): If none of the above options are available for you, Zoe provides tarballs ready to be used in all platforms (including Windows). The host machine is required to have a JDK 21 or higher.
- [Docker](docker.md): Zoe can also be used with docker. We provide ready to use images automatically built for each release.
2 changes: 1 addition & 1 deletion docs/install/tarball.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Manual tarball install (requires a JDK on the host machine)

Java 11 or higher is required in order to install the runtime-less tarball packages. They only ship with the Zoe CLI jar.
Java 21 or higher is required in order to install the runtime-less tarball packages. They only ship with the Zoe CLI jar.

If you don't have java installed already, you can use [sdkman](https://sdkman.io/) for an easy install and version management of the JDK. If you don't want to install java you can try one of the platform packages provided in the previous section.

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading