Skip to content
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
36 changes: 36 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import org.gradle.platform.Architecture
import org.gradle.platform.BuildPlatformFactory
import org.gradle.platform.OperatingSystem

buildscript {
repositories {
google()
Expand Down Expand Up @@ -57,3 +61,35 @@ allprojects {
}
}
}

// Generates gradle/gradle-daemon-jvm.properties. Any vendor's JDK 21 can run the daemon, so CI's
// setup-java JDK and Android Studio's JBR are used as they are; a machine without one downloads
// Adoptium's Temurin release directly rather than through the api.foojay.io index. Adoptium has no
// FreeBSD or other Unix builds, so those get the Linux ones, as Gradle's own foojay lookup does.
tasks.updateDaemonJvm {
val temurin = "21.0.12.1+1"
val release = "https://github.com/adoptium/temurin21-binaries/releases/download/" +
"jdk-${temurin.replace("+", "%2B")}/OpenJDK21U-jdk"
val file = temurin.replace("+", "_")
val linuxAarch64 = uri("${release}_aarch64_linux_hotspot_$file.tar.gz")
val linuxX64 = uri("${release}_x64_linux_hotspot_$file.tar.gz")

languageVersion = JavaLanguageVersion.of(21)
toolchainDownloadUrls = mapOf(
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.LINUX) to linuxAarch64,
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.LINUX) to linuxX64,
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.FREE_BSD) to linuxAarch64,
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.FREE_BSD) to linuxX64,
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.UNIX) to linuxAarch64,
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.UNIX) to linuxX64,
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.MAC_OS) to
uri("${release}_aarch64_mac_hotspot_$file.tar.gz"),
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.MAC_OS) to
uri("${release}_x64_mac_hotspot_$file.tar.gz"),
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.WINDOWS) to
uri("${release}_aarch64_windows_hotspot_$file.zip"),
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.WINDOWS) to
uri("${release}_x64_windows_hotspot_$file.zip"),
)
toolchainPlatforms = toolchainDownloadUrls.get().keys
}
21 changes: 10 additions & 11 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/ecd23fd7707c683afbcd6052998cb6a9/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/10fc3bf1ee0001078a473afe6e43cfdb/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/9c55677aff3966382f3d853c0959bfb2/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39846e8427e64a3824c13e399d7d813c/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/932015f6361ccaead0c6d9b8717ed96e/redirect
toolchainVendor=JETBRAINS
toolchainUrl.FREE_BSD.AARCH64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.FREE_BSD.X86_64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_x64_linux_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.LINUX.AARCH64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.LINUX.X86_64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_x64_linux_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.MAC_OS.AARCH64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.MAC_OS.X86_64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_x64_mac_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.UNIX.AARCH64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.UNIX.X86_64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_x64_linux_hotspot_21.0.12.1_1.tar.gz
toolchainUrl.WINDOWS.AARCH64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_aarch64_windows_hotspot_21.0.12.1_1.zip
toolchainUrl.WINDOWS.X86_64=https\://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_x64_windows_hotspot_21.0.12.1_1.zip
toolchainVersion=21
Loading