From 77a3db80c9f34063d1f26ee5eb536b46f723ced0 Mon Sep 17 00:00:00 2001 From: Daniel V Date: Mon, 10 Jun 2024 22:13:30 -0400 Subject: [PATCH] Shadow jar version update. --- Bukkit/build.gradle.kts | 8 ++ TNIL-Fabric/build.gradle.kts | 1 - TNIL-Fabric/src/main/resources/build.gradle | 89 ------------------- .../src/main/resources/fabric.mod.json | 13 ++- TNIL-Sponge/build.gradle.kts | 8 ++ build.gradle.kts | 2 + gradle.properties | 2 +- 7 files changed, 24 insertions(+), 99 deletions(-) delete mode 100644 TNIL-Fabric/src/main/resources/build.gradle diff --git a/Bukkit/build.gradle.kts b/Bukkit/build.gradle.kts index e59d243..c2114e9 100644 --- a/Bukkit/build.gradle.kts +++ b/Bukkit/build.gradle.kts @@ -21,6 +21,14 @@ tasks { sourceCompatibility = "17" targetCompatibility = "17" } + + shadowJar { + archiveFileName = "TNIL-Bukkit-${project.version}-shadow.jar" + + dependencies { + include(dependency(":TNIL-Core")) + } + } } description = "The New Item Library Bukkit" diff --git a/TNIL-Fabric/build.gradle.kts b/TNIL-Fabric/build.gradle.kts index 0b21938..33436c4 100644 --- a/TNIL-Fabric/build.gradle.kts +++ b/TNIL-Fabric/build.gradle.kts @@ -6,7 +6,6 @@ plugins { } group = property("maven_group")!! -version = property("tnil_version")!! repositories { // Add repositories to retrieve artifacts from in here. diff --git a/TNIL-Fabric/src/main/resources/build.gradle b/TNIL-Fabric/src/main/resources/build.gradle deleted file mode 100644 index a6e9377..0000000 --- a/TNIL-Fabric/src/main/resources/build.gradle +++ /dev/null @@ -1,89 +0,0 @@ -plugins { - id 'fabric-loom' version '1.6-SNAPSHOT' apply true - id 'maven-publish' -} - -version = project.mod_version -group = project.maven_group - -base { - archivesName = project.archives_base_name -} - -repositories { - // Add repositories to retrieve artifacts from in here. - // You should only use this when depending on other mods because - // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. - // See https://docs.gradle.org/current/userguide/declaring_repositories.html - // for more information about repositories. -} - -loom { - splitEnvironmentSourceSets() - - mods { - "tnil-fabric" { - sourceSet sourceSets.main - sourceSet sourceSets.client - } - } - -} - -dependencies { - // To change the versions see the gradle.properties file - minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - implementation project ":TNIL-Core" - - // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - -} - -processResources { - inputs.property "version", project.version - - filesMatching("fabric.mod.json") { - expand "version": project.version - } -} - -tasks.withType(JavaCompile).configureEach { - it.options.release = 21 -} - -java { - // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task - // if it is present. - // If you remove this line, sources will not be generated. - withSourcesJar() - - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 -} - -jar { - from("LICENSE") { - rename { "${it}_${project.base.archivesName.get()}"} - } -} - -// configure the maven publication -publishing { - publications { - create("mavenJava", MavenPublication) { - artifactId = project.archives_base_name - from components.java - } - } - - // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. - repositories { - // Add repositories to publish to here. - // Notice: This block does NOT have the same function as the block in the top level. - // The repositories here will be used for publishing your artifact, not for - // retrieving dependencies. - } -} \ No newline at end of file diff --git a/TNIL-Fabric/src/main/resources/fabric.mod.json b/TNIL-Fabric/src/main/resources/fabric.mod.json index 83d67c8..6ada6ef 100644 --- a/TNIL-Fabric/src/main/resources/fabric.mod.json +++ b/TNIL-Fabric/src/main/resources/fabric.mod.json @@ -3,23 +3,20 @@ "id": "tnil-fabric", "version": "${version}", "name": "TNIL-Fabric", - "description": "This is an example description! Tell everyone what your mod is about!", + "description": "A library used by The New Economy for item-based operations, including calculations, removal, comparisons, and serialization of any items, including potions, shulker boxes, and other \"special\" items.", "authors": [ - "Me!" + "creatorfromhell" ], "contact": { - "homepage": "https://fabricmc.net/", - "sources": "https://github.com/FabricMC/fabric-example-mod" + "homepage": "https://tnemc.net/", + "sources": "https://github.com/TheNewEconomy/TheNewItemLibrary" }, - "license": "CC0-1.0", + "license": "LGPLv3", "icon": "assets/tnil-fabric/icon.png", "environment": "*", "entrypoints": { "main": [ "net.tnemc.item.fabric.TNILFabric" - ], - "client": [ - "net.tnemc.TNILFabricClient" ] }, "mixins": [ diff --git a/TNIL-Sponge/build.gradle.kts b/TNIL-Sponge/build.gradle.kts index e0f41d0..3e5226a 100644 --- a/TNIL-Sponge/build.gradle.kts +++ b/TNIL-Sponge/build.gradle.kts @@ -21,6 +21,14 @@ tasks { sourceCompatibility = "17" targetCompatibility = "17" } + + shadowJar { + archiveFileName = "TNIL-Sponge-${project.version}-shadow.jar" + + dependencies { + include(dependency(":TNIL-Core")) + } + } } description = "The New Item Library Sponge" diff --git a/build.gradle.kts b/build.gradle.kts index 1af45ef..17de58a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,8 @@ subprojects { apply(plugin = "org.cadixdev.licenser") apply(plugin = "maven-publish") + version = property("tnil_version")!! + repositories { mavenCentral() maven("https://maven.fabricmc.net") diff --git a/gradle.properties b/gradle.properties index d9dd169..8099d22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.6+build.3 loader_version=0.15.11 # Mod Properties -tnil_version=1.0.0 +tnil_version=0.1.7.4-Pre-28 maven_group=net.tnemc archives_base_name=tnil-fabric