Skip to content

Commit ea7beed

Browse files
Use Java 17 for plugin publishing (#98)
This PR updates the Java version to 17 in the GitHub Actions script used for publishing the plugin. Gradle 9 requires this version to work: https://gradle.org/whats-new/gradle-9/#java-versions-and-toolchains Also, we no longer need a separate test for verifying the download of the JxBrowser 8.0.0 jars. The full list of jars should be tested when updating the JxBrowser version.
1 parent af24b2c commit ea7beed

3 files changed

Lines changed: 8 additions & 53 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- name: Set up JDK
1616
uses: actions/setup-java@v4
1717
with:
18-
distribution: 'adopt'
19-
java-version: 8
18+
distribution: 'zulu'
19+
java-version: '17'
2020

2121
- name: Run Gradle tasks
2222
run: ./gradlew check

src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginFunctionalTest.kt

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ internal class JxBrowserPluginFunctionalTest {
9696
"jxbrowser-linux64-arm-$jxBrowserVersion.jar",
9797
"jxbrowser-mac-$jxBrowserVersion.jar",
9898
"jxbrowser-mac-arm-$jxBrowserVersion.jar",
99+
"jxbrowser-kotlin-$jxBrowserVersion.jar",
100+
"jxbrowser-compose-$jxBrowserVersion.jar",
101+
"jxbrowser-win64-arm-$jxBrowserVersion.jar",
99102
)
100103
buildFile.writeText(
101104
"""
@@ -123,57 +126,6 @@ internal class JxBrowserPluginFunctionalTest {
123126
"toCopy"(jxbrowser.win64)
124127
"toCopy"(jxbrowser.linux64)
125128
"toCopy"(jxbrowser.linuxArm)
126-
}
127-
128-
tasks.register<Copy>("$taskName") {
129-
from(configurations.getByName("toCopy"))
130-
into("${libsFolder.toString().replace("\\", "/")}")
131-
}
132-
""".trimIndent(),
133-
)
134-
135-
val result =
136-
GradleRunner
137-
.create()
138-
.withProjectDir(testProjectDir)
139-
.withPluginClasspath()
140-
.withArguments(taskName)
141-
.build()
142-
143-
result.outcome(":$taskName") shouldBe SUCCESS
144-
libsFolder.files() shouldContainExactlyInAnyOrder filesToCheck
145-
}
146-
147-
@Test
148-
fun `download JxBrowser 8 jars`() {
149-
val taskName = "downloadJars"
150-
val jxBrowserVersion = "8.0.0"
151-
val filesToCheck =
152-
listOf(
153-
"jxbrowser-$jxBrowserVersion.jar",
154-
"jxbrowser-kotlin-$jxBrowserVersion.jar",
155-
"jxbrowser-compose-$jxBrowserVersion.jar",
156-
"jxbrowser-win64-arm-$jxBrowserVersion.jar",
157-
)
158-
159-
buildFile.writeText(
160-
"""
161-
plugins {
162-
base
163-
id("com.teamdev.jxbrowser")
164-
}
165-
166-
jxbrowser {
167-
version = "$jxBrowserVersion"
168-
includePreviewBuilds()
169-
}
170-
171-
configurations {
172-
create("toCopy")
173-
}
174-
175-
dependencies {
176-
"toCopy"(jxbrowser.core)
177129
"toCopy"(jxbrowser.kotlin)
178130
"toCopy"(jxbrowser.compose)
179131
"toCopy"(jxbrowser.winArm)

src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ internal class JxBrowserPluginTest {
6565
win64.get() shouldBe "$group:jxbrowser-win64:$jxBrowserVersion"
6666
javafx.get() shouldBe "$group:jxbrowser-javafx:$jxBrowserVersion"
6767
macArm.get() shouldBe "$group:jxbrowser-mac-arm:$jxBrowserVersion"
68+
kotlin.get() shouldBe "$group:jxbrowser-kotlin:$jxBrowserVersion"
69+
winArm.get() shouldBe "$group:jxbrowser-win64-arm:$jxBrowserVersion"
70+
compose.get() shouldBe "$group:jxbrowser-compose:$jxBrowserVersion"
6871
linux64.get() shouldBe "$group:jxbrowser-linux64:$jxBrowserVersion"
6972
linuxArm.get() shouldBe "$group:jxbrowser-linux64-arm:$jxBrowserVersion"
7073
crossPlatform.get() shouldBe "$group:jxbrowser-cross-platform:$jxBrowserVersion"

0 commit comments

Comments
 (0)