summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorcpw <cpw+github@weeksfamily.ca>2019-01-27 11:37:56 -0500
committercpw <cpw+github@weeksfamily.ca>2019-01-27 11:42:47 -0500
commitae176e6c1f9a6ae4115a1441ec500d72037d3817 (patch)
tree8dd437a2924f83448a13f91e7e93a4c047fdab10 /build.gradle
parente9d087b6f3e5e258853d0d5684a9439f139ed3eb (diff)
Use recommended approach to applying version data to mdk.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle28
1 files changed, 11 insertions, 17 deletions
diff --git a/build.gradle b/build.gradle
index 5dd003e..ee99238 100644
--- a/build.gradle
+++ b/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@'
- }
-
- // copy everything else except the mods.toml
- from(sourceSets.main.resources.srcDirs) {
- exclude 'META_INF/mods.toml'
+// 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")],)
}
-}
+} \ No newline at end of file