diff --git a/build.gradle b/build.gradle index 3eb19a269..a4236b539 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1704751096 +//version: 1706545953 /* 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) @@ -632,7 +651,7 @@ repositories { def mixinProviderGroup = "io.github.legacymoddingmc" def mixinProviderModule = "unimixins" -def mixinProviderVersion = "0.1.13" +def mixinProviderVersion = "0.1.15" def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" ext.mixinProviderSpec = mixinProviderSpec diff --git a/dependencies.gradle b/dependencies.gradle index 95acf75e3..bef9bdc0c 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -2,14 +2,14 @@ dependencies { shadowImplementation('com.github.GTNewHorizons:AVRcore:1.0.1') - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.25:dev') + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.53:dev') api('com.github.GTNewHorizons:Yamcl:0.6.0:dev') implementation('com.github.GTNewHorizons:GTNEIOrePlugin:1.2.0:dev') compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.23:deobf") {transitive=false} - compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.11.5-GTNH:dev') {transitive=false} + compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.11.11-GTNH:dev') {transitive=false} compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.6-GTNH:dev') {transitive=false} - compileOnly('com.github.GTNewHorizons:GTplusplus:1.11.13:dev') {transitive=false} + compileOnly('com.github.GTNewHorizons:GTplusplus:1.11.19:dev') {transitive=false} compileOnly('com.github.GTNewHorizons:Avaritia:1.49:dev') {transitive=false} compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false} @@ -17,9 +17,9 @@ dependencies { // for testing EOH recipes //runtimeOnlyNonPublishable("TGregworks:TGregworks:1.7.10-GTNH-1.0.23:deobf") - //runtimeOnlyNonPublishable('com.github.GTNewHorizons:TinkersConstruct:1.11.5-GTNH:dev') - //runtimeOnlyNonPublishable('com.github.GTNewHorizons:NewHorizonsCoreMod:2.3.11:dev') - //runtimeOnlyNonPublishable('com.github.GTNewHorizons:GoodGenerator:0.8.2:dev') { + //runtimeOnlyNonPublishable('com.github.GTNewHorizons:TinkersConstruct:1.11.11-GTNH:dev') + //runtimeOnlyNonPublishable('com.github.GTNewHorizons:NewHorizonsCoreMod:2.3.24:dev') + //runtimeOnlyNonPublishable('com.github.GTNewHorizons:GoodGenerator:0.8.6:dev') { // exclude group: "com.github.GTNewHorizons", module: "TecTech" //} //runtimeOnlyNonPublishable("curse.maven:extra-utilities-225561:2264384") {transitive=false}