aboutsummaryrefslogtreecommitdiff
path: root/defaults
diff options
context:
space:
mode:
Diffstat (limited to 'defaults')
-rw-r--r--defaults/build.gradle85
-rw-r--r--defaults/src/main/resources/fabric.mod.json4
-rw-r--r--defaults/stonecutter.gradle3
-rw-r--r--defaults/versions/1.20.1/gradle.properties6
4 files changed, 78 insertions, 20 deletions
diff --git a/defaults/build.gradle b/defaults/build.gradle
index fe1691f..1619154 100644
--- a/defaults/build.gradle
+++ b/defaults/build.gradle
@@ -1,30 +1,79 @@
-apply plugin: 'com.modrinth.minotaur'
+plugins {
+ id 'fabric-loom' version '1.2-SNAPSHOT'
+ id 'io.shcm.shsupercm.fabric.fletchingtable' version '1.6'
+}
+
+version = "${property('mod.version')}+${stonecutter.current().version()}"
+group = 'shcm.shsupercm.fabric.citresewn.defaults'
-archivesBaseName = "citresewn-defaults"
+repositories {
+ maven { url 'https://maven.terraformersmc.com/releases/' }
+ maven { url 'https://maven.shedaniel.me/' }
+}
dependencies {
- implementation project(path: ":", configuration: "namedElements")
+ minecraft "com.mojang:minecraft:${stonecutter.current().version()}"
+ mappings "net.fabricmc:yarn:${property('deps.yarn')}:v2"
+
+ modImplementation "net.fabricmc:fabric-loader:${property('deps.fabric-loader')}"
+ modImplementation "net.fabricmc.fabric-api:fabric-api:${property('deps.fabric-api')}"
+
+ modImplementation "com.terraformersmc:modmenu:${property('deps.modmenu')}"
+ modImplementation "me.shedaniel.cloth:cloth-config-fabric:${property('deps.cloth-config')}"
+
+ implementation project(path: ":${stonecutter.current().version()}", configuration: "namedElements")
}
-java {
- withSourcesJar()
+fletchingTable {
+ defaultMixinEnvironment = "auto"
}
loom {
- accessWidenerPath = file("src/main/resources/citresewn-defaults.accesswidener")
+ accessWidenerPath = file("../../src/main/resources/citresewn-defaults.accesswidener")
- runConfigs.configureEach {
- ideConfigGenerated = true
- }
+ runConfigs.configureEach {
+ ideConfigGenerated = true
+ }
}
-modrinth {
- token = TOKEN_MODRINTH
- projectId = "meHXjJBu"
- uploadFile = remapJar
- versionNumber = version
- versionName = "v" + version
- additionalFiles = [ sourcesJar.outputs.getFiles().singleFile ]
- gameVersions = Arrays.asList(rootProject.publish_minecraft_versions.split(","))
+java {
+ //withSourcesJar()
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+
+ archivesBaseName = "${property('mod.jarname')}-defaults"
+}
+
+processResources {
+ filesMatching('fabric.mod.json') {
+ expand 'mod_version': version
+ }
+}
+
+jar {
+ archiveClassifier.set 'dev'
+
+ from rootProject.file('LICENSE')
+}
+
+if (stonecutter.current().isActiveVersion()) {
+ plugins.apply 'com.modrinth.minotaur'
+
+ modrinth {
+ token = TOKEN_MODRINTH
+ projectId = 'meHXjJBu'
+ uploadFile = remapJar
+ versionNumber = version
+ versionName = "v" + version
+ //additionalFiles = [sourcesJar.outputs.getFiles().singleFile]
+ gameVersions = Arrays.asList(property('mod.target-mc-publish').split(","))
+ }
+
+ rootProject.tasks.named('publish') {
+ Task remapJarTask = tasks.getByName 'remapJar'
+ Task modrinthTask = tasks.getByName 'modrinth'
+
+ dependsOn remapJarTask, modrinthTask
+ modrinthTask.mustRunAfter remapJarTask
+ }
}
-tasks.getByName("modrinth").mustRunAfter(rootProject.tasks.getByName("modrinth")) \ No newline at end of file
diff --git a/defaults/src/main/resources/fabric.mod.json b/defaults/src/main/resources/fabric.mod.json
index 032c31b..d8522aa 100644
--- a/defaults/src/main/resources/fabric.mod.json
+++ b/defaults/src/main/resources/fabric.mod.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "citresewn-defaults",
- "version": "${version}",
+ "version": "${mod_version}",
"name": "CIT Resewn: Defaults",
"description": "Default types and conditions for CIT Resewn",
"authors": [
@@ -28,7 +28,7 @@
}
},
"depends": {
- "citresewn": "${version}"
+ "citresewn": "${mod_version}"
},
"conflicts": {
"eatinganimationid": "<1.9"
diff --git a/defaults/stonecutter.gradle b/defaults/stonecutter.gradle
new file mode 100644
index 0000000..fa6231a
--- /dev/null
+++ b/defaults/stonecutter.gradle
@@ -0,0 +1,3 @@
+plugins.apply 'io.shcm.shsupercm.fabric.stonecutter'
+stonecutter.active '1.20.1'
+//-------- !DO NOT EDIT ABOVE THIS LINE! --------\\
diff --git a/defaults/versions/1.20.1/gradle.properties b/defaults/versions/1.20.1/gradle.properties
new file mode 100644
index 0000000..da06dfe
--- /dev/null
+++ b/defaults/versions/1.20.1/gradle.properties
@@ -0,0 +1,6 @@
+mod.target-mc=~1.20
+mod.target-mc-publish=1.20,1.20.1
+deps.yarn=1.20.1+build.2
+deps.fabric-api=0.83.1+1.20.1
+deps.modmenu=7.1.0
+deps.cloth-config=11.0.99 \ No newline at end of file