aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2022-08-26 15:52:06 +0300
committerSHsuperCM <shsupercm@gmail.com>2022-08-26 15:52:06 +0300
commit65db3830e98c5d00186330e2f89345b11a3296b7 (patch)
treeaf04570269c19600c8ce1918216dc52d990f0838
parent12e9d7e67941f119cc1d6ac85c5923fecfcae012 (diff)
downloadCITResewn-65db3830e98c5d00186330e2f89345b11a3296b7.tar.gz
CITResewn-65db3830e98c5d00186330e2f89345b11a3296b7.tar.bz2
CITResewn-65db3830e98c5d00186330e2f89345b11a3296b7.zip
Made merged publish task & added defaults publish
Closes #171 Should also fix #179 in future versions
-rw-r--r--build.gradle25
-rw-r--r--defaults/build.gradle19
-rw-r--r--gradle.properties2
3 files changed, 33 insertions, 13 deletions
diff --git a/build.gradle b/build.gradle
index f4c6c70..81f6b2a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,13 +7,13 @@ plugins {
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
}
-version = project.mod_version + "+" + project.minecraft_version
-group = project.maven_group
-
allprojects {
apply plugin: "fabric-loom"
apply plugin: "io.shcm.shsupercm.fabric.fletchingtable"
+ 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" }
@@ -25,7 +25,7 @@ allprojects {
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
- fletchingTable.fungible "1.2+mc1.19.2"
+ fletchingTable.fungible project.fungible
modImplementation fabricApi.module("fabric-api-base", "${project.fabric_api}")
modImplementation fabricApi.module("fabric-resource-loader-v0", "${project.fabric_api}")
@@ -90,10 +90,6 @@ java {
withSourcesJar()
}
-sourcesJar {
- from project("defaults:").sourceSets.main.java.srcDirs
-}
-
modrinth {
token = TOKEN_MODRINTH
projectId = "otVJckYQ"
@@ -102,7 +98,7 @@ modrinth {
versionNumber = version
versionName = "v" + version
additionalFiles = [ sourcesJar.outputs.getFiles().singleFile ]
- gameVersions = ["1.19", "1.19", "1.19.2"]
+ gameVersions = Arrays.asList(project.publish_minecraft_versions.split(","))
}
curseforge {
@@ -116,11 +112,16 @@ curseforge {
displayName = "v" + version
}
addGameVersion 'Fabric'
- addGameVersion '1.19'
- addGameVersion '1.19.1'
- addGameVersion '1.19.2'
+ for (String version : project.publish_minecraft_versions.split(","))
+ addGameVersion version
}
options {
forgeGradleIntegration = false
}
+}
+
+task publishVersion {
+ dependsOn 'remapJar', 'curseforge', 'modrinth', ':defaults:modrinth'
+ tasks.getByName("curseforge").mustRunAfter("remapJar")
+ tasks.getByName("modrinth").mustRunAfter("remapJar")
} \ No newline at end of file
diff --git a/defaults/build.gradle b/defaults/build.gradle
index 2e88283..fe1691f 100644
--- a/defaults/build.gradle
+++ b/defaults/build.gradle
@@ -1,13 +1,30 @@
+apply plugin: 'com.modrinth.minotaur'
+
archivesBaseName = "citresewn-defaults"
dependencies {
implementation project(path: ":", configuration: "namedElements")
}
+java {
+ withSourcesJar()
+}
+
loom {
accessWidenerPath = file("src/main/resources/citresewn-defaults.accesswidener")
runConfigs.configureEach {
ideConfigGenerated = true
}
-} \ No newline at end of file
+}
+
+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(","))
+}
+tasks.getByName("modrinth").mustRunAfter(rootProject.tasks.getByName("modrinth")) \ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 871fd33..f466c1f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,8 +4,10 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19.2
+publish_minecraft_versions=1.19,1.19.1,1.19.2
yarn_mappings=1.19.2+build.8
loader_version=0.14.9
+fungible=1.2+mc1.19.2
fabric_api=0.60.0+1.19.2
modmenu=4.0.6