diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 21 |
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}" } } } |