mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-25 00:18:34 +01:00
feat: improved build tool setup
This commit is contained in:
parent
3ce53350bf
commit
4ef880aa15
6 changed files with 31 additions and 49 deletions
43
build.gradle
43
build.gradle
|
@ -6,23 +6,19 @@ plugins {
|
|||
id 'net.neoforged.gradle.userdev' version '7.0.96'
|
||||
}
|
||||
|
||||
version = "$mod_version"
|
||||
def buildSuffix = System.getenv('BUILD_NUMBER') ? "-b${System.getenv('BUILD_NUMBER')}" : ""
|
||||
|
||||
version = "$mod_version+mc${game_version}${buildSuffix}"
|
||||
group = "de.ellpeck.actuallyadditions"
|
||||
base {
|
||||
archivesName = "ActuallyAdditions-$game_version"
|
||||
archivesName = "ActuallyAdditions"
|
||||
}
|
||||
|
||||
if (System.getenv('BUILD_NUMBER') != null) {
|
||||
version += "." + System.getenv('BUILD_NUMBER')
|
||||
}
|
||||
|
||||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
if (rootProject.file('src/main/resources/META-INF/accesstransformer.cfg').exists()) {
|
||||
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
}
|
||||
//minecraft.accessTransformers.entry public net.minecraft.client.Minecraft textureManager # textureManager
|
||||
|
||||
runs {
|
||||
// applies to all the run configs below
|
||||
|
@ -93,20 +89,6 @@ dependencies {
|
|||
runtimeOnly "curse.maven:mekanism-268560:5155329"
|
||||
}
|
||||
|
||||
// not sure if this is still needed
|
||||
//processResources {
|
||||
// inputs.property('version', project.version)
|
||||
//
|
||||
// from(sourceSets.main.resources.srcDirs) {
|
||||
// include 'META-INF/mods.toml'
|
||||
// expand 'version': project.version
|
||||
// }
|
||||
//
|
||||
// from(sourceSets.main.resources.srcDirs) {
|
||||
// exclude 'META-INF/mods.toml'
|
||||
// }
|
||||
//}
|
||||
|
||||
jar {
|
||||
group = 'artifact'
|
||||
manifest {
|
||||
|
@ -114,12 +96,27 @@ jar {
|
|||
"Specification-Version" : "1",
|
||||
"Implementation-Title" : project.archivesBaseName,
|
||||
"Implementation-Version" : project.version,
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
"Modloader": "Neoforge",
|
||||
"Modloader-Version": project.neo_version,
|
||||
])
|
||||
}
|
||||
|
||||
from sourceSets.main.output
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property('version', project.version)
|
||||
inputs.property('neo_version_range', project.neo_version_range)
|
||||
inputs.property('loader', project.loader)
|
||||
inputs.property('minecraft_version_range', project.minecraft_version_range)
|
||||
|
||||
filesMatching(['META-INF/mods.toml']) {
|
||||
expand 'version': project.version, 'neo_version_range': project.neo_version_range, 'loader': project.loader, 'minecraft_version_range': project.minecraft_version_range
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
from sourceSets.main.java
|
||||
|
|
|
@ -2,13 +2,17 @@ org.gradle.jvmargs=-Xmx3G
|
|||
org.gradle.daemon=false
|
||||
# Actually Additions
|
||||
|
||||
# TODO: check this version change is okay.
|
||||
mod_version=1.1.52
|
||||
|
||||
# Forge
|
||||
game_version=1.20.4
|
||||
neo_version=20.4.190
|
||||
|
||||
# mods.toml
|
||||
loader=2
|
||||
neo_version_range=[20.4.190,)
|
||||
minecraft_version_range=[1.20.4,1.21)
|
||||
|
||||
# Parchment (Mappings)
|
||||
neogradle.subsystems.parchment.minecraftVersion=1.20.4
|
||||
neogradle.subsystems.parchment.mappingsVersion=2024.02.25
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
modLoader="javafml"
|
||||
loaderVersion="[2,)"
|
||||
loaderVersion="[${loader},)"
|
||||
license="MIT"
|
||||
[[mods]]
|
||||
modId="actuallyadditions"
|
||||
version="${file.jarVersion}"
|
||||
version="${version}"
|
||||
displayName="Actually Additions"
|
||||
#logoFile="logo.png"
|
||||
credits="Author: Ellpeck; Textures and Models: BootyToast, GlenthorLP, canitzp"
|
||||
credits="Author: Ellpeck; Textures and Models: BootyToast, GlenthorLP, canitzp; Porters: Flanks, MrBysco, ErrorMikey; 1.20+ Textures: Ridanisaurus"
|
||||
authors="Ellpeck"
|
||||
description='''
|
||||
Do you want Automation? Wireless Transport? Better Machines? A cup o' Coffee? Chests? Better Hoppers? Leaf Blowers? Faster Growth? Plants? Well, Actually Additions has all that and a lot more!
|
||||
|
@ -16,13 +16,13 @@ Do you want Automation? Wireless Transport? Better Machines? A cup o' Coffee? Ch
|
|||
[[dependencies.actuallyadditions]]
|
||||
modId="neoforge"
|
||||
type="required"
|
||||
versionRange="[20.4.167,)"
|
||||
versionRange="${neo_version_range}"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
||||
[[dependencies.actuallyadditions]]
|
||||
modId="minecraft"
|
||||
type="required"
|
||||
versionRange="[1.20.4,1.21)"
|
||||
versionRange="${minecraft_version_range}"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
|
@ -1,19 +0,0 @@
|
|||
[
|
||||
{
|
||||
"modid": "actuallyadditions",
|
||||
"name": "Actually Additions",
|
||||
"description": "Do you want Automation? Wireless Transport? Better Machines? A cup o' Coffee? Chests? Better Hoppers? Leaf Blowers? Faster Growth? Plants? Well, Actually Additions has all that and a lot more!",
|
||||
"version": "${version}",
|
||||
"mcversion": "${mcversion}",
|
||||
"url": "http://github.com/Ellpeck/ActuallyAdditions",
|
||||
"updateUrl": "",
|
||||
"authorList": [ "Ellpeck" ],
|
||||
"credits": "Author: Ellpeck; Textures and Models: BootyToast, GlenthorLP, canitzp",
|
||||
"logoFile": "assets/actuallyadditions/textures/logo.png",
|
||||
"screenshots": [
|
||||
],
|
||||
"parent":"",
|
||||
"dependencies": [
|
||||
]
|
||||
}
|
||||
]
|
|
@ -3,6 +3,6 @@
|
|||
"description": {
|
||||
"text": "actuallyadditions resources"
|
||||
},
|
||||
"pack_format": 22
|
||||
"pack_format": 26
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue