diff options
-rw-r--r-- | build.gradle | 89 | ||||
-rw-r--r-- | defaults/build.gradle | 13 | ||||
-rw-r--r-- | defaults/src/main/resources/assets/citresewn-defaults/logo.png | bin | 0 -> 99334 bytes | |||
-rw-r--r-- | defaults/src/main/resources/citresewn-defaults.accesswidener | 1 | ||||
-rw-r--r-- | defaults/src/main/resources/citresewn-defaults.mixins.json | 11 | ||||
-rw-r--r-- | defaults/src/main/resources/fabric.mod.json | 30 | ||||
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | settings.gradle | 2 | ||||
-rw-r--r-- | src/main/resources/citresewn.mixins.json | 2 |
9 files changed, 113 insertions, 37 deletions
diff --git a/build.gradle b/build.gradle index 68337a1..64a0be9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,44 +1,66 @@ plugins { - id 'fabric-loom' version '0.10-SNAPSHOT' + id 'fabric-loom' version '0.10-SNAPSHOT' apply false id 'maven-publish' } version = project.mod_version + "+" + project.minecraft_version group = project.maven_group -repositories { - maven { url "https://maven.shedaniel.me/" } - maven { url "https://maven.terraformersmc.com/releases" } - maven { url "https://cursemaven.com" } -} +allprojects { + apply plugin: "fabric-loom" -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}" + repositories { + maven { url "https://maven.shedaniel.me/" } + maven { url "https://maven.terraformersmc.com/releases" } + maven { url "https://cursemaven.com" } + } + + dependencies { + minecraft "com.mojang:minecraft:${project.minecraft_version}" + mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - modImplementation fabricApi.module("fabric-api-base", "${project.fabric_api}") - modImplementation fabricApi.module("fabric-resource-loader-v0", "${project.fabric_api}") - modImplementation fabricApi.module("fabric-command-api-v1", "${project.fabric_api}") + modImplementation fabricApi.module("fabric-api-base", "${project.fabric_api}") + modImplementation fabricApi.module("fabric-resource-loader-v0", "${project.fabric_api}") + modImplementation fabricApi.module("fabric-command-api-v1", "${project.fabric_api}") - modCompileOnly("com.terraformersmc:modmenu:${project.modmenu}") { - exclude(group: "net.fabricmc.fabric-api") + modCompileOnly("com.terraformersmc:modmenu:${project.modmenu}") { + exclude(group: "net.fabricmc.fabric-api") + } + + modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${project.cloth}") { + exclude(group: "net.fabricmc.fabric-api") + } + + modCompileOnly("curse.maven:cosmeticarmor-436659:${project.cosmetic_armor}") } - modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${project.cloth}") { - exclude(group: "net.fabricmc.fabric-api") + processResources { + inputs.property "version", rootProject.version + filteringCharset "UTF-8" + + filesMatching("fabric.mod.json") { + expand "version": rootProject.version + } } - modCompileOnly("curse.maven:cosmeticarmor-436659:${project.cosmetic_armor}") -} + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 -processResources { - inputs.property "version", project.version - filteringCharset "UTF-8" + java { + archivesBaseName = project.archives_base_name + } + + jar { + archiveClassifier.set "dev" + + from("LICENSE") { + rename { "${it}_${project.archivesBaseName}" } + } + } - filesMatching("fabric.mod.json") { - expand "version": project.version + loom { + shareCaches() } } @@ -46,19 +68,16 @@ loom { accessWidenerPath = file("src/main/resources/citresewn.accesswidener") } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 +dependencies { + afterEvaluate { + include project("defaults:") + } +} java { - archivesBaseName = project.archives_base_name - // 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() } -jar { - from("LICENSE") { - rename { "${it}_${project.archivesBaseName}" } - } +sourcesJar { + from project("defaults:").sourceSets.main.java.srcDirs }
\ No newline at end of file diff --git a/defaults/build.gradle b/defaults/build.gradle new file mode 100644 index 0000000..2e88283 --- /dev/null +++ b/defaults/build.gradle @@ -0,0 +1,13 @@ +archivesBaseName = "citresewn-defaults" + +dependencies { + implementation project(path: ":", configuration: "namedElements") +} + +loom { + accessWidenerPath = file("src/main/resources/citresewn-defaults.accesswidener") + + runConfigs.configureEach { + ideConfigGenerated = true + } +}
\ No newline at end of file diff --git a/defaults/src/main/resources/assets/citresewn-defaults/logo.png b/defaults/src/main/resources/assets/citresewn-defaults/logo.png Binary files differnew file mode 100644 index 0000000..35859ac --- /dev/null +++ b/defaults/src/main/resources/assets/citresewn-defaults/logo.png diff --git a/defaults/src/main/resources/citresewn-defaults.accesswidener b/defaults/src/main/resources/citresewn-defaults.accesswidener new file mode 100644 index 0000000..3fde517 --- /dev/null +++ b/defaults/src/main/resources/citresewn-defaults.accesswidener @@ -0,0 +1 @@ +accessWidener v1 named diff --git a/defaults/src/main/resources/citresewn-defaults.mixins.json b/defaults/src/main/resources/citresewn-defaults.mixins.json new file mode 100644 index 0000000..b5c307d --- /dev/null +++ b/defaults/src/main/resources/citresewn-defaults.mixins.json @@ -0,0 +1,11 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "shcm.shsupercm.fabric.citresewn.defaults.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [ + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/defaults/src/main/resources/fabric.mod.json b/defaults/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..004b7a8 --- /dev/null +++ b/defaults/src/main/resources/fabric.mod.json @@ -0,0 +1,30 @@ +{ + "schemaVersion": 1, + "id": "citresewn-defaults", + "version": "${version}", + "name": "CIT Resewn - Defaults", + "description": "Default types and conditions for CIT Resewn", + "authors": [ + "SHsuperCM" + ], + "license": "MIT", + "icon": "assets/citresewn-defaults/logo.png", + + "environment": "client", + "entrypoints": { + }, + "accessWidener" : "citresewn-defaults.accesswidener", + "mixins": [ + "citresewn-defaults.mixins.json" + ], + "custom": { + "modmenu": { + "parent": { + "id": "citresewn" + } + } + }, + "depends": { + "citresewn": "${version}" + } +} diff --git a/gradle.properties b/gradle.properties index d24d6cd..bc89793 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ cloth=6.1.48 cosmetic_armor=3544655 # Mod Properties -mod_version=0.9.1 +mod_version=rewrite-SNAPSHOT maven_group=shcm.shsupercm.fabric archives_base_name=CITResewn diff --git a/settings.gradle b/settings.gradle index f91a4fe..4ab5170 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,3 +7,5 @@ pluginManagement { gradlePluginPortal() } } + +include 'defaults'
\ No newline at end of file diff --git a/src/main/resources/citresewn.mixins.json b/src/main/resources/citresewn.mixins.json index e32c847..cb275c9 100644 --- a/src/main/resources/citresewn.mixins.json +++ b/src/main/resources/citresewn.mixins.json @@ -2,7 +2,7 @@ "required": true, "minVersion": "0.8", "package": "shcm.shsupercm.fabric.citresewn.mixin", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "plugin": "shcm.shsupercm.fabric.citresewn.config.CITResewnMixinConfiguration", "mixins": [ "broken_paths.AbstractFileResourcePackMixin", |