diff options
author | Roman / Linnea Gräf <roman.graef@gmail.com> | 2023-02-24 15:30:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 23:30:32 +0900 |
commit | b058ca61ff4056a1b301f826a5542dddd71e209d (patch) | |
tree | a419999ea22ba48b9d8814b5fc6ce7c291c51273 | |
parent | f547a84a8d3ae0b9f34ca43caac5039899950fd1 (diff) | |
download | Skyblock-Dungeons-Guide-b058ca61ff4056a1b301f826a5542dddd71e209d.tar.gz Skyblock-Dungeons-Guide-b058ca61ff4056a1b301f826a5542dddd71e209d.tar.bz2 Skyblock-Dungeons-Guide-b058ca61ff4056a1b301f826a5542dddd71e209d.zip |
Optional Signing and Standalone Jar (#332)
* Optional Signing and Standalone Jar
* - devstandalone
Signed-off-by: syeyoung <cyoung06@naver.com>
---------
Signed-off-by: syeyoung <cyoung06@naver.com>
Co-authored-by: syeyoung <cyoung06@naver.com>
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | loader/build.gradle | 33 | ||||
-rw-r--r-- | mod/build.gradle | 20 |
3 files changed, 53 insertions, 2 deletions
diff --git a/gradle.properties b/gradle.properties index 7bb937f6..d59da793 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx2G org.gradle.caching=true loom.platform=forge dg.testwithneu=true -signing.gnupg.keyName=28DC4ACD
\ No newline at end of file +signing.gnupg.keyName=402698B23B99F1D diff --git a/loader/build.gradle b/loader/build.gradle index 6481bde9..621dc88d 100644 --- a/loader/build.gradle +++ b/loader/build.gradle @@ -65,6 +65,12 @@ configurations { transitive = false visible = false } + unmappedMod { + visible = false + } + remappedMod { + visible = false + } } dependencies { minecraft("com.mojang:minecraft:1.8.9") @@ -86,6 +92,9 @@ dependencies { devEnv("me.djtheredstoner:DevAuth-forge-legacy:1.1.0") + + unmappedMod(project(path: ':mod', configuration: 'unmappedMod')) + remappedMod(project(path: ':mod', configuration: 'remappedMod')) } @@ -128,3 +137,27 @@ tasks.named("remapJar") { tasks.assemble.dependsOn tasks.remapJar + +task standaloneConsumerJar(type: Jar) { + archiveClassifier = "standalone" + from(zipTree(tasks.remapJar.archiveFile)) + from(configurations.remappedMod.files) { + rename ".+\\.jar", "mod.jar" + } + doLast { + println(archiveFile.get().asFile) + } +} +task standaloneDevJar(type: Jar) { + archiveClassifier = "devStandalone" + from(zipTree(tasks.shadowJar.archiveFile)) + from(configurations.unmappedMod.files) { + rename ".+\\.jar", "mod.jar" + } + doLast { + println(archiveFile.get().asFile) + } +} + + + diff --git a/mod/build.gradle b/mod/build.gradle index ca9d2054..9a4fc57d 100644 --- a/mod/build.gradle +++ b/mod/build.gradle @@ -21,7 +21,9 @@ sourceSets.main { signing { useGpgCmd() - sign configurations.archives + if (project.findProperty("dg.dosign") == "true"){ + sign configurations.archives + } } repositories { @@ -37,6 +39,15 @@ repositories { configurations { implementation.extendsFrom shadowImpl + + remappedMod { + canBeConsumed = true + canBeResolved = false + } + unmappedMod { + canBeConsumed = true + canBeResolved = false + } } def devenvMod = configurations.create("devenvMod") { @@ -156,3 +167,10 @@ tasks.named("remapJar") { tasks.assemble.dependsOn tasks.remapJar + +artifacts { + remappedMod(tasks.remapJar) + unmappedMod(tasks.shadowJar) +} + + |