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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 8
distribution: 'zulu'
java-version: '17'

- name: Run Gradle tasks
run: ./gradlew check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ internal class JxBrowserPluginFunctionalTest {
"jxbrowser-linux64-arm-$jxBrowserVersion.jar",
"jxbrowser-mac-$jxBrowserVersion.jar",
"jxbrowser-mac-arm-$jxBrowserVersion.jar",
"jxbrowser-kotlin-$jxBrowserVersion.jar",
"jxbrowser-compose-$jxBrowserVersion.jar",
"jxbrowser-win64-arm-$jxBrowserVersion.jar",
)
buildFile.writeText(
"""
Expand Down Expand Up @@ -123,57 +126,6 @@ internal class JxBrowserPluginFunctionalTest {
"toCopy"(jxbrowser.win64)
"toCopy"(jxbrowser.linux64)
"toCopy"(jxbrowser.linuxArm)
}

tasks.register<Copy>("$taskName") {
from(configurations.getByName("toCopy"))
into("${libsFolder.toString().replace("\\", "/")}")
}
""".trimIndent(),
)

val result =
GradleRunner
.create()
.withProjectDir(testProjectDir)
.withPluginClasspath()
.withArguments(taskName)
.build()

result.outcome(":$taskName") shouldBe SUCCESS
libsFolder.files() shouldContainExactlyInAnyOrder filesToCheck
}

@Test
fun `download JxBrowser 8 jars`() {
val taskName = "downloadJars"
val jxBrowserVersion = "8.0.0"
val filesToCheck =
listOf(
"jxbrowser-$jxBrowserVersion.jar",
"jxbrowser-kotlin-$jxBrowserVersion.jar",
"jxbrowser-compose-$jxBrowserVersion.jar",
"jxbrowser-win64-arm-$jxBrowserVersion.jar",
)

buildFile.writeText(
"""
plugins {
base
id("com.teamdev.jxbrowser")
}

jxbrowser {
version = "$jxBrowserVersion"
includePreviewBuilds()
}

configurations {
create("toCopy")
}

dependencies {
"toCopy"(jxbrowser.core)
"toCopy"(jxbrowser.kotlin)
"toCopy"(jxbrowser.compose)
"toCopy"(jxbrowser.winArm)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ internal class JxBrowserPluginTest {
win64.get() shouldBe "$group:jxbrowser-win64:$jxBrowserVersion"
javafx.get() shouldBe "$group:jxbrowser-javafx:$jxBrowserVersion"
macArm.get() shouldBe "$group:jxbrowser-mac-arm:$jxBrowserVersion"
kotlin.get() shouldBe "$group:jxbrowser-kotlin:$jxBrowserVersion"
winArm.get() shouldBe "$group:jxbrowser-win64-arm:$jxBrowserVersion"
compose.get() shouldBe "$group:jxbrowser-compose:$jxBrowserVersion"
linux64.get() shouldBe "$group:jxbrowser-linux64:$jxBrowserVersion"
linuxArm.get() shouldBe "$group:jxbrowser-linux64-arm:$jxBrowserVersion"
crossPlatform.get() shouldBe "$group:jxbrowser-cross-platform:$jxBrowserVersion"
Expand Down