Improve buildscript

This commit is contained in:
Marcel Konrad
2022-07-28 18:05:45 +02:00
parent f2f8300cf0
commit 3d72a40522
2 changed files with 20 additions and 34 deletions

View File

@@ -10,22 +10,7 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + ' (' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
// The mappings can be changed at any time and must be in the following format.
// Channel: Version:
// official MCVersion Official field/method names from Mojang mapping files
// parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
//
// You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
// 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://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.
mappings channel: 'official', version: minecraft_version
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
@@ -49,7 +34,7 @@ minecraft {
// property 'forge.enabledGameTestNamespaces', "${mod_id}"
mods {
worldhandler {
modSource {
source sourceSets.main
}
}
@@ -64,7 +49,7 @@ minecraft {
// property 'forge.enabledGameTestNamespaces', 'examplemod'
mods {
worldhandler {
modSource {
source sourceSets.main
}
}
@@ -82,7 +67,7 @@ minecraft {
// property 'forge.enabledGameTestNamespaces', 'examplemod'
mods {
worldhandler {
modSource {
source sourceSets.main
}
}
@@ -98,7 +83,7 @@ minecraft {
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
worldhandler {
modSource {
source sourceSets.main
}
}
@@ -140,14 +125,14 @@ dependencies {
jar {
manifest {
attributes([
"Specification-Title": "worldhandler",
"Specification-Vendor": "Exopandora",
"Specification-Title": "${mod_id}",
"Specification-Vendor": "${author}",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": project.jar.archiveVersion,
"Implementation-Vendor": "Exopandora",
"Implementation-Title": "${mod_name}",
"Implementation-Version": "${minecraft_version}-${version}",
"Implementation-Vendor": "${author}",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Main-Class": "exopandora.worldhandler.Main"
"Main-Class": "${main_class}"
])
}
}

View File

@@ -1,12 +1,13 @@
# WorldHandler
mod_id=worldhandler
mod_name=WorldHandler
version=3.3.1
minecraft_version=1.19.1
forge_version=42.0.0
group=exopandora.worldhandler
main_class=exopandora.worldhandler.Main
mod_id = worldhandler
mod_name = WorldHandler
version = 3.3.1
minecraft_version = 1.19.1
forge_version = 42.0.0
group = exopandora.worldhandler
main_class = exopandora.worldhandler.Main
author = Exopandora
# Gradle
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false