From bbf9b9853fcdf6146f09131cc750e70c65ebee23 Mon Sep 17 00:00:00 2001 From: Serenibyss <10861407+serenibyss@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:59:41 -0600 Subject: [PATCH] Update build script version to 1702244235 (#2282) Co-authored-by: DStrand1 Co-authored-by: alongstringofnumbers --- build.gradle | 12 +++++++++--- gradle.properties | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 5e4447c6c45..29b2ba602bf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1701739812 +//version: 1702244235 /* * DO NOT CHANGE THIS FILE! * Also, you may replace this file at any time if there is an update available. @@ -79,6 +79,7 @@ propertyDefaultIfUnset("curseForgeRelations", "") propertyDefaultIfUnsetWithEnvVar("releaseType", "release", "RELEASE_TYPE") propertyDefaultIfUnset("generateDefaultChangelog", false) propertyDefaultIfUnset("customMavenPublishUrl", "") +propertyDefaultIfUnset("mavenArtifactGroup", getDefaultArtifactGroup()) propertyDefaultIfUnset("enableModernJavaSyntax", false) propertyDefaultIfUnset("enableSpotless", false) propertyDefaultIfUnset("enableJUnit", false) @@ -984,8 +985,8 @@ if (customMavenPublishUrl) { } // providers is not available here, use System for getting env vars - groupId = System.getenv('ARTIFACT_GROUP_ID') ?: project.group - artifactId = System.getenv('ARTIFACT_ID') ?: project.name + groupId = System.getenv('ARTIFACT_GROUP_ID') ?: project.mavenArtifactGroup + artifactId = System.getenv('ARTIFACT_ID') ?: project.modArchivesBaseName version = System.getenv('RELEASE_VERSION') ?: publishedVersion } } @@ -1130,6 +1131,11 @@ tasks.register('faq') { // Helpers +def getDefaultArtifactGroup() { + def lastIndex = project.modGroup.lastIndexOf('.') + return lastIndex < 0 ? project.modGroup : project.modGroup.substring(0, lastIndex) +} + def getFile(String relativePath) { return new File(projectDir, relativePath) } diff --git a/gradle.properties b/gradle.properties index e7b28291e09..85aff107251 100644 --- a/gradle.properties +++ b/gradle.properties @@ -52,6 +52,8 @@ accessTransformersFile = gregtech_at.cfg usesMixins = false # Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! mixinsPackage = +# 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 = asm.GregTechLoadingPlugin @@ -75,6 +77,7 @@ includeWellKnownRepositories = true # Overrides the above setting to be always true, as these repositories are needed to fetch the mods includeCommonDevEnvMods = true + # 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 @@ -120,6 +123,7 @@ curseForgeProjectId = curseForgeRelations = requiredDependency:codechicken-lib-1-8;incompatible:gregtechce # 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 @@ -129,6 +133,17 @@ 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