Update Fabric API version and move versions to properties.

This commit is contained in:
drcrazy 2021-08-19 13:33:26 +03:00
parent e81a924459
commit 2bc4886cc0
3 changed files with 41 additions and 30 deletions

View file

@ -2,8 +2,8 @@ apply plugin: "com.matthewprenger.cursegradle"
group = 'RebornCore'
minecraft {
accessWidener = file("src/main/resources/reborncore.accesswidener")
loom {
accessWidenerPath = file("src/main/resources/reborncore.accesswidener")
}
def ENV = System.getenv()

View file

@ -21,13 +21,6 @@ repositories {
name = "Modmuss50"
url = "https://maven.modmuss50.me/"
}
maven {
name = "BuildCraft"
url = "https://mod-buildcraft.com/maven"
content {
includeGroup "alexiil.mc.lib"
}
}
maven {
url = "https://www.cursemaven.com"
content {
@ -35,12 +28,14 @@ repositories {
}
}
maven {
name "DashLoader"
url = "https://maven.oskarstrom.net"
content {
includeGroup "net.oskarstrom"
}
}
maven {
name "REI"
url "https://maven.shedaniel.me/"
content {
includeGroup "me.shedaniel"
@ -51,20 +46,21 @@ repositories {
maven {
url = 'https://ladysnake.jfrog.io/artifactory/mods'
content {
// Trinkets dependency
includeGroup "io.github.onyxstudios.Cardinal-Components-API"
}
}
maven {
url = "https://jitpack.io"
content {
// Autoswitch API
includeGroup "com.github.dexman545"
// Trinkets API
includeGroup "com.github.emilyploszaj"
}
}
}
configurations {
shade
compile.extendsFrom shade
@ -82,9 +78,8 @@ license {
group = 'TechReborn'
allprojects {
version = "5.0.6-beta"
def build_number = ENV.BUILD_NUMBER ?: "local"
version = "${version}+build.$build_number"
version = "project.$mod_version+build.$build_number"
apply plugin: "fabric-loom"
apply plugin: "maven-publish"
@ -98,14 +93,14 @@ allprojects {
// Shared deps between TR and RC
dependencies {
minecraft "com.mojang:minecraft:1.17.1"
mappings "net.fabricmc:yarn:1.17.1+build.23:v2"
modImplementation "net.fabricmc:fabric-loader:0.11.6"
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_version}"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
//Fabric api
modImplementation "net.fabricmc.fabric-api:fabric-api:0.37.0+1.17"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fapi_version}"
include(modApi('teamreborn:energy:0.1.1'))
include(modApi("teamreborn:energy:${project.energy_version}"))
}
processResources {
@ -154,16 +149,15 @@ allprojects {
}
}
// TechReborn sepecific deps
// TechReborn specific dependencies
dependencies {
api project(":RebornCore")
include project(":RebornCore")
optionalDependency "me.shedaniel:RoughlyEnoughItems-fabric:6.0.267-alpha"
disabledOptionalDependency "com.github.emilyploszaj:trinkets:3.0.2"
disabledOptionalDependency "com.github.dexman545:autoswitch-api:-SNAPSHOT"
disabledOptionalDependency 'net.oskarstrom:DashLoader:2.0'
optionalDependency "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
disabledOptionalDependency "com.github.emilyploszaj:trinkets:${project.trinkets_version}"
disabledOptionalDependency "com.github.dexman545:autoswitch-api:${project.autoswitch_version}"
disabledOptionalDependency "net.oskarstrom:DashLoader:${project.dashloader_version}"
}
def optionalDependency(String dep) {
@ -184,7 +178,6 @@ def disabledOptionalDependency(String dep) {
}
}
jar {
exclude "**/*.psd"
classifier = 'universal'
@ -195,8 +188,8 @@ jar {
}
//Triggers crowdin to export the latest translations
task crowdinExport() {
description "Triggers crowdin to export the latest translations"
onlyIf {
ENV.CROWDIN_KEY
}
@ -209,19 +202,20 @@ task crowdinExport() {
}
}
task crowdin(type: Download, dependsOn: 'crowdinExport'){
description "Downloads translations from CrowdIn"
src 'https://crowdin.com/backend/download/project/techreborn.zip'
dest file("build/translations.zip")
overwrite true
}
task cleanCrowdin(type: Delete){
description "Delete old translations"
delete 'build/translations'
}
//Renames the translation files to be all lower case
task renameCrowdin(type: Copy, dependsOn: ['crowdin', 'cleanCrowdin']){
description "Renames the translation files to be all lower case"
mustRunAfter 'crowdin'
from zipTree(file("build/translations.zip"))
into file('build/translations')
@ -236,8 +230,8 @@ task renameCrowdin(type: Copy, dependsOn: ['crowdin', 'cleanCrowdin']){
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
//Remove all translations that do not have an entry, ensures that minecraft falls back to EN_US over writing out an empty string.
task fixTranslations(dependsOn: ['renameCrowdin']) {
description "Remove all translations that do not have an entry, ensures that minecraft falls back to EN_US over writing out an empty string"
def jsonSlurper = new JsonSlurper()
doLast {
file('build/translations').eachFileRecurse(groovy.io.FileType.FILES) {

View file

@ -1,2 +1,19 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx2G
org.gradle.jvmargs=-Xmx2G
# Mod properties
mod_version=5.0.6-beta
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.17.1
yarn_version=1.17.1+build.23:v2
loader_version=0.11.6
fapi_version=0.38.0+1.17
# Dependencies
energy_version=0.1.1
rei_version=6.0.267-alpha
trinkets_version=3.0.2
autoswitch_version=-SNAPSHOT
dashloader_version=2.0