mirror of
https://github.com/TotalFreedomMC/TotalFreedomMod.git
synced 2025-06-20 07:01:26 +00:00
updates
This commit is contained in:
parent
b5137763b5
commit
ab584a5693
3 changed files with 18 additions and 15 deletions
23
build.gradle
23
build.gradle
|
@ -88,7 +88,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'me.totalfreedom'
|
group = 'me.totalfreedom'
|
||||||
version = '7.0.0'
|
version = project.property('project.pluginVersion')
|
||||||
description = 'TotalFreedomMod'
|
description = 'TotalFreedomMod'
|
||||||
java.sourceCompatibility = JavaVersion.VERSION_16
|
java.sourceCompatibility = JavaVersion.VERSION_16
|
||||||
archivesBaseName = 'TotalFreedomMod-donotuse'
|
archivesBaseName = 'TotalFreedomMod-donotuse'
|
||||||
|
@ -96,7 +96,7 @@ archivesBaseName = 'TotalFreedomMod-donotuse'
|
||||||
bukkit {
|
bukkit {
|
||||||
main = 'me.totalfreedom.totalfreedommod.TotalFreedomMod'
|
main = 'me.totalfreedom.totalfreedommod.TotalFreedomMod'
|
||||||
apiVersion = '1.17'
|
apiVersion = '1.17'
|
||||||
version = '7.0.0'
|
version = project.property('project.pluginVersion')
|
||||||
description = 'Plugin for the Total Freedom server.'
|
description = 'Plugin for the Total Freedom server.'
|
||||||
authors = ['Madgeek1450', 'Prozza']
|
authors = ['Madgeek1450', 'Prozza']
|
||||||
softDepend = ['BukkitTelnet', 'Essentials', 'CoreProtect', 'LibsDisguises', 'WorldEdit',
|
softDepend = ['BukkitTelnet', 'Essentials', 'CoreProtect', 'LibsDisguises', 'WorldEdit',
|
||||||
|
@ -120,13 +120,16 @@ task buildProperties(type: WriteProperties) {
|
||||||
// I know I'm supposed to use {project.rootDir} but I have no idea how to make it work
|
// I know I'm supposed to use {project.rootDir} but I have no idea how to make it work
|
||||||
outputFile = file('/src/main/resources/build.properties')
|
outputFile = file('/src/main/resources/build.properties')
|
||||||
property 'buildDate', getDate()
|
property 'buildDate', getDate()
|
||||||
// make it not reset to unknown every time
|
property 'buildAuthor', project.property('project.buildAuthor')
|
||||||
property 'buildAuthor', 'unknown'
|
property 'buildCodeName', project.property('project.buildCodeName')
|
||||||
property 'buildCodeName', 'Ember'
|
|
||||||
property 'buildHead', getGitHash()
|
property 'buildHead', getGitHash()
|
||||||
// buildNumber
|
// buildNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
include('/src/main/resources/build.properties')
|
||||||
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveBaseName.set('TotalFreedomMod')
|
archiveBaseName.set('TotalFreedomMod')
|
||||||
|
@ -150,16 +153,8 @@ shadowJar {
|
||||||
configurations = [project.configurations.compileClasspath]
|
configurations = [project.configurations.compileClasspath]
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
|
||||||
filesMatching('**/gradle.properties') {
|
|
||||||
filter {
|
|
||||||
it.replace('version', { version })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn tasks.shadowJar
|
|
||||||
tasks.build.dependsOn tasks.buildProperties
|
tasks.build.dependsOn tasks.buildProperties
|
||||||
|
tasks.build.dependsOn tasks.shadowJar
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
project.pluginVersion = 7.0.0
|
||||||
|
project.buildAuthor = unknown
|
||||||
|
project.buildCodeName = Ember
|
||||||
|
|
||||||
|
org.gradle.cache=true
|
||||||
|
org.gradle.caching=true
|
||||||
|
org.gradle.parallel=true
|
||||||
|
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
|
@ -265,7 +265,7 @@ public class TotalFreedomMod extends JavaPlugin
|
||||||
number = props.getProperty("buildNumber", "1");
|
number = props.getProperty("buildNumber", "1");
|
||||||
date = props.getProperty("buildDate", "unknown");
|
date = props.getProperty("buildDate", "unknown");
|
||||||
// Need to do this or it will display ${git.commit.id.abbrev}
|
// Need to do this or it will display ${git.commit.id.abbrev}
|
||||||
head = props.getProperty("buildHead", "unknown").replace("${git.commit.id.abbrev}", "unknown");
|
head = props.getProperty("buildHead", "unknown");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue