diff options
-rw-r--r-- | build.gradle | 25 | ||||
-rw-r--r-- | defaults/build.gradle | 19 | ||||
-rw-r--r-- | gradle.properties | 2 |
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 |