From 5ed36b7278bcbb58364245eef4be5a44fabb8e50 Mon Sep 17 00:00:00 2001 From: Andres Almiray Date: Sun, 2 May 2021 20:56:01 +0200 Subject: [PATCH] [ikonli-browser] Add jlink configuration --- apps/ikonli-browser/ikonli-browser.gradle | 22 ++++------------------ build.gradle | 4 +--- gradle.properties | 1 + settings.gradle | 1 + 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/apps/ikonli-browser/ikonli-browser.gradle b/apps/ikonli-browser/ikonli-browser.gradle index dfa7b6f6c..8ab36edb2 100644 --- a/apps/ikonli-browser/ikonli-browser.gradle +++ b/apps/ikonli-browser/ikonli-browser.gradle @@ -17,13 +17,13 @@ */ plugins { id 'application' - // id 'com.github.johnrengelman.shadow' version '6.1.0' + id 'org.beryx.jlink' } ext.moduleName = 'org.kordamp.ikonli.browser' ext.moduleMainClass = 'org.kordamp.ikonli.browser.Launcher' -// mainClassName = "${moduleName}/${moduleMainClass}" +//mainClassName = "${moduleName}/${moduleMainClass}" mainClassName = moduleMainClass repositories { @@ -140,10 +140,8 @@ distTar { archiveClassifier = osdetector.os } -/* jlink { - imageDir = project.layout.buildDirectory.dir("ikonli-browser-${version}-${platform}".toString()) - imageZip = project.layout.buildDirectory.file("ikonli-browser-${version}-${platform}.zip".toString()) + imageName = "ikonli-browser-standalone-${version}-${platform}".toString() options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] launcher { name = 'ikonli-browser' @@ -151,17 +149,5 @@ jlink { } addExtraDependencies('javafx') } -*/ -/* -shadowJar { - archiveClassifier = platform - mergeServiceFiles() - exclude 'module-info.class' - exclude 'META-INF/maven/**' - - manifest { - attributes('Main-Class': moduleMainClass) - } -} - */ \ No newline at end of file +assemble.dependsOn(jlinkZip) \ No newline at end of file diff --git a/build.gradle b/build.gradle index eabf6a57e..17c868aa3 100644 --- a/build.gradle +++ b/build.gradle @@ -132,6 +132,4 @@ project.rootProject.gradle.addBuildListener(new BuildAdapter() { } } } -}) - -new File('VERSION').text = project.version \ No newline at end of file +}) \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1dca22705..2fedf5748 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,6 +30,7 @@ kordampBuildVersion = 2.4.0 gitPluginVersion = 3.0.0 modularityPluginVersion = 1.8.2 java9cPluginVersion = 0.2.3 +jlinkPluginVersion = 2.21.1 miglayoutVersion = 11.0 rxjavaVersion = 3.0.12 diff --git a/settings.gradle b/settings.gradle index 6ab0fe507..a43e5d8ea 100644 --- a/settings.gradle +++ b/settings.gradle @@ -28,6 +28,7 @@ pluginManagement { id 'com.google.osdetector' version osPluginVersion id 'org.jonnyzzz.java9c' version java9cPluginVersion id 'org.javamodularity.moduleplugin' version modularityPluginVersion + id 'org.beryx.jlink' version jlinkPluginVersion } }