Adds some versioning information.

This commit is contained in:
Markil3
2021-02-24 12:05:47 -07:00
parent c6c2e2ba17
commit 5b4c6c40c2
5 changed files with 59 additions and 37 deletions

View File

@@ -13,9 +13,9 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = '0.1-1.16.4-alpha'
group = 'markil3.immersive_hud' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'immersive_hud'
archivesBaseName = project.archives_base_name
version = project.mod_version + "-" + project.minecraft_version + "-forge"
group = project.maven_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
@@ -26,7 +26,7 @@ minecraft {
// stable_# Stables are built at the discretion of the MCP team.
// 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: 'snapshot', version: '20201028-1.16.3'
mappings channel: 'snapshot', version: project.mappings
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
@@ -94,7 +94,7 @@ dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.16.4-35.1.37'
minecraft "net.minecraftforge:forge:${project.minecraft_version}-${project.forge_version}"
// You may put jars on which you depend on in ./libs or you may define them like so..
// compile "some.group:artifact:version:classifier"
@@ -116,13 +116,22 @@ dependencies {
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title": "immersive_hud",
"Specification-Title": project.archivesBaseName,
"Specification-Vendor": "Markil 3",
"Specification-Version": "0.1-alpha", // We are version 1 of ourselves
"Specification-Version": project.version,
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"Markil 3",