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 '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
|
||||
}
|
||||
|
|
Reference in a new issue