diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2022-04-18 16:03:24 +0100 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2022-04-18 16:03:24 +0100 |
| commit | 74fa10e4eaf6717359ff982415b2ae6afb3e28e4 (patch) | |
| tree | 682233899780efa265020ce23bd4fa2984009eba /build.gradle | |
| parent | 05a624b1f92dd713d4c89db6670cc18bdbe1d2d7 (diff) | |
Bump version numberv3.11
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/build.gradle b/build.gradle index bab303e4..a1410336 100644 --- a/build.gradle +++ b/build.gradle @@ -4,27 +4,27 @@ plugins { id 'maven-publish' } -defaultTasks 'allJarSnapshot' +defaultTasks 'allJar' allprojects { apply plugin: 'java' group = 'com.leonardobishop' - version = '3.10.1' + version = '3.11' sourceCompatibility = 1.8 targetCompatibility = 1.8 } -task versionGit() { - ext.gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim() - project.version = "${project.version}-${gitCommitHash}" - subprojects.each { - it.version = "${it.version}-${gitCommitHash}" +task allJar( type: Jar, dependsOn: subprojects.tasks['build'] ) { + if (project.findProperty('gitversion') == null || project.findProperty('gitversion') == 'true') { + ext.gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim() + project.version = "${project.version}-${gitCommitHash}" + subprojects.each { + it.version = "${it.version}-${gitCommitHash}" + } } -} -task allJar( type: Jar, dependsOn: subprojects.tasks['build'] ) { subprojects.each { subproject -> from subproject.configurations.archives.allArtifacts.files.collect { zipTree(it) @@ -33,10 +33,6 @@ task allJar( type: Jar, dependsOn: subprojects.tasks['build'] ) { archiveBaseName = 'Quests' } -task allJarSnapshot( dependsOn: [ 'versionGit', 'allJar' ] ) { - allJar.mustRunAfter( 'versionGit' ) -} - artifacts { archives allJar } |
