diff --git a/build.gradle.kts b/build.gradle.kts index a69b1e0..82910bb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,7 +23,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget object BuildSettings { const val GROUP = "com.teamdev.jxbrowser" const val VERSION = "2.0.0" - const val JXBROWSER_VERSION = "8.18.3" + const val JXBROWSER_VERSION = "9.0.0" val javaVersion = JavaVersion.VERSION_1_8 } diff --git a/src/main/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserExtension.kt b/src/main/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserExtension.kt index 4de121a..e366fb9 100644 --- a/src/main/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserExtension.kt +++ b/src/main/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserExtension.kt @@ -87,7 +87,7 @@ public open class JxBrowserExtension( * Returns a dependency notation for the `jxbrowser-kotlin`, * an artifact with the Kotlin API of the library. * - * Kotlin API is only supported in JxBrowser 8.x.x. + * Kotlin API is only supported in JxBrowser 8.x.x and newer. */ public val kotlin: Provider = artifact("kotlin") @@ -95,7 +95,7 @@ public open class JxBrowserExtension( * Returns a dependency notation for the `jxbrowser-compose`, * an artifact with Compose integration. * - * Compose is only supported in JxBrowser 8.x.x. + * Compose is only supported in JxBrowser 8.x.x and newer. */ public val compose: Provider = artifact("compose") @@ -117,6 +117,14 @@ public open class JxBrowserExtension( */ public val swt: Provider = artifact("swt") + /** + * Returns a dependency notation for the `jxbrowser-native-image`, + * an artifact containing GraalVM Native Image reachability metadata. + * + * Native images are only supported in JxBrowser 9.x.x and newer. + */ + public val nativeImage: Provider = artifact("native-image") + /** * Returns a dependency notation for the `jxbrowser-win64`, * an artifact with Chromium Windows 64-bit binaries. @@ -210,12 +218,6 @@ public open class JxBrowserExtension( shortName: String, version: String, ) { - val artifactNameToReleaseVersion = - mapOf( - "compose" to "8.0.0", - "kotlin" to "8.0.0", - "win64-arm" to "8.0.0", - ) val artifactReleaseVersion = artifactNameToReleaseVersion[shortName] if (artifactReleaseVersion != null) { val releaseVersion = Semver(artifactReleaseVersion) @@ -228,5 +230,16 @@ public open class JxBrowserExtension( private companion object { private const val GROUP = "com.teamdev.jxbrowser" + + /** + * Maps an artifact short name to the first JxBrowser version that supports it. + */ + private val artifactNameToReleaseVersion = + mapOf( + "compose" to "9.0.0", + "kotlin" to "9.0.0", + "win64-arm" to "9.0.0", + "native-image" to "9.0.0", + ) } } diff --git a/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginFunctionalTest.kt b/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginFunctionalTest.kt index f6a8fd1..f0a4f29 100644 --- a/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginFunctionalTest.kt +++ b/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginFunctionalTest.kt @@ -99,6 +99,7 @@ internal class JxBrowserPluginFunctionalTest { "jxbrowser-kotlin-$jxBrowserVersion.jar", "jxbrowser-compose-$jxBrowserVersion.jar", "jxbrowser-win64-arm-$jxBrowserVersion.jar", + "jxbrowser-native-image-$jxBrowserVersion.jar", ) buildFile.writeText( """ @@ -129,6 +130,7 @@ internal class JxBrowserPluginFunctionalTest { "toCopy"(jxbrowser.kotlin) "toCopy"(jxbrowser.compose) "toCopy"(jxbrowser.winArm) + "toCopy"(jxbrowser.nativeImage) } tasks.register("$taskName") { diff --git a/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginTest.kt b/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginTest.kt index 9151685..714552c 100644 --- a/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginTest.kt +++ b/src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginTest.kt @@ -70,6 +70,7 @@ internal class JxBrowserPluginTest { compose.get() shouldBe "$group:jxbrowser-compose:$jxBrowserVersion" linux64.get() shouldBe "$group:jxbrowser-linux64:$jxBrowserVersion" linuxArm.get() shouldBe "$group:jxbrowser-linux64-arm:$jxBrowserVersion" + nativeImage.get() shouldBe "$group:jxbrowser-native-image:$jxBrowserVersion" crossPlatform.get() shouldBe "$group:jxbrowser-cross-platform:$jxBrowserVersion" } }