Improve buildscript

This commit is contained in:
Marcel Konrad
2022-07-18 21:40:31 +02:00
parent d9040f8597
commit 0c5172a81c
3 changed files with 24 additions and 10 deletions

View File

@@ -15,8 +15,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle' apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse' apply plugin: 'eclipse'
version = '1.19-3.2.3' version = "${minecraft_version}-${version}"
group = 'exopandora.worldhandler' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'WorldHandler' archivesBaseName = 'WorldHandler'
java.toolchain.languageVersion = JavaLanguageVersion.of(17) java.toolchain.languageVersion = JavaLanguageVersion.of(17)
@@ -34,7 +33,7 @@ minecraft {
// //
// 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.
mappings channel: 'official', version: '1.19' mappings channel: 'official', version: minecraft_version
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
@@ -42,6 +41,7 @@ minecraft {
runs { runs {
client { client {
workingDirectory project.file('run') workingDirectory project.file('run')
taskName 'WorldHandler Client'
// Recommended logging data for a userdev environment // Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
@@ -58,6 +58,7 @@ minecraft {
server { server {
workingDirectory project.file('run') workingDirectory project.file('run')
taskName 'WorldHandler Server'
// Recommended logging data for a userdev environment // Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
@@ -74,6 +75,7 @@ minecraft {
data { data {
workingDirectory project.file('run') workingDirectory project.file('run')
taskName 'WorldHandler Data'
// Recommended logging data for a userdev environment // Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
@@ -106,7 +108,7 @@ dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it. // The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.19-41.0.96' minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
// You may put jars on which you depend on in ./libs or you may define them like so.. // You may put jars on which you depend on in ./libs or you may define them like so..
// compile "some.group:artifact:version:classifier" // compile "some.group:artifact:version:classifier"
@@ -141,3 +143,9 @@ jar {
]) ])
} }
} }
processResources {
filesMatching(['mods.toml']) {
expand project.properties
}
}

View File

@@ -1,3 +1,9 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties. # WorldHandler
# This is required to provide enough memory for the Minecraft decompilation process. version=3.2.3
group=exopandora.worldhandler
minecraft_version=1.19
forge_version=41.0.100
# Gradle
org.gradle.jvmargs=-Xmx3G org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

View File

@@ -11,7 +11,7 @@ license="GPL v3.0"
[[mods]] [[mods]]
modId="worldhandler" modId="worldhandler"
version="1.19-3.2.3" version="${minecraft_version}-${version}"
displayName="World Handler" displayName="World Handler"
description="The World Handler provides a simple and easy to use graphical user interface for commands. It lets you create powerful and complex sub-commands alongside NBT-structures within seconds." description="The World Handler provides a simple and easy to use graphical user interface for commands. It lets you create powerful and complex sub-commands alongside NBT-structures within seconds."