Update build files
This commit is contained in:
parent
1c27c3da01
commit
e4b59167f6
5 changed files with 47 additions and 32 deletions
47
build.gradle
47
build.gradle
|
@ -3,7 +3,7 @@ plugins {
|
||||||
id 'idea'
|
id 'idea'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'java-library'
|
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.+'
|
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
|
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
||||||
//
|
//
|
||||||
// Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
|
// 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.
|
// 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.
|
// 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.
|
// 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.
|
// 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
|
// 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.
|
// 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.
|
// 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
|
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||||
property 'forge.logging.console.level', 'debug'
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
|
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
||||||
|
property 'forge.enabledGameTestNamespaces', mod_id
|
||||||
|
|
||||||
mods {
|
mods {
|
||||||
"${mod_id}" {
|
"${mod_id}" {
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
|
@ -125,11 +128,7 @@ minecraft {
|
||||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
//mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
|
||||||
name = "Aria's Creations Caches"
|
|
||||||
url = "https://maven.zontreck.com/repository/internal"
|
|
||||||
}
|
|
||||||
// Put repositories for dependencies here
|
// Put repositories for dependencies here
|
||||||
// ForgeGradle automatically adds the Forge maven and Maven Central for you
|
// ForgeGradle automatically adds the Forge maven and Maven Central for you
|
||||||
|
|
||||||
|
@ -145,7 +144,7 @@ repositories {
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name = "zontreck 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.
|
// 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.
|
// 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
|
// 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 = [
|
var replaceProperties = [
|
||||||
minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range,
|
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
|
||||||
forge_version : forge_version, forge_version_range: forge_version_range,
|
forge_version: forge_version, forge_version_range: forge_version_range,
|
||||||
loader_version_range: loader_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_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
|
||||||
mod_authors : mod_authors, mod_description: mod_description,
|
mod_authors: mod_authors, mod_description: mod_description,
|
||||||
]
|
]
|
||||||
inputs.properties replaceProperties
|
inputs.properties replaceProperties
|
||||||
|
|
||||||
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
|
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
|
||||||
expand replaceProperties + [project: project]
|
expand replaceProperties + [project: project]
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
// Example for how to get properties into the manifest for reading at runtime.
|
// Example for how to get properties into the manifest for reading at runtime.
|
||||||
tasks.named('jar', Jar).configure {
|
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 {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
|
@ -240,20 +242,21 @@ publishing {
|
||||||
artifact javadocJar
|
artifact javadocJar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = "https://maven.zontreck.com/repository/zontreck"
|
url = "https://git.zontreck.com/api/packages/AriasCreations/maven"
|
||||||
name = "ariascreations"
|
name = "ariascreations"
|
||||||
if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) {
|
|
||||||
credentials {
|
credentials {
|
||||||
username = "admin"
|
username = project.findProperty(MAVEN_USER)
|
||||||
password = project.findProperty(MAVEN_PASSWORD_PROPERTY)
|
password = project.findProperty(MAVEN_PASSWORD)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,6 @@ org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
|
|
||||||
parchment_version=2022.11.27
|
|
||||||
# luckperms_api_version=5.4
|
|
||||||
|
|
||||||
libac=1.4.46
|
|
||||||
eventsbus=1.0.45
|
|
||||||
## Environment Properties
|
## Environment Properties
|
||||||
|
|
||||||
# The Minecraft version must agree with the Forge version to get a valid artifact
|
# 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.
|
# 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
|
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
||||||
# as they do not follow standard versioning conventions.
|
# 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
|
# 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
|
# The Forge version range can use any version of Forge as bounds or match the loader version range
|
||||||
forge_version_range=[43,)
|
forge_version_range=[43,)
|
||||||
# The loader version range can only use the major version of Forge/FML as bounds
|
# 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.
|
# 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
|
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
|
||||||
mapping_channel=parchment
|
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
|
## Mod Properties
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
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'
|
||||||
|
}
|
||||||
|
|
Reference in a new issue