Update build system fixes
This commit is contained in:
parent
a005e2d0ef
commit
19b122990c
5 changed files with 14 additions and 21 deletions
27
build.gradle
27
build.gradle
|
@ -2,7 +2,6 @@ plugins {
|
|||
id 'eclipse'
|
||||
id 'idea'
|
||||
id 'maven-publish'
|
||||
id 'java-library'
|
||||
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
|
||||
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
|
||||
}
|
||||
|
@ -23,6 +22,8 @@ java {
|
|||
configurations {
|
||||
provided
|
||||
compile.extendsFrom(provided)
|
||||
implementation.extendsFrom(provided)
|
||||
minecraftLibrary.extendsFrom(provided)
|
||||
}
|
||||
|
||||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
||||
|
@ -43,12 +44,13 @@ minecraft {
|
|||
//
|
||||
// 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: mapping_channel, version: "${parchment_version}-${minecraft_version}"
|
||||
//mappings channel: mapping_channel, version: "${parchment_version}-${minecraft_version}"
|
||||
mappings channel: mapping_channel, version: "${minecraft_version}"
|
||||
|
||||
// When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
|
||||
// In most cases, it is not necessary to enable.
|
||||
// enableEclipsePrepareRuns = true
|
||||
// enableIdeaPrepareRuns = true
|
||||
enableEclipsePrepareRuns = true
|
||||
enableIdeaPrepareRuns = true
|
||||
|
||||
// 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.
|
||||
|
@ -58,7 +60,7 @@ minecraft {
|
|||
// 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.
|
||||
// By default, the folder name of a run configuration is the name of the Gradle project containing it.
|
||||
// generateRunFolders = true
|
||||
generateRunFolders = true
|
||||
|
||||
// This property enables access transformers for use in development.
|
||||
// They will be applied to the Minecraft artifact.
|
||||
|
@ -66,7 +68,7 @@ minecraft {
|
|||
// However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge.
|
||||
// This default location is a best practice to automatically put the file in the right place in the final jar.
|
||||
// See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
|
||||
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
|
||||
// Default run configurations.
|
||||
// These can be tweaked, removed, or duplicated as needed.
|
||||
|
@ -158,13 +160,7 @@ dependencies {
|
|||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
|
||||
provided "dev.zontreck:LibAC:${libac}"
|
||||
implementation "dev.zontreck:LibAC:${libac}"
|
||||
minecraftLibrary "dev.zontreck:LibAC:${libac}"
|
||||
|
||||
|
||||
provided "dev.zontreck:EventsBus:${eventsbus}"
|
||||
implementation "dev.zontreck:EventsBus:${eventsbus}"
|
||||
minecraftLibrary "dev.zontreck:EventsBus:${eventsbus}"
|
||||
|
||||
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
|
||||
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
|
||||
|
@ -201,7 +197,6 @@ tasks.named('processResources', ProcessResources).configure {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Example for how to get properties into the manifest for reading at runtime.
|
||||
tasks.named('jar', Jar).configure {
|
||||
from {
|
||||
|
@ -236,13 +231,12 @@ def MAVEN_USER = "AriasCreationsMavenUser"
|
|||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
register('mavenJava', MavenPublication) {
|
||||
artifact jar
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = "https://git.zontreck.com/api/packages/MinecraftMods/maven"
|
||||
|
@ -256,7 +250,6 @@ publishing {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue