Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test latest badass-jlink #660

Closed
wants to merge 6 commits into from
Closed
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
23 changes: 18 additions & 5 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,27 @@ jobs:
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17.0.9'
distribution: 'liberica'
cache: 'gradle'
- name: Setup badass-jlink-plugin
shell: bash
run: |
git clone --depth=1 https://github.com/beryx/badass-jlink-plugin.git
cd badass-jlink-plugin/
./gradlew shadowJar
mvn install:install-file -Dfile=build/libs/badass-jlink-plugin-3.0.1.jar -DgroupId=org.beryx.jlink -DartifactId=org.beryx.jlink.gradle.plugin -Dversion=3.0.2 -Dpackaging=jar
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Prepare merged jars and modules dir (macOS)
if: (matrix.os == 'macos-latest') || (steps.checksecrets.outputs.secretspresent == 'NO')
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" prepareModulesDir
- name: Setup macOS key chain
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
Expand Down Expand Up @@ -164,21 +177,21 @@ jobs:
--file-associations buildres/mac/bibtexAssociations.properties \
--jlink-options --bind-services
- name: Build runtime image and installer (linux, Windows)
if: (matrix.os != 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os != 'macos-latest') || (steps.checksecrets.outputs.secretspresent != 'YES')
shell: bash
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage jlinkZip
- name: Package application image (linux, Windows)
if: (matrix.os != 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os != 'macos-latest')
shell: bash
run: ${{ matrix.archivePortable }}
- name: Rename files
if: (matrix.os != 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os != 'macos-latest')
shell: pwsh
run: |
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "portable","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-portable"}
- name: Repack deb file for Debian
if: (matrix.os == 'ubuntu-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os == 'ubuntu-latest')
shell: bash
run: |
cd build/distribution
Expand Down
15 changes: 12 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import org.gradle.internal.os.OperatingSystem
import org.jabref.build.xjc.XjcPlugin
import org.jabref.build.xjc.XjcTask

buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath 'org.beryx.jlink:org.beryx.jlink.gradle.plugin:3.0.2'
}
}

plugins {
id 'application'

Expand All @@ -13,8 +22,6 @@ plugins {

id 'org.openjfx.javafxplugin' version '0.1.0'

id 'org.beryx.jlink' version '3.0.0'

// nicer test outputs during running and completion
// Homepage: https://github.com/radarsh/gradle-test-logger-plugin
id 'com.adarshr.test-logger' version '4.0.0'
Expand All @@ -30,6 +37,9 @@ plugins {
id 'org.openrewrite.rewrite' version '6.4.0'
}

apply plugin: 'org.beryx.jlink'


// Enable following for debugging
// gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace.

Expand Down Expand Up @@ -546,7 +556,6 @@ tasks.register('deleteInstallerTemp', Delete) {
}

jpackage.dependsOn deleteInstallerTemp
jlinkZip.dependsOn jpackage
jlink {
addOptions('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages')
launcher {
Expand Down
Loading