Update Fabric API version and move versions to properties.
This commit is contained in:
parent
e81a924459
commit
2bc4886cc0
3 changed files with 41 additions and 30 deletions
|
@ -2,8 +2,8 @@ apply plugin: "com.matthewprenger.cursegradle"
|
||||||
|
|
||||||
group = 'RebornCore'
|
group = 'RebornCore'
|
||||||
|
|
||||||
minecraft {
|
loom {
|
||||||
accessWidener = file("src/main/resources/reborncore.accesswidener")
|
accessWidenerPath = file("src/main/resources/reborncore.accesswidener")
|
||||||
}
|
}
|
||||||
def ENV = System.getenv()
|
def ENV = System.getenv()
|
||||||
|
|
||||||
|
|
48
build.gradle
48
build.gradle
|
@ -21,13 +21,6 @@ repositories {
|
||||||
name = "Modmuss50"
|
name = "Modmuss50"
|
||||||
url = "https://maven.modmuss50.me/"
|
url = "https://maven.modmuss50.me/"
|
||||||
}
|
}
|
||||||
maven {
|
|
||||||
name = "BuildCraft"
|
|
||||||
url = "https://mod-buildcraft.com/maven"
|
|
||||||
content {
|
|
||||||
includeGroup "alexiil.mc.lib"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
maven {
|
maven {
|
||||||
url = "https://www.cursemaven.com"
|
url = "https://www.cursemaven.com"
|
||||||
content {
|
content {
|
||||||
|
@ -35,12 +28,14 @@ repositories {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
|
name "DashLoader"
|
||||||
url = "https://maven.oskarstrom.net"
|
url = "https://maven.oskarstrom.net"
|
||||||
content {
|
content {
|
||||||
includeGroup "net.oskarstrom"
|
includeGroup "net.oskarstrom"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
|
name "REI"
|
||||||
url "https://maven.shedaniel.me/"
|
url "https://maven.shedaniel.me/"
|
||||||
content {
|
content {
|
||||||
includeGroup "me.shedaniel"
|
includeGroup "me.shedaniel"
|
||||||
|
@ -51,20 +46,21 @@ repositories {
|
||||||
maven {
|
maven {
|
||||||
url = 'https://ladysnake.jfrog.io/artifactory/mods'
|
url = 'https://ladysnake.jfrog.io/artifactory/mods'
|
||||||
content {
|
content {
|
||||||
|
// Trinkets dependency
|
||||||
includeGroup "io.github.onyxstudios.Cardinal-Components-API"
|
includeGroup "io.github.onyxstudios.Cardinal-Components-API"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
url = "https://jitpack.io"
|
url = "https://jitpack.io"
|
||||||
content {
|
content {
|
||||||
|
// Autoswitch API
|
||||||
includeGroup "com.github.dexman545"
|
includeGroup "com.github.dexman545"
|
||||||
|
// Trinkets API
|
||||||
includeGroup "com.github.emilyploszaj"
|
includeGroup "com.github.emilyploszaj"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
shade
|
shade
|
||||||
compile.extendsFrom shade
|
compile.extendsFrom shade
|
||||||
|
@ -82,9 +78,8 @@ license {
|
||||||
group = 'TechReborn'
|
group = 'TechReborn'
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
version = "5.0.6-beta"
|
|
||||||
def build_number = ENV.BUILD_NUMBER ?: "local"
|
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: "fabric-loom"
|
||||||
apply plugin: "maven-publish"
|
apply plugin: "maven-publish"
|
||||||
|
@ -98,14 +93,14 @@ allprojects {
|
||||||
|
|
||||||
// Shared deps between TR and RC
|
// Shared deps between TR and RC
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:1.17.1"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
mappings "net.fabricmc:yarn:1.17.1+build.23:v2"
|
mappings "net.fabricmc:yarn:${project.yarn_version}"
|
||||||
modImplementation "net.fabricmc:fabric-loader:0.11.6"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
|
||||||
//Fabric api
|
//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 {
|
processResources {
|
||||||
|
@ -154,16 +149,15 @@ allprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TechReborn sepecific deps
|
// TechReborn specific dependencies
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(":RebornCore")
|
api project(":RebornCore")
|
||||||
include project(":RebornCore")
|
include project(":RebornCore")
|
||||||
|
|
||||||
optionalDependency "me.shedaniel:RoughlyEnoughItems-fabric:6.0.267-alpha"
|
optionalDependency "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
|
||||||
disabledOptionalDependency "com.github.emilyploszaj:trinkets:3.0.2"
|
disabledOptionalDependency "com.github.emilyploszaj:trinkets:${project.trinkets_version}"
|
||||||
disabledOptionalDependency "com.github.dexman545:autoswitch-api:-SNAPSHOT"
|
disabledOptionalDependency "com.github.dexman545:autoswitch-api:${project.autoswitch_version}"
|
||||||
disabledOptionalDependency 'net.oskarstrom:DashLoader:2.0'
|
disabledOptionalDependency "net.oskarstrom:DashLoader:${project.dashloader_version}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def optionalDependency(String dep) {
|
def optionalDependency(String dep) {
|
||||||
|
@ -184,7 +178,6 @@ def disabledOptionalDependency(String dep) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
exclude "**/*.psd"
|
exclude "**/*.psd"
|
||||||
classifier = 'universal'
|
classifier = 'universal'
|
||||||
|
@ -195,8 +188,8 @@ jar {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Triggers crowdin to export the latest translations
|
|
||||||
task crowdinExport() {
|
task crowdinExport() {
|
||||||
|
description "Triggers crowdin to export the latest translations"
|
||||||
onlyIf {
|
onlyIf {
|
||||||
ENV.CROWDIN_KEY
|
ENV.CROWDIN_KEY
|
||||||
}
|
}
|
||||||
|
@ -209,19 +202,20 @@ task crowdinExport() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
task crowdin(type: Download, dependsOn: 'crowdinExport'){
|
task crowdin(type: Download, dependsOn: 'crowdinExport'){
|
||||||
|
description "Downloads translations from CrowdIn"
|
||||||
src 'https://crowdin.com/backend/download/project/techreborn.zip'
|
src 'https://crowdin.com/backend/download/project/techreborn.zip'
|
||||||
dest file("build/translations.zip")
|
dest file("build/translations.zip")
|
||||||
overwrite true
|
overwrite true
|
||||||
}
|
}
|
||||||
|
|
||||||
task cleanCrowdin(type: Delete){
|
task cleanCrowdin(type: Delete){
|
||||||
|
description "Delete old translations"
|
||||||
delete 'build/translations'
|
delete 'build/translations'
|
||||||
}
|
}
|
||||||
|
|
||||||
//Renames the translation files to be all lower case
|
|
||||||
task renameCrowdin(type: Copy, dependsOn: ['crowdin', 'cleanCrowdin']){
|
task renameCrowdin(type: Copy, dependsOn: ['crowdin', 'cleanCrowdin']){
|
||||||
|
description "Renames the translation files to be all lower case"
|
||||||
mustRunAfter 'crowdin'
|
mustRunAfter 'crowdin'
|
||||||
from zipTree(file("build/translations.zip"))
|
from zipTree(file("build/translations.zip"))
|
||||||
into file('build/translations')
|
into file('build/translations')
|
||||||
|
@ -236,8 +230,8 @@ task renameCrowdin(type: Copy, dependsOn: ['crowdin', 'cleanCrowdin']){
|
||||||
import groovy.json.JsonSlurper
|
import groovy.json.JsonSlurper
|
||||||
import groovy.json.JsonOutput
|
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']) {
|
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()
|
def jsonSlurper = new JsonSlurper()
|
||||||
doLast {
|
doLast {
|
||||||
file('build/translations').eachFileRecurse(groovy.io.FileType.FILES) {
|
file('build/translations').eachFileRecurse(groovy.io.FileType.FILES) {
|
||||||
|
|
|
@ -1,2 +1,19 @@
|
||||||
# Done to increase the memory available to gradle.
|
# 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
|
Loading…
Reference in a new issue