Skip to content
Merged
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
83 changes: 8 additions & 75 deletions src/main/scala/io/sdkman/changelogs/JExtractMigrations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,97 +5,30 @@ import com.mongodb.client.MongoDatabase

@ChangeLog(order = "087")
class JExtractMigrations {

@ChangeSet(
order = "001",
id = "001_add_jextract_candidate",
author = "helpermethod"
)
def migration001(implicit db: MongoDatabase) =
Candidate(
candidate = "jextract",
name = "Jextract",
description =
"Jextract mechanically generates Java bindings from native library headers. This is an early access build from OpenJDK Jextract which is part of Code Tools",
websiteUrl = "https://jdk.java.net/jextract/"
).insert()

@ChangeSet(
order = "002",
id = "002_add_jextract_22-jextract+5-33",
author = "helpermethod"
)
def migration002(implicit db: MongoDatabase): Unit = {
List(
(Linux64, "linux-x64"),
(MacARM64, "macos-aarch64"),
(MacOSX, "macos-x64"),
(Windows, "windows-x64")
).map {
case (platform, platformIdentifier) =>
Version(
candidate = "jextract",
version = "22+5-33",
url =
s"https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_${platformIdentifier}_bin.tar.gz",
platform = platform
).validate()
.insert()
}
}

@ChangeSet(
order = "003",
id = "003_add_jextract_candidate",
author = "helpermethod"
)
def migration003(implicit db: MongoDatabase): Unit = {
Candidate(
candidate = "jextract",
name = "Jextract",
description =
"Jextract mechanically generates Java bindings from native library headers. This is an early access build from OpenJDK Jextract which is part of Code Tools",
websiteUrl = "https://jdk.java.net/jextract/"
).insert()
}

@ChangeSet(
order = "004",
id = "004_remove_unsupported_versions",
author = "helpermethod"
)
def migration004(implicit db: MongoDatabase): Unit = {
List("21-jextract+1-2", "20-jextract+1-2", "19-jextract+2-3")
.foreach { version =>
List(Linux64, MacARM64, MacOSX, Windows).foreach { platform =>
removeVersion("jextract", version, platform)
}
}
}

@ChangeSet(
order = "005",
id = "005_improve_versioning",
order = "006",
id = "006_add-jextract-22.6",
author = "helpermethod"
)
def migration005(implicit db: MongoDatabase): Unit = {
removeAllVersions("jextract")

List(
(LinuxARM64, "linux-aarch64"),
(Linux64, "linux-x64"),
(MacARM64, "macos-aarch64"),
(MacOSX, "macos-x64"),
(Windows, "windows-x64")
).map {
).foreach {
case (platform, platformIdentifier) =>
Version(
candidate = "jextract",
version = "22.ea.5",
version = "22.ea.6",
url =
s"https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_${platformIdentifier}_bin.tar.gz",
s"https://download.java.net/java/early_access/jextract/22/6/openjdk-22-jextract+6-47_${platformIdentifier}_bin.tar.gz",
platform = platform
).validate()
.insert()
}

setCandidateDefault("jextract", "22.ea.6")
}
}
Loading