summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorKeuin <[email protected]>2024-01-20 12:44:17 +0800
committerKeuin <[email protected]>2024-01-20 13:02:22 +0800
commit6d53613a57d542a424d6368cb91c69dfd5c6772e (patch)
tree640510455e37cc32064da5c495256b4c0f912744 /build.gradle
parent6087003104bcc21a66bc3534b5606b999acf95db (diff)
add plugin-wide config; enable CoW through config file
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle21
1 files changed, 20 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle
index 67b3e86..22bac88 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,7 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
+ id 'com.github.johnrengelman.shadow' version '7.1.2'
}
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -20,6 +21,20 @@ repositories {
// for more information about repositories.
}
+shadowJar {
+ configurations = [project.configurations.shadow]
+
+ // mitigate log4j security problem
+ exclude 'org/apache/logging/log4j/core/lookup/JndiLookup.class'
+ exclude 'META-INF'
+}
+
+remapJar {
+ dependsOn(shadowJar)
+ mustRunAfter(shadowJar)
+ inputFile = tasks.shadowJar.archiveFile
+}
+
dependencies {
implementation 'junit:junit:4.13.2'
@@ -31,6 +46,10 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
+ // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
+ modImplementation 'com.fasterxml.jackson.core:jackson-databind:2.16.1'
+ shadow 'com.fasterxml.jackson.core:jackson-databind:2.16.1'
+
// Uncomment the following line to enable the deprecated Fabric API modules.
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
@@ -54,7 +73,7 @@ java {
jar {
from("LICENSE") {
- rename { "${it}_${project.archivesBaseName}"}
+ rename { "${it}_${project.archivesBaseName}" }
}
}