diff --git a/build.gradle b/build.gradle index 3eb19a2..6274cb2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1704751096 +//version: 1705357285 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -122,6 +122,7 @@ propertyDefaultIfUnset("modrinthProjectId", "") propertyDefaultIfUnset("modrinthRelations", "") propertyDefaultIfUnset("curseForgeProjectId", "") propertyDefaultIfUnset("curseForgeRelations", "") +propertyDefaultIfUnset("versionPattern", "") propertyDefaultIfUnset("minimizeShadowedDependencies", true) propertyDefaultIfUnset("relocateShadowedDependencies", true) // Deprecated properties (kept for backwards compat) @@ -370,6 +371,7 @@ catch (Exception ignored) { // Pulls version first from the VERSION env and then git tag String identifiedVersion String versionOverride = System.getenv("VERSION") ?: null +boolean checkVersion = false try { // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty if (versionOverride == null) { @@ -388,6 +390,8 @@ try { } } else if (isDirty) { identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty" + } else { + checkVersion = true } } else { identifiedVersion = versionOverride @@ -409,6 +413,8 @@ ext { if (identifiedVersion == versionOverride) { out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7') +} else if (checkVersion && versionPattern && !(identifiedVersion ==~ versionPattern)) { + throw new GradleException("Invalid version: '$identifiedVersion' does not match version pattern '$versionPattern'") } group = "com.github.GTNewHorizons" @@ -428,18 +434,31 @@ minecraft { for (f in replaceGradleTokenInFile.split(',')) { tagReplacementFiles.add f } + out.style(Style.Info).text('replaceGradleTokenInFile is deprecated! Consider using generateGradleTokenClass.').println() } if (gradleTokenModId) { - injectedTags.put gradleTokenModId, modId + if (replaceGradleTokenInFile) { + injectedTags.put gradleTokenModId, modId + } else { + out.style(Style.Failure).text('gradleTokenModId is deprecated! The field will no longer be generated.').println() + } } if (gradleTokenModName) { - injectedTags.put gradleTokenModName, modName + if (replaceGradleTokenInFile) { + injectedTags.put gradleTokenModName, modName + } else { + out.style(Style.Failure).text('gradleTokenModName is deprecated! The field will no longer be generated.').println() + } } if (gradleTokenVersion) { injectedTags.put gradleTokenVersion, modVersion } if (gradleTokenGroupName) { - injectedTags.put gradleTokenGroupName, modGroup + if (replaceGradleTokenInFile) { + injectedTags.put gradleTokenGroupName, modGroup + } else { + out.style(Style.Failure).text('gradleTokenGroupName is deprecated! The field will no longer be generated.').println() + } } if (enableGenericInjection.toBoolean()) { injectMissingGenerics.set(true) diff --git a/dependencies.gradle b/dependencies.gradle index 5ccddf5..b58e546 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,24 +1,24 @@ dependencies { - api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-310-GTNH:dev") + api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-312-GTNH:dev") api("com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev") implementation("com.github.GTNewHorizons:Baubles:1.0.4:dev") implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.0:dev") - compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.11-gtnh:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.13-gtnh:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.7.0-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:BuildCraftCompat:7.1.17:dev") { transitive = false } - compileOnly('com.github.GTNewHorizons:EnderIO:2.6.3:dev') { transitive=false } + compileOnly('com.github.GTNewHorizons:EnderIO:2.6.4:dev') { transitive=false } compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.2:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.25:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.1-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.11-gtnh:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.47:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.2-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.13-gtnh:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.7.0-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:BuildCraftCompat:7.1.17:dev") { transitive = false } - compileOnly('com.github.GTNewHorizons:EnderIO:2.6.3:dev') {transitive=false} + compileOnly('com.github.GTNewHorizons:EnderIO:2.6.4:dev') {transitive=false} compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.2:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:GTplusplus:1.11.13:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.1-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Botania:1.10.4-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:GTplusplus:1.11.19:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.2-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Botania:1.10.5-GTNH:dev") { transitive = false } compileOnly("com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev") { transitive = false } compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913") { transitive = false } compileOnly("curse.maven:thermal-expansion-69163:2388759") { transitive = false }