Update build system fixes
This commit is contained in:
parent
a005e2d0ef
commit
19b122990c
5 changed files with 14 additions and 21 deletions
|
@ -12,4 +12,4 @@ If the mod becomes widely used, I will begin using deprecation notices.
|
|||
Compatibility
|
||||
=====
|
||||
|
||||
1) Lightman's Currency
|
||||
1) Lightman's Currency (possible future compatibility)
|
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,14 +32,14 @@ loader_version_range=[43,)
|
|||
#
|
||||
# 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
|
||||
mapping_channel=parchment
|
||||
mapping_channel=official
|
||||
# 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
|
||||
eventsbus=1.0.48
|
||||
## Environment Properties
|
||||
|
||||
|
||||
|
|
0
src/main/resources/META-INF/accesstransformer.cfg
Normal file
0
src/main/resources/META-INF/accesstransformer.cfg
Normal file
|
@ -11,7 +11,7 @@ loaderVersion="${loader_version_range}" #mandatory This is typically bumped ever
|
|||
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||
license="${mod_license}"
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
|
||||
issueTrackerURL="https://git.zontreck.com/MinecraftMods/LibZontreck/issues" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
|
|
Reference in a new issue