mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-22 21:19:51 +00:00
Buildscript updates
This commit is contained in:
1 parent
5ce9be4671
commit
26643229ec
4 files changed
+30
-60
No files matched your search
+18
-13
@@ -68,7 +68,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.0.9'
|
||||
id 'com.gtnewhorizons.retrofuturagradle' version '1.0.9-1-g25eba7e'
|
||||
}
|
||||
boolean settingsupdated = verifySettingsGradle()
|
||||
settingsupdated = verifyGitAttributes() || settingsupdated
|
||||
@@ -111,6 +111,7 @@ checkPropertyExists("containsMixinsAndOrCoreModOnly")
|
||||
checkPropertyExists("usesShadowedDependencies")
|
||||
checkPropertyExists("developmentEnvironmentUserName")
|
||||
|
||||
propertyDefaultIfUnset("generateGradleTokenClass", "")
|
||||
propertyDefaultIfUnset("includeWellKnownRepositories", true)
|
||||
propertyDefaultIfUnset("noPublishedSources", false)
|
||||
propertyDefaultIfUnset("usesMixinDebug", project.usesMixins)
|
||||
@@ -330,18 +331,18 @@ minecraft {
|
||||
for (f in replaceGradleTokenInFile.split(',')) {
|
||||
tagReplacementFiles.add f
|
||||
}
|
||||
if (gradleTokenModId) {
|
||||
injectedTags.put gradleTokenModId, modId
|
||||
}
|
||||
if (gradleTokenModName) {
|
||||
injectedTags.put gradleTokenModName, modName
|
||||
}
|
||||
if (gradleTokenVersion) {
|
||||
injectedTags.put gradleTokenVersion, modVersion
|
||||
}
|
||||
if (gradleTokenGroupName) {
|
||||
injectedTags.put gradleTokenGroupName, modGroup
|
||||
}
|
||||
}
|
||||
if (gradleTokenModId) {
|
||||
injectedTags.put gradleTokenModId, modId
|
||||
}
|
||||
if (gradleTokenModName) {
|
||||
injectedTags.put gradleTokenModName, modName
|
||||
}
|
||||
if (gradleTokenVersion) {
|
||||
injectedTags.put gradleTokenVersion, modVersion
|
||||
}
|
||||
if (gradleTokenGroupName) {
|
||||
injectedTags.put gradleTokenGroupName, modGroup
|
||||
}
|
||||
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
@@ -361,6 +362,10 @@ minecraft {
|
||||
groupsToExcludeFromAutoReobfMapping.addAll(["com.diffplug", "com.diffplug.durian", "net.industrial-craft"])
|
||||
}
|
||||
|
||||
if (generateGradleTokenClass) {
|
||||
tasks.injectTags.outputClassName.set(generateGradleTokenClass)
|
||||
}
|
||||
|
||||
// Custom reobf auto-mappings
|
||||
configurations.configureEach {
|
||||
dependencies.configureEach { dep ->
|
||||
|
||||
+3
-29
@@ -1,33 +1,7 @@
|
||||
|
||||
project.ext.lwjglVersion = "3.3.1"
|
||||
|
||||
//switch (OperatingSystem.current()) {
|
||||
// case OperatingSystem.LINUX:
|
||||
// def osArch = System.getProperty("os.arch")
|
||||
// project.ext.lwjglNatives = osArch.startsWith("arm") || osArch.startsWith("aarch64")
|
||||
// ? "natives-linux-${osArch.contains("64") || osArch.startsWith("armv8") ? "arm64" : "arm32"}"
|
||||
// : "natives-linux"
|
||||
// break
|
||||
// case OperatingSystem.MAC_OS:
|
||||
// project.ext.lwjglNatives = System.getProperty("os.arch").startsWith("aarch64") ? "natives-macos-arm64" : "natives-macos"
|
||||
// break
|
||||
// case OperatingSystem.WINDOWS:
|
||||
// def osArch = System.getProperty("os.arch")
|
||||
// project.ext.lwjglNatives = osArch.contains("64")
|
||||
// ? "natives-windows${osArch.startsWith("aarch64") ? "-arm64" : ""}"
|
||||
// : "natives-windows-x86"
|
||||
// break
|
||||
//}
|
||||
minecraft {
|
||||
lwjglVersion.set("3.3.1")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
|
||||
|
||||
implementation "org.lwjgl:lwjgl"
|
||||
implementation "org.lwjgl:lwjgl-glfw"
|
||||
implementation "org.lwjgl:lwjgl-openal"
|
||||
implementation "org.lwjgl:lwjgl-opengl"
|
||||
// runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
|
||||
// runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
|
||||
// runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
|
||||
// runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
|
||||
}
|
||||
+9
-6
@@ -28,16 +28,19 @@ remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/con
|
||||
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Define a source file of your project with:
|
||||
# Generate a class with String fields for the mod id, name, version and group name named with the fields below
|
||||
generateGradleTokenClass = me.eigenraven.lwjgl3ify.Tags
|
||||
gradleTokenModId = MODID
|
||||
gradleTokenModName = MODNAME
|
||||
gradleTokenVersion = VERSION
|
||||
gradleTokenGroupName = GROUPNAME
|
||||
# [DEPRECATED]
|
||||
# Multiple source files can be defined here by providing a comma-seperated list: Class1.java,Class2.java,Class3.java
|
||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...])
|
||||
# Leave these properties empty to skip individual token replacements
|
||||
replaceGradleTokenInFile = Tags.java
|
||||
gradleTokenModId = GRADLETOKEN_MODID
|
||||
gradleTokenModName = GRADLETOKEN_MODNAME
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenGroupName = GRADLETOKEN_GROUPNAME
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# 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.
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package me.eigenraven.lwjgl3ify;
|
||||
|
||||
// Use this class for Strings only. Do not import any classes here. It will lead to issues with Mixins if in use!
|
||||
|
||||
public class Tags {
|
||||
|
||||
// GRADLETOKEN_* will be replaced by your configuration values at build time
|
||||
public static final String MODID = "lwjgl3ify";
|
||||
public static final String MODNAME = "lwjgl3ify";
|
||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
public static final String GROUPNAME = "GRADLETOKEN_GROUPNAME";
|
||||
}
|
||||
Reference in new issue
Block a user