From 09af9fccb58b5bdcd0b44f3f463e78eaa2e0fde8 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Sat, 11 May 2024 14:25:19 +0300 Subject: [PATCH] convert img-ui build.gradle to Kotlin DSL --- img-ui/build.gradle | 71 ----------------------------------------- img-ui/build.gradle.kts | 69 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 71 deletions(-) delete mode 100644 img-ui/build.gradle create mode 100644 img-ui/build.gradle.kts diff --git a/img-ui/build.gradle b/img-ui/build.gradle deleted file mode 100644 index 5d50bdd..0000000 --- a/img-ui/build.gradle +++ /dev/null @@ -1,71 +0,0 @@ -plugins { - id 'java' - id 'application' - id 'org.jetbrains.kotlin.jvm' version '1.8.22' - id 'org.javamodularity.moduleplugin' version '1.8.12' - id 'org.openjfx.javafxplugin' version '0.0.13' - id 'org.beryx.jlink' version '2.25.0' -} - -group 'com.nuculabs.dev' -version '1.3' - -repositories { - mavenCentral() -} - -ext { - junitVersion = '5.10.0' -} - - -tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' -} - -application { - mainModule = 'dev.nuculabs.imagetagger.ui' - mainClass = 'dev.nuculabs.imagetagger.ui.MainPage' -} -kotlin { - jvmToolchain(17) -} - -javafx { - version = '21' - modules = ['javafx.controls', 'javafx.fxml'] -} - -dependencies { - implementation(project(":img-ai")) - implementation(project(":img-core")) - implementation('org.controlsfx:controlsfx:11.1.2') - implementation('com.dlsc.formsfx:formsfx-core:11.6.0') { - exclude(group: 'org.openjfx') - } - implementation('net.synedra:validatorfx:0.4.0') { - exclude(group: 'org.openjfx') - } - implementation('org.kordamp.ikonli:ikonli-javafx:12.3.1') - implementation('org.kordamp.ikonli:ikonli-fontawesome5-pack:12.3.1') - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1-Beta") - implementation("org.apache.commons:commons-lang3:3.14.0") - testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") -} - -test { - useJUnitPlatform() -} - -jlink { - imageZip = project.file("${buildDir}/distributions/ImageTagger-${javafx.platform.classifier}.zip") - options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] - launcher { - name = 'ImageTagger' - } -} - -jlinkZip { - group = 'distribution' -} \ No newline at end of file diff --git a/img-ui/build.gradle.kts b/img-ui/build.gradle.kts new file mode 100644 index 0000000..048b5f7 --- /dev/null +++ b/img-ui/build.gradle.kts @@ -0,0 +1,69 @@ + +plugins { + id("java") + id("application") + id("org.jetbrains.kotlin.jvm") version "1.8.22" + id("org.javamodularity.moduleplugin") version "1.8.12" + id("org.openjfx.javafxplugin") version "0.0.13" + id("org.beryx.jlink") version "2.25.0" +} + +group "com.nuculabs.dev" +version "1.3" + +repositories { + mavenCentral() +} + + +tasks.withType(JavaCompile::class.java) { + options.encoding = "UTF-8" +} + +application { + mainModule = "dev.nuculabs.imagetagger.ui" + mainClass = "dev.nuculabs.imagetagger.ui.MainPage" +} + +kotlin { + jvmToolchain(17) +} + +javafx { + version = "21" + modules = listOf("javafx.controls", "javafx.fxml") +} + +dependencies { + implementation(project(":img-ai")) + implementation(project(":img-core")) + implementation("org.controlsfx:controlsfx:11.1.2") + implementation("com.dlsc.formsfx:formsfx-core:11.6.0") { + exclude("org.openjfx") + } + implementation("net.synedra:validatorfx:0.4.0") { + exclude("org.openjfx") + } + implementation("org.kordamp.ikonli:ikonli-javafx:12.3.1") + implementation("org.kordamp.ikonli:ikonli-fontawesome5-pack:12.3.1") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1-Beta") + implementation("org.apache.commons:commons-lang3:3.14.0") + testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") +} + +tasks.test { + useJUnitPlatform() +} + +jlink { + imageZip = project.file("${layout.buildDirectory}/distributions/ImageTagger-${javafx.platform.classifier}.zip") + options = listOf("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages") + launcher { + name = "ImageTagger" + } +} + +tasks.jlinkZip { + group = "distribution" +} \ No newline at end of file