[Fix] allow usage of multiple scriptengines by using shadow for the fat jar and merge service files

This commit is contained in:
hartie95 2024-02-02 16:16:20 +01:00
parent 9455d4dbdb
commit 5ad2bc0036
2 changed files with 16 additions and 1 deletions

View File

@ -37,7 +37,7 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle
run: ./gradlew && ./gradlew jar
run: ./gradlew && ./gradlew shadowJar
- name: Upload build
uses: actions/upload-artifact@v3
with:

View File

@ -24,6 +24,8 @@ plugins {
// Apply the java plugin to add support for Java
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
// Apply the protobuf auto generator
id 'com.google.protobuf' version "0.8.18"
@ -129,6 +131,19 @@ application {
getMainClass().set('emu.grasscutter.Grasscutter')
}
shadowJar {
exclude("*.proto")
zip64 = true
duplicatesStrategy = DuplicatesStrategy.INCLUDE
mergeServiceFiles()
archiveBaseName = 'grasscutter'
if (project.hasProperty('jarFilename')) {
archiveFileName = "${jarFilename}.${extension}"
}
destinationDirectory = file(".")
}
jar {
exclude '*.proto'