mirror of
https://github.com/GTNewHorizons/Eternal-Singularity.git
synced 2026-10-26 14:23:50 +00:00
update bs+sa
This commit is contained in:
4 files changed
+170
-45
No files matched your search
+167
-42
@@ -1,4 +1,4 @@
|
||||
//version: 1675859611
|
||||
//version: 1680120787
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
@@ -9,6 +9,7 @@
|
||||
import com.diffplug.blowdryer.Blowdryer
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.gtnewhorizons.retrofuturagradle.ObfuscationAttribute
|
||||
import com.gtnewhorizons.retrofuturagradle.mcp.ReobfuscatedJar
|
||||
import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask
|
||||
import com.matthewprenger.cursegradle.CurseArtifact
|
||||
@@ -19,6 +20,7 @@ import cpw.mods.fml.relauncher.Side
|
||||
import org.gradle.api.tasks.options.Option;
|
||||
import org.gradle.internal.logging.text.StyledTextOutput.Style
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||
import org.gradle.internal.xml.XmlTransformer
|
||||
import org.jetbrains.gradle.ext.*
|
||||
|
||||
import java.nio.file.Files
|
||||
@@ -30,7 +32,6 @@ import javax.inject.Inject
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
|
||||
maven {
|
||||
@@ -51,6 +52,8 @@ buildscript {
|
||||
name 'Scala CI dependencies'
|
||||
url 'https://repo1.maven.org/maven2/'
|
||||
}
|
||||
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
@@ -62,7 +65,7 @@ plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
|
||||
id 'org.jetbrains.kotlin.kapt' version '1.8.0' apply false
|
||||
id 'com.google.devtools.ksp' version '1.8.0-1.0.9' apply false
|
||||
id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version ,unused, available for addon.gradle
|
||||
id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle
|
||||
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
|
||||
id 'com.palantir.git-version' version '0.13.0' apply false // 0.13.0 is the last jvm8 supporting version
|
||||
id 'de.undercouch.download' version '5.3.0'
|
||||
@@ -70,7 +73,7 @@ plugins {
|
||||
id 'com.diffplug.spotless' version '6.7.2' apply false
|
||||
id 'com.modrinth.minotaur' version '2.+' apply false
|
||||
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
|
||||
id 'com.gtnewhorizons.retrofuturagradle' version '1.1.5'
|
||||
id 'com.gtnewhorizons.retrofuturagradle' version '1.2.4'
|
||||
}
|
||||
boolean settingsupdated = verifySettingsGradle()
|
||||
settingsupdated = verifyGitAttributes() || settingsupdated
|
||||
@@ -126,6 +129,9 @@ propertyDefaultIfUnset("gradleTokenGroupName", "")
|
||||
propertyDefaultIfUnset("enableModernJavaSyntax", false) // On by default for new projects only
|
||||
propertyDefaultIfUnset("enableGenericInjection", false) // On by default for new projects only
|
||||
|
||||
// this is meant to be set using the user wide property file. by default we do nothing.
|
||||
propertyDefaultIfUnset("ideaOverrideBuildType", "") // Can be nothing, "gradle" or "idea"
|
||||
|
||||
project.extensions.add(Blowdryer, "Blowdryer", Blowdryer) // Make blowdryer available in "apply from:" scripts
|
||||
if (!disableSpotless) {
|
||||
apply plugin: 'com.diffplug.spotless'
|
||||
@@ -147,13 +153,21 @@ java {
|
||||
} else {
|
||||
languageVersion.set(projectJavaVersion)
|
||||
}
|
||||
vendor.set(JvmVendorSpec.ADOPTIUM)
|
||||
vendor.set(JvmVendorSpec.AZUL)
|
||||
}
|
||||
if (!noPublishedSources) {
|
||||
withSourcesJar()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
tasks.withType(ScalaCompile).configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
pluginManager.withPlugin('org.jetbrains.kotlin.jvm') {
|
||||
// If Kotlin is enabled in the project
|
||||
kotlin {
|
||||
@@ -216,7 +230,7 @@ if (enableModernJavaSyntax.toBoolean()) {
|
||||
|
||||
javaCompiler.set(javaToolchains.compilerFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
vendor.set(JvmVendorSpec.ADOPTIUM)
|
||||
vendor.set(JvmVendorSpec.AZUL)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -248,12 +262,14 @@ if (apiPackage) {
|
||||
}
|
||||
|
||||
if (accessTransformersFile) {
|
||||
String targetFile = "src/main/resources/META-INF/" + accessTransformersFile
|
||||
if (!getFile(targetFile).exists()) {
|
||||
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
|
||||
for (atFile in accessTransformersFile.split(",")) {
|
||||
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
|
||||
if (!getFile(targetFile).exists()) {
|
||||
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
|
||||
}
|
||||
tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile)
|
||||
tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile)
|
||||
}
|
||||
tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile)
|
||||
tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile)
|
||||
} else {
|
||||
boolean atsFound = false
|
||||
for (File at : sourceSets.getByName("main").resources.files) {
|
||||
@@ -381,12 +397,14 @@ minecraft {
|
||||
injectMissingGenerics.set(true)
|
||||
}
|
||||
|
||||
username = developmentEnvironmentUserName.toString()
|
||||
|
||||
lwjgl3Version = "3.3.2-SNAPSHOT"
|
||||
|
||||
// Enable assertions in the current mod
|
||||
extraRunJvmArguments.add("-ea:${modGroup}")
|
||||
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
extraTweakClasses.add("org.spongepowered.asm.launch.MixinTweaker")
|
||||
|
||||
if (usesMixinDebug.toBoolean()) {
|
||||
extraRunJvmArguments.addAll([
|
||||
"-Dmixin.debug.countInjections=true",
|
||||
@@ -415,6 +433,16 @@ configurations.configureEach {
|
||||
}
|
||||
}
|
||||
}
|
||||
def obfuscationAttr = it.attributes.getAttribute(ObfuscationAttribute.OBFUSCATION_ATTRIBUTE)
|
||||
if (obfuscationAttr != null && obfuscationAttr.name == ObfuscationAttribute.SRG) {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
// Remap CoFH core cursemaven dev jar to the obfuscated version for runObfClient/Server
|
||||
if (details.requested.group == 'curse.maven' && details.requested.name.endsWith('-69162') && details.requested.version == '2388751') {
|
||||
details.useVersion '2388750'
|
||||
details.because 'Pick obfuscated jar'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure tests have access to minecraft classes
|
||||
@@ -444,8 +472,9 @@ repositories.configureEach { repo ->
|
||||
apply from: 'repositories.gradle'
|
||||
|
||||
configurations {
|
||||
runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
|
||||
testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
|
||||
for (config in [compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath]) {
|
||||
config.extendsFrom(runtimeOnlyNonPublishable)
|
||||
if (usesShadowedDependencies.toBoolean()) {
|
||||
config.extendsFrom(shadowImplementation)
|
||||
// TODO: remove Compile after all uses are refactored to Implementation
|
||||
@@ -490,12 +519,11 @@ repositories {
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
if (usesMixinDebug.toBoolean()) {
|
||||
maven {
|
||||
name = "Fabric Maven"
|
||||
url = "https://maven.fabricmc.net/"
|
||||
}
|
||||
maven {
|
||||
name 'sonatype'
|
||||
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
||||
content {
|
||||
includeGroup "org.lwjgl"
|
||||
}
|
||||
}
|
||||
if (includeWellKnownRepositories.toBoolean()) {
|
||||
@@ -529,29 +557,49 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
def mixinProviderGroup = "io.github.legacymoddingmc"
|
||||
def mixinProviderModule = "unimixins"
|
||||
def mixinProviderVersion = "0.1.6"
|
||||
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
|
||||
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
|
||||
|
||||
dependencies {
|
||||
if (usesMixins.toBoolean()) {
|
||||
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
|
||||
annotationProcessor('com.google.guava:guava:24.1.1-jre')
|
||||
annotationProcessor('com.google.code.gson:gson:2.8.6')
|
||||
annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.12:processor')
|
||||
annotationProcessor(mixinProviderSpec)
|
||||
if (usesMixinDebug.toBoolean()) {
|
||||
runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16')
|
||||
}
|
||||
}
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
implementation('com.gtnewhorizon:gtnhmixins:2.1.12')
|
||||
if (usesMixins.toBoolean()) {
|
||||
implementation(mixinProviderSpec)
|
||||
} else if (forceEnableMixins.toBoolean()) {
|
||||
runtimeOnlyNonPublishable(mixinProviderSpec)
|
||||
}
|
||||
}
|
||||
|
||||
pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
|
||||
if (usesMixins.toBoolean()) {
|
||||
dependencies {
|
||||
kapt('com.gtnewhorizon:gtnhmixins:2.1.12:processor')
|
||||
kapt(mixinProviderSpec)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Replace old mixin mods with unimixins
|
||||
// https://docs.gradle.org/8.0.2/userguide/resolution_rules.html#sec:substitution_with_classifier
|
||||
configurations.all {
|
||||
resolutionStrategy.dependencySubstitution {
|
||||
substitute module('com.gtnewhorizon:gtnhmixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
|
||||
substitute module('com.github.GTNewHorizons:Mixingasm') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
|
||||
substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
|
||||
substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
|
||||
substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier")
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
|
||||
@@ -656,17 +704,22 @@ ext.java17Toolchain = (JavaToolchainSpec spec) -> {
|
||||
spec.vendor.set(JvmVendorSpec.matching("jetbrains"))
|
||||
}
|
||||
|
||||
ext.java17DependenciesCfg = configurations.create("java17Dependencies")
|
||||
ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies")
|
||||
ext.java17DependenciesCfg = configurations.create("java17Dependencies") {
|
||||
extendsFrom(configurations.getByName("runtimeClasspath")) // Ensure consistent transitive dependency resolution
|
||||
canBeConsumed = false
|
||||
}
|
||||
ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies") {
|
||||
canBeConsumed = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def lwjgl3ifyVersion = '1.1.21'
|
||||
def lwjgl3ifyVersion = '1.3.3'
|
||||
def asmVersion = '9.4'
|
||||
if (modId != 'lwjgl3ify') {
|
||||
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
|
||||
}
|
||||
if (modId != 'hodgepodge') {
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.0.31')
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.4')
|
||||
}
|
||||
|
||||
java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
|
||||
@@ -677,14 +730,14 @@ dependencies {
|
||||
java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}")
|
||||
java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1')
|
||||
java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0")
|
||||
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches")
|
||||
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
|
||||
}
|
||||
|
||||
ext.java17JvmArgs = [
|
||||
// Java 9+ support
|
||||
"--illegal-access=warn",
|
||||
"-Dfile.encoding=UTF-8",
|
||||
"-Djava.security.manager=allow",
|
||||
"-Dfile.encoding=UTF-8",
|
||||
"--add-opens", "java.base/jdk.internal.loader=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/java.net=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/java.nio=ALL-UNNAMED",
|
||||
@@ -695,6 +748,7 @@ ext.java17JvmArgs = [
|
||||
"--add-opens", "java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
|
||||
"--add-opens", "jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED,java.naming",
|
||||
"--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED",
|
||||
"--add-modules", "jdk.dynalink",
|
||||
"--add-opens", "jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED",
|
||||
@@ -739,8 +793,8 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
|
||||
public boolean setEnableHotswap(boolean enable) { enableHotswap = enable }
|
||||
|
||||
@Inject
|
||||
public RunHotswappableMinecraftTask(Side side, String superTask) {
|
||||
super(side)
|
||||
public RunHotswappableMinecraftTask(Side side, String superTask, org.gradle.api.invocation.Gradle gradle) {
|
||||
super(side, gradle)
|
||||
|
||||
this.lwjglVersion = 3
|
||||
this.javaLauncher = project.javaToolchains.launcherFor(project.java17Toolchain)
|
||||
@@ -757,10 +811,6 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
|
||||
!file.path.contains("2.9.4-nightly-20150209") // Remove lwjgl2
|
||||
}
|
||||
this.classpath(project.java17DependenciesCfg)
|
||||
|
||||
if (!(project.usesMixins.toBoolean() || project.forceEnableMixins.toBoolean())) {
|
||||
this.extraArgs.addAll("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,6 +821,8 @@ runClient17Task.configure {
|
||||
description = "Runs the modded client using Java 17, lwjgl3ify and Hodgepodge"
|
||||
dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar')
|
||||
mainClass = "GradleStart"
|
||||
username = minecraft.username
|
||||
userUUID = minecraft.userUUID
|
||||
}
|
||||
|
||||
def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Side.SERVER, "runServer")
|
||||
@@ -817,7 +869,7 @@ if (usesShadowedDependencies.toBoolean()) {
|
||||
tasks.register('relocateShadowJar', ConfigureShadowRelocation) {
|
||||
target = tasks.shadowJar
|
||||
prefix = modGroup + ".shadow"
|
||||
enabled = minimizeShadowedDependencies.toBoolean()
|
||||
enabled = relocateShadowedDependencies.toBoolean()
|
||||
}
|
||||
tasks.named("shadowJar", ShadowJar).configure {
|
||||
manifest {
|
||||
@@ -833,7 +885,7 @@ if (usesShadowedDependencies.toBoolean()) {
|
||||
project.configurations.shadeCompile
|
||||
]
|
||||
archiveClassifier.set('dev')
|
||||
if (minimizeShadowedDependencies.toBoolean()) {
|
||||
if (relocateShadowedDependencies.toBoolean()) {
|
||||
dependsOn(relocateShadowJar)
|
||||
}
|
||||
}
|
||||
@@ -894,6 +946,19 @@ idea {
|
||||
}
|
||||
project {
|
||||
settings {
|
||||
if (ideaOverrideBuildType != "") {
|
||||
delegateActions {
|
||||
if ("gradle".equalsIgnoreCase(ideaOverrideBuildType)) {
|
||||
delegateBuildRunToGradle = true
|
||||
testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.GRADLE
|
||||
} else if ("idea".equalsIgnoreCase(ideaOverrideBuildType)) {
|
||||
delegateBuildRunToGradle = false
|
||||
testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM
|
||||
} else {
|
||||
throw GradleScriptException('Accepted value for ideaOverrideBuildType is one of gradle or idea.')
|
||||
}
|
||||
}
|
||||
}
|
||||
runConfigurations {
|
||||
"1. Run Client"(Gradle) {
|
||||
taskNames = ["runClient"]
|
||||
@@ -932,7 +997,7 @@ idea {
|
||||
}
|
||||
"Run Client (IJ Native)"(Application) {
|
||||
mainClass = "GradleStart"
|
||||
moduleName = project.name + ".main"
|
||||
moduleName = project.name + ".ideVirtualMain"
|
||||
afterEvaluate {
|
||||
workingDirectory = tasks.runClient.workingDir.absolutePath
|
||||
programParameters = tasks.runClient.calculateArgs(project).collect { '"' + it + '"' }.join(' ')
|
||||
@@ -943,7 +1008,7 @@ idea {
|
||||
}
|
||||
"Run Server (IJ Native)"(Application) {
|
||||
mainClass = "GradleStartServer"
|
||||
moduleName = project.name + ".main"
|
||||
moduleName = project.name + ".ideVirtualMain"
|
||||
afterEvaluate {
|
||||
workingDirectory = tasks.runServer.workingDir.absolutePath
|
||||
programParameters = tasks.runServer.calculateArgs(project).collect { '"' + it + '"' }.join(' ')
|
||||
@@ -955,11 +1020,57 @@ idea {
|
||||
}
|
||||
compiler.javac {
|
||||
afterEvaluate {
|
||||
javacAdditionalOptions = "-encoding utf8"
|
||||
moduleJavacAdditionalOptions = [
|
||||
(project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')
|
||||
]
|
||||
}
|
||||
}
|
||||
withIDEADir { File ideaDir ->
|
||||
if (!ideaDir.path.contains(".idea")) {
|
||||
// If an .ipr file exists, the project root directory is passed here instead of the .idea subdirectory
|
||||
ideaDir = new File(ideaDir, ".idea")
|
||||
}
|
||||
if (ideaDir.isDirectory()) {
|
||||
def miscFile = new File(ideaDir, "misc.xml")
|
||||
if (miscFile.isFile()) {
|
||||
boolean dirty = false
|
||||
def miscTransformer = new XmlTransformer()
|
||||
miscTransformer.addAction { root ->
|
||||
Node rootNode = root.asNode()
|
||||
def rootManager = rootNode
|
||||
.component.find { it.@name == 'ProjectRootManager' }
|
||||
if (!rootManager) {
|
||||
rootManager = rootNode.appendNode('component', ['name': 'ProjectRootManager', 'version': '2'])
|
||||
dirty = true
|
||||
}
|
||||
def output = rootManager.output
|
||||
if (!output) {
|
||||
output = rootManager.appendNode('output')
|
||||
dirty = true
|
||||
}
|
||||
if (!output.@url) {
|
||||
// Only modify the output url if it doesn't yet have one, or if the existing one is blank somehow.
|
||||
// This is a sensible default for most setups
|
||||
output.@url = 'file://$PROJECT_DIR$/build/ideaBuild'
|
||||
dirty = true
|
||||
}
|
||||
}
|
||||
def result = miscTransformer.transform(miscFile.text)
|
||||
if (dirty) {
|
||||
miscFile.write(result)
|
||||
}
|
||||
} else {
|
||||
miscFile.text = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2">
|
||||
<output url="file://\$PROJECT_DIR\$/out" />
|
||||
</component>
|
||||
</project>
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1029,7 +1140,7 @@ if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) {
|
||||
}
|
||||
}
|
||||
if (usesMixins.toBoolean()) {
|
||||
addModrinthDep("required", "project", "gtnhmixins")
|
||||
addModrinthDep("required", "project", "unimixins")
|
||||
}
|
||||
tasks.modrinth.dependsOn(build)
|
||||
tasks.publish.dependsOn(tasks.modrinth)
|
||||
@@ -1073,7 +1184,7 @@ if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null
|
||||
}
|
||||
}
|
||||
if (usesMixins.toBoolean()) {
|
||||
addCurseForgeRelation("requiredDependency", "gtnhmixins")
|
||||
addCurseForgeRelation("requiredDependency", "unimixins")
|
||||
}
|
||||
tasks.curseforge.dependsOn(build)
|
||||
tasks.publish.dependsOn(tasks.curseforge)
|
||||
@@ -1107,10 +1218,21 @@ def addCurseForgeRelation(String type, String name) {
|
||||
}
|
||||
|
||||
// Updating
|
||||
|
||||
def buildscriptGradleVersion = "8.0.2"
|
||||
|
||||
tasks.named('wrapper', Wrapper).configure {
|
||||
gradleVersion = buildscriptGradleVersion
|
||||
}
|
||||
|
||||
tasks.register('updateBuildScript') {
|
||||
group = 'GTNH Buildscript'
|
||||
description = 'Updates the build script to the latest version'
|
||||
|
||||
if (gradle.gradleVersion != buildscriptGradleVersion && !Boolean.getBoolean('DISABLE_BUILDSCRIPT_GRADLE_UPDATE')) {
|
||||
dependsOn('wrapper')
|
||||
}
|
||||
|
||||
doLast {
|
||||
if (performBuildScriptUpdate()) return
|
||||
|
||||
@@ -1123,6 +1245,9 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
|
||||
performBuildScriptUpdate()
|
||||
} else {
|
||||
out.style(Style.SuccessHeader).println("Build script update available! Run 'gradle updateBuildScript'")
|
||||
if (gradle.gradleVersion != buildscriptGradleVersion) {
|
||||
out.style(Style.SuccessHeader).println("updateBuildScript can update gradle from ${gradle.gradleVersion} to ${buildscriptGradleVersion}\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -144,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
|
||||
Reference in new issue
Block a user