diff --git a/build.gradle b/build.gradle index d53c0e40..9cccee97 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ -//version: 1743737794 +//version: 1762213476 /* * DO NOT CHANGE THIS FILE! * Also, you may replace this file at any time if there is an update available. - * Please check https://github.com/GTModpackTeam/Buildscripts/blob/master/build.gradle for updates. + * Please check https://github.com/GregTechCEu/Buildscripts/blob/master/build.gradle for updates. * You can also run ./gradlew updateBuildScript to update your buildscript. */ @@ -50,6 +50,8 @@ def out = services.get(StyledTextOutputFactory).create('an-output') // Project properties +loadProjectProperties() + // Required properties: we don't know how to handle these being missing gracefully checkPropertyExists("modName") @@ -316,14 +318,6 @@ tasks.withType(ScalaCompile).configureEach { } -// Allow others using this buildscript to have custom gradle code run -if (getFile('addon.gradle').exists()) { - apply from: 'addon.gradle' -} else if (getFile('addon.gradle.kts').exists()) { - apply from: 'addon.gradle.kts' -} - - // Configure Minecraft // Try to gather mod version from git tags if version is not manually specified @@ -370,11 +364,14 @@ minecraft { // JVM arguments extraRunJvmArguments.add("-ea:${modGroup}") + + // enable JLine Terminal since idea_rt.jar is no longer added to the classpath + extraRunJvmArguments.add('-Dterminal.jline=true') if (usesMixins.toBoolean()) { extraRunJvmArguments.addAll([ - '-Dmixin.hotSwap=true', - '-Dmixin.checks.interfaces=true', - '-Dmixin.debug.export=true' + '-Dmixin.hotSwap=true', + '-Dmixin.checks.interfaces=true', + '-Dmixin.debug.export=true' ]) } @@ -870,9 +867,9 @@ if (enableJava17RunTasks.toBoolean()) { dependencies { if (modId != 'lwjgl3ify') { - java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.0") - java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.0:forgePatches") { - transitive = false + java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.1") + java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.1:forgePatches") { + transitive = false } } } @@ -1009,7 +1006,7 @@ abstract class RunHotswappableMinecraftTask extends RunMinecraftTask { if (project.usesMixins.toBoolean()) { this.extraJvmArgs.addAll(project.provider(() -> { - def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(mixinProviderSpec)) + def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec)) mixinCfg.canBeConsumed = false mixinCfg.canBeResolved = true mixinCfg.transitive = false @@ -1423,11 +1420,11 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA } static URL availableBuildScriptUrl() { - new URL("https://raw.githubusercontent.com/GTModpackTeam/Buildscripts/master/build.gradle") + new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/build.gradle") } static URL availableSettingsGradleUrl() { - new URL("https://raw.githubusercontent.com/GTModpackTeam/Buildscripts/master/settings.gradle") + new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/settings.gradle") } boolean performBuildScriptUpdate() { @@ -1475,14 +1472,28 @@ tasks.register('faq') { "To add new dependencies to your project, place them in 'dependencies.gradle', NOT in 'build.gradle' as they would be replaced when the script updates.\n" + "To add new repositories to your project, place them in 'repositories.gradle'.\n" + "If you need additional gradle code to run, you can place it in a file named 'addon.gradle' (or either of the above, up to you for organization).\n\n" + - "If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'gradle.properties' under the option name 'enableModernJavaSyntax'.\n" + - "To see information on how to configure your IDE properly for Java 17, see https://github.com/GTModpackTeam/Buildscripts/blob/master/docs/jabel.md\n\n" + - "Report any issues or feature requests you have for this build script to https://github.com/GTModpackTeam/Buildscripts/issues\n") + "If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'buildscript.properties' under the option name 'enableModernJavaSyntax'.\n" + + "To see information on how to configure your IDE properly for Java 17, see https://github.com/GregTechCEu/Buildscripts/blob/master/docs/jabel.md\n\n" + + "Report any issues or feature requests you have for this build script to https://github.com/GregTechCEu/Buildscripts/issues\n") } } // Helpers +def loadProjectProperties() { + def configFile = file("buildscript.properties") + if (configFile.exists()) { + configFile.withReader { + def prop = new Properties() + prop.load(it) + new ConfigSlurper().parse(prop).forEach { String k, def v -> + project.ext.setProperty(k, v) + } + } + } else { + print("Failed to read from buildscript.properties, as it did not exist!") + } +} def getDefaultArtifactGroup() { def lastIndex = project.modGroup.lastIndexOf('.') @@ -1495,7 +1506,7 @@ def getFile(String relativePath) { def checkPropertyExists(String propertyName) { if (!project.hasProperty(propertyName)) { - throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/GTModpackTeam/Buildscripts/blob/main/gradle.properties") + throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"buildscript.properties\" or \"gradle.properties\". You can find all properties and their description here: https://github.com/GregTechCEu/Buildscripts/blob/main/buildscript.properties and https://github.com/GregTechCEu/Buildscripts/blob/main/gradle.properties") } } @@ -1533,3 +1544,11 @@ def getLastTag() { return runShell('git describe --abbrev=0 --tags ' + (githubTag.isPresent() ? runShell('git rev-list --tags --skip=1 --max-count=1') : '')) } + + +// Allow others using this buildscript to have custom gradle code run +if (getFile('addon.gradle').exists()) { + apply from: 'addon.gradle' +} else if (getFile('addon.gradle.kts').exists()) { + apply from: 'addon.gradle.kts' +} diff --git a/buildscript.properties b/buildscript.properties new file mode 100644 index 00000000..416327b1 --- /dev/null +++ b/buildscript.properties @@ -0,0 +1,200 @@ +modName = GTExpertCore + +# This is a case-sensitive string to identify your mod. Convention is to use lower case. +modId = gtexpert + +modGroup = com.github.gtexpert.core + +# Version of your mod. +# This field can be left empty if you want your mod's version to be determined by the latest git tag instead. +modVersion = 2.5.2-beta + +# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version) +includeMCVersionJar = true + +# The name of your jar when you produce builds, not including any versioning info +modArchivesBaseName = GTExpertCore + +# Will update your build.gradle automatically whenever an update is available +autoUpdateBuildScript = false + +minecraftVersion = 1.12.2 + +# Debug mod compatibility +debug_all = false +debug_gtwp = false +debug_inb = false +debug_aea = false +debug_extracpus = false +debug_thaumcraft = false +debug_thaumenergy = false +debug_eio = false +debug_deda = false +debug_avaritia = false +debug_chisel = false +debug_gtfo = false + +# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you +# restart Minecraft in development. Choose this dependent on your mod: +# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name +# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty +# Alternatively this can be set with the 'DEV_USERNAME' environment variable. +developmentEnvironmentUserName = Developer + +# Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8. +# See https://github.com/bsideup/jabel for details on how this works. +# Using this requires that you use a Java 17 JDK for development. +enableModernJavaSyntax = true + +# Enables runClient/runServer tasks for Java 17 and Java 21 using LWJGL3ify. +# This is primarily used to test if your mod is compatible with platforms running +# Minecraft 1.12.2 on modern versions of Java and LWJGL, and assist in fixing any problems with it. +# Using this requires that you use a Java 17/Java 21 JDK for development. +enableJava17RunTasks = false + +# Generate a class with String fields for the mod id, name and version named with the fields below +generateGradleTokenClass = com.github.gtexpert.core.Tags +gradleTokenModId = MODID +gradleTokenModName = MODNAME +gradleTokenVersion = VERSION + +# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can +# leave this property empty. +# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api +apiPackage = + +# If you want to keep your API code in src/api instead of src/main +useSrcApiPath = false + +# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/ +# There can be multiple files in a comma-separated list. +# Example value: mymodid_at.cfg,jei_at.cfg +accessTransformersFile = + +# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! +usesMixins = true +# Mixin Provider to use. Primarily changed when needing to use a different version. +mixinProviderSpec = zone.rong:mixinbooter:10.6 +# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +mixinsPackage = mixins +# Location of the mixin config refmap. If left, blank, defaults to "mixins.${modId}.refmap.json". Target file must have the "json" extension. +mixinConfigRefmap = mixins.gtexpert.refmap.json +# Automatically generates a mixin config json if enabled, with the name mixins.modid.json +generateMixinConfig = false +# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! +# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin +coreModClass = core.GTECoreMod +# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod (meaning that +# there is no class annotated with @Mod) you want this to be true. When in doubt: leave it on false! +containsMixinsAndOrCoreModOnly = false + +# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins. +forceEnableMixins = false + +# Outputs pre-transformed and post-transformed loaded classes to run/CLASSLOADER_TEMP. Can be used in combination with +# diff to see exactly what your ASM or Mixins are changing in the target file. +# Optionally can be specified with the 'CORE_MOD_DEBUG' env var. Will output a lot of files! +enableCoreModDebug = false + +# Adds CurseMaven, Modrinth Maven, BlameJared maven, and some more well-known 1.12.2 repositories +includeWellKnownRepositories = true + +# Adds JEI and TheOneProbe to your development environment. Adds them as 'implementation', meaning they will +# be available at compiletime and runtime for your mod (in-game and in-code). +# Overrides the above setting to be always true, as these repositories are needed to fetch the mods +includeCommonDevEnvMods = true + +# Some mods require a specific forge version to launch in. When you need to use one of those mods as a dependency, +# and cannot launch with the forge version required, enable this to strip the forge version requirements from that mod. +# This will add 'strip-latest-forge-requirements' as 'runtimeOnlyNonPublishable'. +# Requires useMixins or forceEnableMixins to be true, as the mod uses mixins to function. +stripForgeRequirements = false + +# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your +# responsibility check the licence and request permission for distribution, if required. +usesShadowedDependencies = false +# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access +# their own classes, making the minimization unreliable. +minimizeShadowedDependencies = true +# If disabled, won't rename the shadowed classes. +relocateShadowedDependencies = true + +# Separate run directories into "run/client" for runClient task, and "run/server" for runServer task. +# Useful for debugging a server and client simultaneously. If not enabled, it will be in the standard location "run/" +separateRunDirectories = false + +# The display name format of versions published to Curse and Modrinth. $MOD_NAME and $VERSION are available variables. +# Default: $MOD_NAME \u2212 $VERSION. \u2212 is the minus character which looks much better than the hyphen minus on Curse. +versionDisplayFormat = $MOD_NAME \u2212 $VERSION + +# Publishing to modrinth requires you to set the MODRINTH_API_KEY environment variable to your current modrinth API token. + +# The project's ID on Modrinth. Can be either the slug or the ID. +# Leave this empty if you don't want to publish on Modrinth. +# Alternatively this can be set with the 'MODRINTH_PROJECT_ID' environment variable. +modrinthProjectId = + +# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth. +# Syntax: scope1-type1:name1;scope2-type2:name2;... +# Where scope can be one of [required, optional, incompatible, embedded], +# type can be one of [project, version], +# and the name is the Modrinth project or version slug/id of the other mod. +# Example: required-project:jei;optional-project:top;incompatible-project:gregtech +modrinthRelations = + + +# Publishing to CurseForge requires you to set the CURSEFORGE_API_KEY environment variable to one of your CurseForge API tokens. + +# The project's numeric ID on CurseForge. You can find this in the About Project box. +# Leave this empty if you don't want to publish on CurseForge. +# Alternatively this can be set with the 'CURSEFORGE_PROJECT_ID' environment variable. +curseForgeProjectId = + +# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge. +# Syntax: type1:name1;type2:name2;... +# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible], +# and the name is the CurseForge project slug of the other mod. +# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft +curseForgeRelations = + +# This project's release type on CurseForge and/or Modrinth +# Alternatively this can be set with the 'RELEASE_TYPE' environment variable. +# Allowed types: release, beta, alpha +releaseType = beta + +# Generate a default changelog for releases. Requires git to be installed, as it uses it to generate a changelog of +# commits since the last tagged release. +generateDefaultChangelog = false + +# Prevent the source code from being published +noPublishedSources = false + + +# Publish to a custom maven location. Follows a few rules: +# Group ID can be set with the 'ARTIFACT_GROUP_ID' environment variable, default to 'project.group' +# Artifact ID can be set with the 'ARTIFACT_ID' environment variable, default to 'project.name' +# Version can be set with the 'RELEASE_VERSION' environment variable, default to 'modVersion' +# For maven credentials: +# Username is set with the 'MAVEN_USER' environment variable, default to "NONE" +# Password is set with the 'MAVEN_PASSWORD' environment variable, default to "NONE" +customMavenPublishUrl = + +# The group for maven artifacts. Defaults to the 'project.modGroup' until the last '.' (if any). +# So 'mymod' becomes 'mymod' and 'com.myname.mymodid' 'becomes com.myname' +mavenArtifactGroup = + +# Enable spotless checks +# Enforces code formatting on your source code +# By default this will use the files found here: https://github.com/GTModpackTeam/Buildscripts/tree/master/spotless +# to format your code. However, you can create your own version of these files and place them in your project's +# root directory to apply your own formatting options instead. +enableSpotless = true + +# Enable JUnit testing platform used for testing your code. +# Uses JUnit 5. See guide and documentation here: https://junit.org/junit5/docs/current/user-guide/ +enableJUnit = true + +# Deployment debug setting +# Uncomment this to test deployments to CurseForge and Modrinth +# Alternatively, you can set the 'DEPLOYMENT_DEBUG' environment variable. +deploymentDebug = false diff --git a/gradle.properties b/gradle.properties index e2624ff2..1aa7cfca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,212 +1,13 @@ -modName = GTExpertCore - -# This is a case-sensitive string to identify your mod. Convention is to use lower case. -modId = gtexpert - -modGroup = com.github.gtexpert.core - -# Version of your mod. -# This field can be left empty if you want your mod's version to be determined by the latest git tag instead. -modVersion = 2.5.2-beta - -# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version) -includeMCVersionJar = true - -# The name of your jar when you produce builds, not including any versioning info -modArchivesBaseName = GTExpertCore - -# Will update your build.gradle automatically whenever an update is available -autoUpdateBuildScript = false - -minecraftVersion = 1.12.2 - -# Debug mod compatibility -debug_all = false -debug_gtwp = false -debug_inb = false -debug_aea = false -debug_extracpus = false -debug_thaumcraft = false -debug_thaumenergy = false -debug_eio = false -debug_deda = false -debug_avaritia = false -debug_chisel = false -debug_gtfo = false - -# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you -# restart Minecraft in development. Choose this dependent on your mod: -# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name -# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty -# Alternatively this can be set with the 'DEV_USERNAME' environment variable. -developmentEnvironmentUserName = Developer - -# Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8. -# See https://github.com/bsideup/jabel for details on how this works. -# Using this requires that you use a Java 17 JDK for development. -enableModernJavaSyntax = true - -# Enables runClient/runServer tasks for Java 17 and Java 21 using LWJGL3ify. -# This is primarily used to test if your mod is compatible with platforms running -# Minecraft 1.12.2 on modern versions of Java and LWJGL, and assist in fixing any problems with it. -# Using this requires that you use a Java 17/Java 21 JDK for development. -enableJava17RunTasks = false - -# Generate a class with String fields for the mod id, name and version named with the fields below -generateGradleTokenClass = com.github.gtexpert.core.Tags -gradleTokenModId = MODID -gradleTokenModName = MODNAME -gradleTokenVersion = VERSION - -# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can -# leave this property empty. -# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api -apiPackage = - -# If you want to keep your API code in src/api instead of src/main -useSrcApiPath = false - -# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/ -# There can be multiple files in a comma-separated list. -# Example value: mymodid_at.cfg,jei_at.cfg -accessTransformersFile = - -# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! -usesMixins = true -# Mixin Provider to use. Primarily changed when needing to use a different version. -mixinProviderSpec = zone.rong:mixinbooter:10.6 -# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! -mixinsPackage = mixins -# Location of the mixin config refmap. If left, blank, defaults to "mixins.${modId}.refmap.json". Target file must have the "json" extension. -mixinConfigRefmap = mixins.gtexpert.refmap.json -# Automatically generates a mixin config json if enabled, with the name mixins.modid.json -generateMixinConfig = false -# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! -# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin -coreModClass = core.GTECoreMod -# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod (meaning that -# there is no class annotated with @Mod) you want this to be true. When in doubt: leave it on false! -containsMixinsAndOrCoreModOnly = false - -# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins. -forceEnableMixins = false - -# Outputs pre-transformed and post-transformed loaded classes to run/CLASSLOADER_TEMP. Can be used in combination with -# diff to see exactly what your ASM or Mixins are changing in the target file. -# Optionally can be specified with the 'CORE_MOD_DEBUG' env var. Will output a lot of files! -enableCoreModDebug = false - -# Adds CurseMaven, Modrinth Maven, BlameJared maven, and some more well-known 1.12.2 repositories -includeWellKnownRepositories = true - -# Adds JEI and TheOneProbe to your development environment. Adds them as 'implementation', meaning they will -# be available at compiletime and runtime for your mod (in-game and in-code). -# Overrides the above setting to be always true, as these repositories are needed to fetch the mods -includeCommonDevEnvMods = true - -# Some mods require a specific forge version to launch in. When you need to use one of those mods as a dependency, -# and cannot launch with the forge version required, enable this to strip the forge version requirements from that mod. -# This will add 'strip-latest-forge-requirements' as 'runtimeOnlyNonPublishable'. -# Requires useMixins or forceEnableMixins to be true, as the mod uses mixins to function. -stripForgeRequirements = false - -# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your -# responsibility check the licence and request permission for distribution, if required. -usesShadowedDependencies = false -# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access -# their own classes, making the minimization unreliable. -minimizeShadowedDependencies = true -# If disabled, won't rename the shadowed classes. -relocateShadowedDependencies = true - -# Separate run directories into "run/client" for runClient task, and "run/server" for runServer task. -# Useful for debugging a server and client simultaneously. If not enabled, it will be in the standard location "run/" -separateRunDirectories = false - -# The display name format of versions published to Curse and Modrinth. $MOD_NAME and $VERSION are available variables. -# Default: $MOD_NAME \u2212 $VERSION. \u2212 is the minus character which looks much better than the hyphen minus on Curse. -versionDisplayFormat = $MOD_NAME \u2212 $VERSION - -# Publishing to modrinth requires you to set the MODRINTH_API_KEY environment variable to your current modrinth API token. - -# The project's ID on Modrinth. Can be either the slug or the ID. -# Leave this empty if you don't want to publish on Modrinth. -# Alternatively this can be set with the 'MODRINTH_PROJECT_ID' environment variable. -modrinthProjectId = - -# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth. -# Syntax: scope1-type1:name1;scope2-type2:name2;... -# Where scope can be one of [required, optional, incompatible, embedded], -# type can be one of [project, version], -# and the name is the Modrinth project or version slug/id of the other mod. -# Example: required-project:jei;optional-project:top;incompatible-project:gregtech -modrinthRelations = - - -# Publishing to CurseForge requires you to set the CURSEFORGE_API_KEY environment variable to one of your CurseForge API tokens. - -# The project's numeric ID on CurseForge. You can find this in the About Project box. -# Leave this empty if you don't want to publish on CurseForge. -# Alternatively this can be set with the 'CURSEFORGE_PROJECT_ID' environment variable. -curseForgeProjectId = - -# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge. -# Syntax: type1:name1;type2:name2;... -# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible], -# and the name is the CurseForge project slug of the other mod. -# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft -curseForgeRelations = - -# This project's release type on CurseForge and/or Modrinth -# Alternatively this can be set with the 'RELEASE_TYPE' environment variable. -# Allowed types: release, beta, alpha -releaseType = beta - -# Generate a default changelog for releases. Requires git to be installed, as it uses it to generate a changelog of -# commits since the last tagged release. -generateDefaultChangelog = false - -# Prevent the source code from being published -noPublishedSources = false - - -# Publish to a custom maven location. Follows a few rules: -# Group ID can be set with the 'ARTIFACT_GROUP_ID' environment variable, default to 'project.group' -# Artifact ID can be set with the 'ARTIFACT_ID' environment variable, default to 'project.name' -# Version can be set with the 'RELEASE_VERSION' environment variable, default to 'modVersion' -# For maven credentials: -# Username is set with the 'MAVEN_USER' environment variable, default to "NONE" -# Password is set with the 'MAVEN_PASSWORD' environment variable, default to "NONE" -customMavenPublishUrl = - -# The group for maven artifacts. Defaults to the 'project.modGroup' until the last '.' (if any). -# So 'mymod' becomes 'mymod' and 'com.myname.mymodid' 'becomes com.myname' -mavenArtifactGroup = - -# Enable spotless checks -# Enforces code formatting on your source code -# By default this will use the files found here: https://github.com/GTModpackTeam/Buildscripts/tree/master/spotless -# to format your code. However, you can create your own version of these files and place them in your project's -# root directory to apply your own formatting options instead. -enableSpotless = true - -# Enable JUnit testing platform used for testing your code. -# Uses JUnit 5. See guide and documentation here: https://junit.org/junit5/docs/current/user-guide/ -enableJUnit = true - -# Deployment debug setting -# Uncomment this to test deployments to CurseForge and Modrinth -# Alternatively, you can set the 'DEPLOYMENT_DEBUG' environment variable. -deploymentDebug = false +# +# The "gradle.properties" file contains settings loaded by all gradle files. +# For the "build.gradle" file, all properties are stored in the separate and dedicated file "buildscript.properties". +# Properties can be created via any sequence of ASCII characters followed by an equal sign to set the value. +# # Gradle Settings # Effectively applies the '--stacktrace' flag by default org.gradle.logging.stacktrace = all -# Effectively applies the '--build-cache' flag by default -org.gradle.caching = false -# Effectively applies the '--warning-mode all' flag by default -org.gradle.warning.mode = all # Sets default memory used for gradle commands. Can be overridden by user or command line properties. # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF-8 diff --git a/gradlew b/gradlew index 1aa94a42..f5feea6d 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 6689b85b..9d21a218 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,92 +1,94 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle index 46a4b1df..b96d70e2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -35,7 +35,7 @@ gradleEnterprise { blowdryerSetup { repoSubfolder 'spotless' - github 'GTModpackTeam/Buildscripts', 'tag', 'v1.0.3' + github 'GTModpackTeam/Buildscripts', 'tag', 'v1.0.4' } rootProject.name = rootProject.projectDir.getName()