Skip to content

Commit

Permalink
Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
RedDragon0293 committed Mar 30, 2024
1 parent 51d0bc0 commit ad7cda6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ jobs:
- name: Build with Gradle Wrapper
run: ./gradlew build

- name: Shadow
run: ./gradlew shadowJar

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
29 changes: 15 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ buildscript {
}
dependencies {
classpath 'io.github.fvarrui:javapackager:1.7.4'
//classpath group: 'com.github.jengelman.gradle.plugins', name: 'shadow', version: '4.0.4'
}
}

plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'java'
id 'application'
id 'org.javamodularity.moduleplugin' version '1.8.12'
id 'org.beryx.jlink' version '2.25.0'
//id 'org.beryx.jlink' version '2.25.0'
id 'org.openjfx.javafxplugin' version '0.1.0'
}

Expand Down Expand Up @@ -78,14 +80,25 @@ tasks.withType(JavaCompile) {

application {
mainModule = 'cn.reddragon.eportal'
mainClass = 'cn.reddragon.eportal.HelloApplication'
mainClass = 'cn.reddragon.eportal.Main'
}

javafx {
version = '17.0.6'
modules = ['javafx.controls', 'javafx.fxml']
}

jar {
manifest {
attributes 'Main-Class': 'cn.reddragon.eportal.Main'
}
}
shadowJar {
archiveClassifier.set('')
archiveVersion.set('')
destinationDirectory.set(file('build/libs/shadow'))
}

dependencies {
implementation('org.controlsfx:controlsfx:11.1.2')
//implementation('io.netty:netty-all:4.1.86.Final')
Expand All @@ -99,15 +112,3 @@ dependencies {
test {
useJUnitPlatform()
}

jlink {
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'app'
}
}

jlinkZip {
group = 'distribution'
}

0 comments on commit ad7cda6

Please sign in to comment.