Skip to content

Commit 48b0ec0

Browse files
Update build script version to 1762213476 (#333)
* update build script version to 1762213476 * fix --------- Co-authored-by: tier940 <[email protected]> Co-authored-by: tier940 <[email protected]>
1 parent 95d0091 commit 48b0ec0

File tree

6 files changed

+347
-322
lines changed

6 files changed

+347
-322
lines changed

build.gradle

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//version: 1743737794
1+
//version: 1762213476
22
/*
33
* DO NOT CHANGE THIS FILE!
44
* Also, you may replace this file at any time if there is an update available.
5-
* Please check https://github.com/GTModpackTeam/Buildscripts/blob/master/build.gradle for updates.
5+
* Please check https://github.com/GregTechCEu/Buildscripts/blob/master/build.gradle for updates.
66
* You can also run ./gradlew updateBuildScript to update your buildscript.
77
*/
88

@@ -50,6 +50,8 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
5050

5151

5252
// Project properties
53+
loadProjectProperties()
54+
5355

5456
// Required properties: we don't know how to handle these being missing gracefully
5557
checkPropertyExists("modName")
@@ -316,14 +318,6 @@ tasks.withType(ScalaCompile).configureEach {
316318
}
317319

318320

319-
// Allow others using this buildscript to have custom gradle code run
320-
if (getFile('addon.gradle').exists()) {
321-
apply from: 'addon.gradle'
322-
} else if (getFile('addon.gradle.kts').exists()) {
323-
apply from: 'addon.gradle.kts'
324-
}
325-
326-
327321
// Configure Minecraft
328322

329323
// Try to gather mod version from git tags if version is not manually specified
@@ -370,11 +364,14 @@ minecraft {
370364

371365
// JVM arguments
372366
extraRunJvmArguments.add("-ea:${modGroup}")
367+
368+
// enable JLine Terminal since idea_rt.jar is no longer added to the classpath
369+
extraRunJvmArguments.add('-Dterminal.jline=true')
373370
if (usesMixins.toBoolean()) {
374371
extraRunJvmArguments.addAll([
375-
'-Dmixin.hotSwap=true',
376-
'-Dmixin.checks.interfaces=true',
377-
'-Dmixin.debug.export=true'
372+
'-Dmixin.hotSwap=true',
373+
'-Dmixin.checks.interfaces=true',
374+
'-Dmixin.debug.export=true'
378375
])
379376
}
380377

@@ -870,9 +867,9 @@ if (enableJava17RunTasks.toBoolean()) {
870867

871868
dependencies {
872869
if (modId != 'lwjgl3ify') {
873-
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.0")
874-
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.0:forgePatches") {
875-
transitive = false
870+
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.1")
871+
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.1:forgePatches") {
872+
transitive = false
876873
}
877874
}
878875
}
@@ -1009,7 +1006,7 @@ abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
10091006

10101007
if (project.usesMixins.toBoolean()) {
10111008
this.extraJvmArgs.addAll(project.provider(() -> {
1012-
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(mixinProviderSpec))
1009+
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
10131010
mixinCfg.canBeConsumed = false
10141011
mixinCfg.canBeResolved = true
10151012
mixinCfg.transitive = false
@@ -1423,11 +1420,11 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
14231420
}
14241421

14251422
static URL availableBuildScriptUrl() {
1426-
new URL("https://raw.githubusercontent.com/GTModpackTeam/Buildscripts/master/build.gradle")
1423+
new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/build.gradle")
14271424
}
14281425

14291426
static URL availableSettingsGradleUrl() {
1430-
new URL("https://raw.githubusercontent.com/GTModpackTeam/Buildscripts/master/settings.gradle")
1427+
new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/settings.gradle")
14311428
}
14321429

14331430
boolean performBuildScriptUpdate() {
@@ -1475,14 +1472,28 @@ tasks.register('faq') {
14751472
"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" +
14761473
"To add new repositories to your project, place them in 'repositories.gradle'.\n" +
14771474
"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" +
1478-
"If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'gradle.properties' under the option name 'enableModernJavaSyntax'.\n" +
1479-
"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" +
1480-
"Report any issues or feature requests you have for this build script to https://github.com/GTModpackTeam/Buildscripts/issues\n")
1475+
"If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'buildscript.properties' under the option name 'enableModernJavaSyntax'.\n" +
1476+
"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" +
1477+
"Report any issues or feature requests you have for this build script to https://github.com/GregTechCEu/Buildscripts/issues\n")
14811478
}
14821479
}
14831480

14841481

14851482
// Helpers
1483+
def loadProjectProperties() {
1484+
def configFile = file("buildscript.properties")
1485+
if (configFile.exists()) {
1486+
configFile.withReader {
1487+
def prop = new Properties()
1488+
prop.load(it)
1489+
new ConfigSlurper().parse(prop).forEach { String k, def v ->
1490+
project.ext.setProperty(k, v)
1491+
}
1492+
}
1493+
} else {
1494+
print("Failed to read from buildscript.properties, as it did not exist!")
1495+
}
1496+
}
14861497

14871498
def getDefaultArtifactGroup() {
14881499
def lastIndex = project.modGroup.lastIndexOf('.')
@@ -1495,7 +1506,7 @@ def getFile(String relativePath) {
14951506

14961507
def checkPropertyExists(String propertyName) {
14971508
if (!project.hasProperty(propertyName)) {
1498-
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")
1509+
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")
14991510
}
15001511
}
15011512

@@ -1533,3 +1544,11 @@ def getLastTag() {
15331544
return runShell('git describe --abbrev=0 --tags ' +
15341545
(githubTag.isPresent() ? runShell('git rev-list --tags --skip=1 --max-count=1') : ''))
15351546
}
1547+
1548+
1549+
// Allow others using this buildscript to have custom gradle code run
1550+
if (getFile('addon.gradle').exists()) {
1551+
apply from: 'addon.gradle'
1552+
} else if (getFile('addon.gradle.kts').exists()) {
1553+
apply from: 'addon.gradle.kts'
1554+
}

buildscript.properties

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
modName = GTExpertCore
2+
3+
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
4+
modId = gtexpert
5+
6+
modGroup = com.github.gtexpert.core
7+
8+
# Version of your mod.
9+
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
10+
modVersion = 2.5.2-beta
11+
12+
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
13+
includeMCVersionJar = true
14+
15+
# The name of your jar when you produce builds, not including any versioning info
16+
modArchivesBaseName = GTExpertCore
17+
18+
# Will update your build.gradle automatically whenever an update is available
19+
autoUpdateBuildScript = false
20+
21+
minecraftVersion = 1.12.2
22+
23+
# Debug mod compatibility
24+
debug_all = false
25+
debug_gtwp = false
26+
debug_inb = false
27+
debug_aea = false
28+
debug_extracpus = false
29+
debug_thaumcraft = false
30+
debug_thaumenergy = false
31+
debug_eio = false
32+
debug_deda = false
33+
debug_avaritia = false
34+
debug_chisel = false
35+
debug_gtfo = false
36+
37+
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
38+
# restart Minecraft in development. Choose this dependent on your mod:
39+
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
40+
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
41+
# Alternatively this can be set with the 'DEV_USERNAME' environment variable.
42+
developmentEnvironmentUserName = Developer
43+
44+
# Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8.
45+
# See https://github.com/bsideup/jabel for details on how this works.
46+
# Using this requires that you use a Java 17 JDK for development.
47+
enableModernJavaSyntax = true
48+
49+
# Enables runClient/runServer tasks for Java 17 and Java 21 using LWJGL3ify.
50+
# This is primarily used to test if your mod is compatible with platforms running
51+
# Minecraft 1.12.2 on modern versions of Java and LWJGL, and assist in fixing any problems with it.
52+
# Using this requires that you use a Java 17/Java 21 JDK for development.
53+
enableJava17RunTasks = false
54+
55+
# Generate a class with String fields for the mod id, name and version named with the fields below
56+
generateGradleTokenClass = com.github.gtexpert.core.Tags
57+
gradleTokenModId = MODID
58+
gradleTokenModName = MODNAME
59+
gradleTokenVersion = VERSION
60+
61+
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
62+
# leave this property empty.
63+
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
64+
apiPackage =
65+
66+
# If you want to keep your API code in src/api instead of src/main
67+
useSrcApiPath = false
68+
69+
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/
70+
# There can be multiple files in a comma-separated list.
71+
# Example value: mymodid_at.cfg,jei_at.cfg
72+
accessTransformersFile =
73+
74+
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
75+
usesMixins = true
76+
# Mixin Provider to use. Primarily changed when needing to use a different version.
77+
mixinProviderSpec = zone.rong:mixinbooter:10.6
78+
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
79+
mixinsPackage = mixins
80+
# Location of the mixin config refmap. If left, blank, defaults to "mixins.${modId}.refmap.json". Target file must have the "json" extension.
81+
mixinConfigRefmap = mixins.gtexpert.refmap.json
82+
# Automatically generates a mixin config json if enabled, with the name mixins.modid.json
83+
generateMixinConfig = false
84+
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
85+
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
86+
coreModClass = core.GTECoreMod
87+
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod (meaning that
88+
# there is no class annotated with @Mod) you want this to be true. When in doubt: leave it on false!
89+
containsMixinsAndOrCoreModOnly = false
90+
91+
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
92+
forceEnableMixins = false
93+
94+
# Outputs pre-transformed and post-transformed loaded classes to run/CLASSLOADER_TEMP. Can be used in combination with
95+
# diff to see exactly what your ASM or Mixins are changing in the target file.
96+
# Optionally can be specified with the 'CORE_MOD_DEBUG' env var. Will output a lot of files!
97+
enableCoreModDebug = false
98+
99+
# Adds CurseMaven, Modrinth Maven, BlameJared maven, and some more well-known 1.12.2 repositories
100+
includeWellKnownRepositories = true
101+
102+
# Adds JEI and TheOneProbe to your development environment. Adds them as 'implementation', meaning they will
103+
# be available at compiletime and runtime for your mod (in-game and in-code).
104+
# Overrides the above setting to be always true, as these repositories are needed to fetch the mods
105+
includeCommonDevEnvMods = true
106+
107+
# Some mods require a specific forge version to launch in. When you need to use one of those mods as a dependency,
108+
# and cannot launch with the forge version required, enable this to strip the forge version requirements from that mod.
109+
# This will add 'strip-latest-forge-requirements' as 'runtimeOnlyNonPublishable'.
110+
# Requires useMixins or forceEnableMixins to be true, as the mod uses mixins to function.
111+
stripForgeRequirements = false
112+
113+
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
114+
# responsibility check the licence and request permission for distribution, if required.
115+
usesShadowedDependencies = false
116+
# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access
117+
# their own classes, making the minimization unreliable.
118+
minimizeShadowedDependencies = true
119+
# If disabled, won't rename the shadowed classes.
120+
relocateShadowedDependencies = true
121+
122+
# Separate run directories into "run/client" for runClient task, and "run/server" for runServer task.
123+
# Useful for debugging a server and client simultaneously. If not enabled, it will be in the standard location "run/"
124+
separateRunDirectories = false
125+
126+
# The display name format of versions published to Curse and Modrinth. $MOD_NAME and $VERSION are available variables.
127+
# Default: $MOD_NAME \u2212 $VERSION. \u2212 is the minus character which looks much better than the hyphen minus on Curse.
128+
versionDisplayFormat = $MOD_NAME \u2212 $VERSION
129+
130+
# Publishing to modrinth requires you to set the MODRINTH_API_KEY environment variable to your current modrinth API token.
131+
132+
# The project's ID on Modrinth. Can be either the slug or the ID.
133+
# Leave this empty if you don't want to publish on Modrinth.
134+
# Alternatively this can be set with the 'MODRINTH_PROJECT_ID' environment variable.
135+
modrinthProjectId =
136+
137+
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
138+
# Syntax: scope1-type1:name1;scope2-type2:name2;...
139+
# Where scope can be one of [required, optional, incompatible, embedded],
140+
# type can be one of [project, version],
141+
# and the name is the Modrinth project or version slug/id of the other mod.
142+
# Example: required-project:jei;optional-project:top;incompatible-project:gregtech
143+
modrinthRelations =
144+
145+
146+
# Publishing to CurseForge requires you to set the CURSEFORGE_API_KEY environment variable to one of your CurseForge API tokens.
147+
148+
# The project's numeric ID on CurseForge. You can find this in the About Project box.
149+
# Leave this empty if you don't want to publish on CurseForge.
150+
# Alternatively this can be set with the 'CURSEFORGE_PROJECT_ID' environment variable.
151+
curseForgeProjectId =
152+
153+
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
154+
# Syntax: type1:name1;type2:name2;...
155+
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
156+
# and the name is the CurseForge project slug of the other mod.
157+
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
158+
curseForgeRelations =
159+
160+
# This project's release type on CurseForge and/or Modrinth
161+
# Alternatively this can be set with the 'RELEASE_TYPE' environment variable.
162+
# Allowed types: release, beta, alpha
163+
releaseType = beta
164+
165+
# Generate a default changelog for releases. Requires git to be installed, as it uses it to generate a changelog of
166+
# commits since the last tagged release.
167+
generateDefaultChangelog = false
168+
169+
# Prevent the source code from being published
170+
noPublishedSources = false
171+
172+
173+
# Publish to a custom maven location. Follows a few rules:
174+
# Group ID can be set with the 'ARTIFACT_GROUP_ID' environment variable, default to 'project.group'
175+
# Artifact ID can be set with the 'ARTIFACT_ID' environment variable, default to 'project.name'
176+
# Version can be set with the 'RELEASE_VERSION' environment variable, default to 'modVersion'
177+
# For maven credentials:
178+
# Username is set with the 'MAVEN_USER' environment variable, default to "NONE"
179+
# Password is set with the 'MAVEN_PASSWORD' environment variable, default to "NONE"
180+
customMavenPublishUrl =
181+
182+
# The group for maven artifacts. Defaults to the 'project.modGroup' until the last '.' (if any).
183+
# So 'mymod' becomes 'mymod' and 'com.myname.mymodid' 'becomes com.myname'
184+
mavenArtifactGroup =
185+
186+
# Enable spotless checks
187+
# Enforces code formatting on your source code
188+
# By default this will use the files found here: https://github.com/GTModpackTeam/Buildscripts/tree/master/spotless
189+
# to format your code. However, you can create your own version of these files and place them in your project's
190+
# root directory to apply your own formatting options instead.
191+
enableSpotless = true
192+
193+
# Enable JUnit testing platform used for testing your code.
194+
# Uses JUnit 5. See guide and documentation here: https://junit.org/junit5/docs/current/user-guide/
195+
enableJUnit = true
196+
197+
# Deployment debug setting
198+
# Uncomment this to test deployments to CurseForge and Modrinth
199+
# Alternatively, you can set the 'DEPLOYMENT_DEBUG' environment variable.
200+
deploymentDebug = false

0 commit comments

Comments
 (0)