aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-01-10 03:23:24 +0100
committer zaaarf <me@zaaarf.foo>2024-01-10 03:23:24 +0100
commit067b2e537deac2d053b0c6b1cfb22e7f191830c7 (patch)
tree2caaf4c4d0a70d45745c9c177fefc1a6e49da43e /build.gradle
parent63cfbaa56ccf67da7b65cf058a68a4b843af5748 (diff)
feat: basic implementation of macro system/Bindings
Co-authored-by: alemi <me@alemi.dev>
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle28
1 files changed, 25 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index 3fda9f1..4ea4e30 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,13 +4,14 @@ plugins {
alias libs.plugins.forgeGradle
alias libs.plugins.gitVersion
alias libs.plugins.checkerFramework
+ alias libs.plugins.shadow
}
version = gitVersion()
group = 'ftbsc'
archivesBaseName = 'bscv'
-def shortVersion = version.split('-')[0].replaceAll(".dirty", "") // necessary when there are no extra commits on tags, and thus no dash
+def shortVersion = (version as String).split('-')[0].replaceAll(".dirty", "")
project.ext {
deployJarDo = getProjectProperty("deployJar.do", "false")
@@ -61,6 +62,9 @@ dependencies {
implementation libs.lillero
implementation libs.lilleroProcessor
implementation libs.autoServiceAnnotations
+ implementation libs.luaJava
+ implementation libs.luaJit
+ runtimeOnly libs.luaNatives.get().toString() + ":natives-desktop" //lol
annotationProcessor libs.lilleroProcessor
annotationProcessor libs.autoService
}
@@ -69,8 +73,19 @@ compileJava { //mappings for lillero-processor
options.compilerArgs << '-AmappingsFile=https://data.fantabos.co/1.16.5.tsrg'
}
+def simpleFileName = "${jar.archiveBaseName.get()}-${shortVersion}.${jar.archiveExtension.get()}"
+
jar {
- archiveFileName = "${jar.archiveBaseName.get()}-${shortVersion}.${jar.archiveExtension.get()}"
+ archiveFileName = simpleFileName
+}
+
+shadowJar {
+ archiveFileName = simpleFileName
+ dependencies {
+ include(dependency {
+ it.moduleGroup == 'party.iroiro.luajava'
+ })
+ }
manifest {
attributes([
"Specification-Title": "bscv",
@@ -84,7 +99,14 @@ jar {
}
}
-jar.finalizedBy('reobfJar')
+reobf {
+ jar {
+ dependsOn shadowJar
+ }
+ shadowJar {
+ dependsOn jar
+ }
+}
//copy jar from build/libs to the forge mod folder
tasks.register('deployJar', Copy) {