Update build files

This commit is contained in:
zontreck 2024-09-12 15:40:26 -07:00
parent 1c27c3da01
commit e4b59167f6
5 changed files with 47 additions and 32 deletions

View file

@ -3,7 +3,7 @@ plugins {
id 'idea'
id 'maven-publish'
id 'java-library'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}
@ -39,7 +39,7 @@ minecraft {
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
//
// Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
// Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started
// Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started
//
// Use non-default mappings at your own risk. They may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
@ -53,7 +53,7 @@ minecraft {
// This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game.
// It is REQUIRED to be set to true for this template to function.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
//copyIdeResources = true
copyIdeResources = true
// When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
// The folder name can be set on a run configuration using the "folderName" property.
@ -87,6 +87,9 @@ minecraft {
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', mod_id
mods {
"${mod_id}" {
source sourceSets.main
@ -125,11 +128,7 @@ minecraft {
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
//mavenCentral()
maven {
name = "Aria's Creations Caches"
url = "https://maven.zontreck.com/repository/internal"
}
mavenCentral()
// Put repositories for dependencies here
// ForgeGradle automatically adds the Forge maven and Maven Central for you
@ -145,7 +144,7 @@ repositories {
maven {
name = "zontreck Maven"
url = "https://maven.zontreck.com/repository/zontreck"
url = "https://git.zontreck.com/api/packages/AriasCreations/maven"
}
}
@ -187,20 +186,21 @@ dependencies {
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
/*tasks.named('processResources', ProcessResources).configure {
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version : forge_version, forge_version_range: forge_version_range,
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors : mod_authors, mod_description: mod_description,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
]
inputs.properties replaceProperties
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}*/
}
// Example for how to get properties into the manifest for reading at runtime.
tasks.named('jar', Jar).configure {
@ -231,7 +231,9 @@ tasks.named('jar', Jar).configure {
// }
def MAVEN_PASSWORD_PROPERTY = "AriasCreationsMavenPassword"
def MAVEN_PASSWORD = "AriasCreationsMavenPassword"
def MAVEN_USER = "AriasCreationsMavenUser"
publishing {
publications {
mavenJava(MavenPublication) {
@ -240,20 +242,21 @@ publishing {
artifact javadocJar
}
}
repositories {
maven {
url = "https://maven.zontreck.com/repository/zontreck"
url = "https://git.zontreck.com/api/packages/AriasCreations/maven"
name = "ariascreations"
if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) {
credentials {
username = "admin"
password = project.findProperty(MAVEN_PASSWORD_PROPERTY)
}
credentials {
username = project.findProperty(MAVEN_USER)
password = project.findProperty(MAVEN_PASSWORD)
}
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

View file

@ -4,11 +4,6 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
parchment_version=2022.11.27
# luckperms_api_version=5.4
libac=1.4.46
eventsbus=1.0.45
## Environment Properties
# The Minecraft version must agree with the Forge version to get a valid artifact
@ -16,9 +11,9 @@ minecraft_version=1.19.2
# The Minecraft version range can use any release version of Minecraft as bounds.
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.19,1.20)
minecraft_version_range=[1.19.2,1.20)
# The Forge version must agree with the Minecraft version to get a valid artifact
forge_version=43.3.0
forge_version=43.4.2
# The Forge version range can use any version of Forge as bounds or match the loader version range
forge_version_range=[43,)
# The loader version range can only use the major version of Forge/FML as bounds
@ -38,6 +33,14 @@ loader_version_range=[43,)
# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
mapping_channel=parchment
# The mapping version to query from the mapping channel.
# This must match the format required by the mapping channel.
parchment_version=2022.11.27
# luckperms_api_version=5.4
libac=1.5.33
eventsbus=1.0.47
## Environment Properties
## Mod Properties

Binary file not shown.

View file

@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View file

@ -1,6 +1,14 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = "https://maven.zontreck.com/repository/internal" }
maven {
name = 'MinecraftForge'
url = 'https://maven.minecraftforge.net/'
}
maven { url = 'https://maven.parchmentmc.org' } // Add this line
}
}
}
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}