Skip to content

Commit

Permalink
chore: Add jextract candidate (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
helpermethod authored Sep 30, 2023
1 parent 0d6d726 commit 823342b
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/main/scala/io/sdkman/changelogs/JExtractMigrations.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package io.sdkman.changelogs

import com.github.mongobee.changeset.{ChangeLog, ChangeSet}
import com.mongodb.client.MongoDatabase

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

@ChangeSet(
order = "001",
id = "001_add_jextract_candidate",
author = "helpermethod"
)
def migration001(implicit db: MongoDatabase) =
Candidate(
candidate = "jextract",
name = "Jextract",
description =
"jextract is a tool which mechanically generates Java bindings from a native library headers.",
websiteUrl = "https://jdk.java.net/jextract/"
).insert()

@ChangeSet(
order = "002",
id = "002_add_jextract_candidate",
author = "helpermethod"
)
def migration002(implicit db: MongoDatabase): Unit = {
List(
("19-jextract+2-3", 2),
("20-jextract+1-2", 1),
("21-jextract+1-2", 1)
).map {
case (version, patchNumber) =>
List(
(Linux64, "linux"),
(MacOSX, "macos"),
(Windows, "windows")
).map {
case (platform, platformIdentifier) =>
Version(
"jextract",
version,
s"https://download.java.net/java/early_access/jextract/$patchNumber/openjdk-${version}_${platformIdentifier}-x64_bin.tar.gz",
platform
).validate()
.insert()
}
}
}
}

0 comments on commit 823342b

Please sign in to comment.