mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-26 15:06:28 +01:00
Insanity ball
- Publish jarjar artifact as default. - Publish slim artifact without any fancy stuff. - Update mods.toml - Switch rubidium to embeddium. - Set displayURL to modrinth. - Change version related stuff to $ variables - Add processResources step to build.gradle to populate mods.toml.
This commit is contained in:
parent
60b3d99a43
commit
e582379ab5
3 changed files with 49 additions and 14 deletions
42
build.gradle
42
build.gradle
|
@ -150,26 +150,56 @@ compileJava {
|
||||||
options.compilerArgs = ['-Xdiags:verbose']
|
options.compilerArgs = ['-Xdiags:verbose']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.named('processResources', ProcessResources).configure {
|
||||||
|
var replaceProperties = [
|
||||||
|
minecraft_version : minecraft_version,
|
||||||
|
minecraft_version_range: minecraft_version_range,
|
||||||
|
forge_version : forge_version,
|
||||||
|
forge_version_range : forge_version_range,
|
||||||
|
loader_version_range : loader_version_range,
|
||||||
|
mod_version : mod_version,
|
||||||
|
embeddium_version_range: embeddium_version_range
|
||||||
|
]
|
||||||
|
inputs.properties replaceProperties
|
||||||
|
|
||||||
|
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
|
||||||
|
expand replaceProperties + [project: project]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void addLicense(jarTask) {
|
void addLicense(jarTask) {
|
||||||
jarTask.from('LICENSE.md') {
|
jarTask.from('LICENSE.md') {
|
||||||
rename '(.*)\\.(.*)', '$1_' + archivesBaseName + '.$2'
|
rename '(.*)\\.(.*)', '$1_' + archivesBaseName + '.$2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named('jar', Jar).configure {
|
void addManifest(jarTask) {
|
||||||
manifest {
|
jarTask.manifest {
|
||||||
attributes([
|
attributes([
|
||||||
'Specification-Title': 'flywheel',
|
'Specification-Title' : 'flywheel',
|
||||||
// 'Specification-Vendor': 'flywheel authors',
|
// 'Specification-Vendor': 'flywheel authors',
|
||||||
'Specification-Version': '1', // We are version 1 of ourselves
|
'Specification-Version' : '1', // We are version 1 of ourselves
|
||||||
'Implementation-Title': project.jar.archiveBaseName,
|
'Implementation-Title' : project.jar.archiveBaseName,
|
||||||
'Implementation-Version': project.jar.archiveVersion,
|
'Implementation-Version' : project.jar.archiveVersion,
|
||||||
// 'Implementation-Vendor': 'flywheel authors',
|
// 'Implementation-Vendor': 'flywheel authors',
|
||||||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named('jar', Jar).configure {
|
||||||
|
archiveClassifier = 'slim'
|
||||||
|
|
||||||
finalizedBy 'reobfJar'
|
finalizedBy 'reobfJar'
|
||||||
|
addManifest(it)
|
||||||
|
addLicense(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named('jarJar', Jar).configure {
|
||||||
|
archiveClassifier = ''
|
||||||
|
|
||||||
|
finalizedBy 'reobfJarJar'
|
||||||
|
addManifest(it)
|
||||||
addLicense(it)
|
addLicense(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,12 @@ org.gradle.daemon = false
|
||||||
mod_version = 1.0.0-alpha
|
mod_version = 1.0.0-alpha
|
||||||
artifact_minecraft_version = 1.20.1
|
artifact_minecraft_version = 1.20.1
|
||||||
minecraft_version = 1.20.1
|
minecraft_version = 1.20.1
|
||||||
forge_version = 47.2.6
|
forge_version=47.2.19
|
||||||
|
# Version ranges for the mods.toml
|
||||||
|
minecraft_version_range=[1.20.1,1.20.3)
|
||||||
|
forge_version_range=[47,)
|
||||||
|
loader_version_range=[47,)
|
||||||
|
embeddium_version_range=[0.2.10,0.3)
|
||||||
|
|
||||||
# build dependency versions
|
# build dependency versions
|
||||||
forgegradle_version = [6.0.16,6.2)
|
forgegradle_version = [6.0.16,6.2)
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
modLoader = "javafml"
|
modLoader = "javafml"
|
||||||
loaderVersion = "[47,)"
|
loaderVersion = "${loader_version_range}"
|
||||||
issueTrackerURL = "https://github.com/Jozufozu/Flywheel/issues"
|
issueTrackerURL = "https://github.com/Jozufozu/Flywheel/issues"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId = "flywheel"
|
modId = "flywheel"
|
||||||
# The Implementation-Version property in the jar's MANIFEST.MF file will be used as the mod version at runtime
|
# The Implementation-Version property in the jar's MANIFEST.MF file will be used as the mod version at runtime
|
||||||
version = "${file.jarVersion}"
|
version = "${mod_version}"
|
||||||
displayName = "Flywheel"
|
displayName = "Flywheel"
|
||||||
logoFile = "logo.png"
|
logoFile = "logo.png"
|
||||||
displayURL = "https://www.curseforge.com/minecraft/mc-mods/flywheel"
|
displayURL = "https://modrinth.com/mod/flywheel"
|
||||||
updateJSONURL = "https://api.modrinth.com/updates/flywheel/forge_updates.json"
|
updateJSONURL = "https://api.modrinth.com/updates/flywheel/forge_updates.json"
|
||||||
authors = "Jozufozu, PepperCode1"
|
authors = "Jozufozu, PepperCode1"
|
||||||
description = '''
|
description = '''
|
||||||
|
@ -18,20 +18,20 @@ A modern engine for modded minecraft.'''
|
||||||
[[dependencies.flywheel]]
|
[[dependencies.flywheel]]
|
||||||
modId = "forge"
|
modId = "forge"
|
||||||
mandatory = true
|
mandatory = true
|
||||||
versionRange = "[47.0.0,)"
|
versionRange = "${forge_version_range}"
|
||||||
ordering = "NONE"
|
ordering = "NONE"
|
||||||
side = "CLIENT"
|
side = "CLIENT"
|
||||||
|
|
||||||
[[dependencies.flywheel]]
|
[[dependencies.flywheel]]
|
||||||
modId = "minecraft"
|
modId = "minecraft"
|
||||||
mandatory = true
|
mandatory = true
|
||||||
versionRange = "[1.20.1,)"
|
versionRange = "${minecraft_version_range}"
|
||||||
ordering = "NONE"
|
ordering = "NONE"
|
||||||
side = "CLIENT"
|
side = "CLIENT"
|
||||||
|
|
||||||
[[dependencies.flywheel]]
|
[[dependencies.flywheel]]
|
||||||
modId = "rubidium"
|
modId = "embeddium"
|
||||||
mandatory = false
|
mandatory = false
|
||||||
versionRange = "[0.7.0,)"
|
versionRange = "${embeddium_version_range}"
|
||||||
ordering = "NONE"
|
ordering = "NONE"
|
||||||
side = "CLIENT"
|
side = "CLIENT"
|
||||||
|
|
Loading…
Reference in a new issue