Use recommended approach to applying version data to mdk.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
parent
e9d087b6f3
commit
ae176e6c1f
2 changed files with 12 additions and 19 deletions
28
build.gradle
28
build.gradle
|
|
@ -78,21 +78,15 @@ dependencies {
|
|||
|
||||
}
|
||||
|
||||
processResources {
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property 'version', project.version
|
||||
inputs.property 'mcversion', '@MC_VERSION@'
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'META_INF/mods.toml'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion': '@MC_VERSION@'
|
||||
// Example for how to get properties into the manifest for reading by the runtime..
|
||||
jar {
|
||||
manifest {
|
||||
attributes(["Specification-Title": "examplemod",
|
||||
"Specification-Vendor": "examplemodsareus",
|
||||
"Specification-Version": "24.0", // We are version 1 of the modlauncher specification
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": "${version}",
|
||||
"Implementation-Vendor" :"examplemodsareus",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
||||
}
|
||||
|
||||
// copy everything else except the mods.toml
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'META_INF/mods.toml'
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue