Single version calculation in root projects
This commit is contained in:
parent
5f55dcabf7
commit
e425973c75
12
build.gradle
12
build.gradle
@ -3,9 +3,11 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
ext {
|
||||
versionPrefix = "0.1.0"
|
||||
}
|
||||
var cl = Calendar.instance
|
||||
var day = "${cl.get(cl.YEAR)}.${cl.get(cl.MONTH) + 1}.${cl.get(cl.DATE)}"
|
||||
var time = "${cl.get(cl.HOUR_OF_DAY)}.${cl.get(cl.MINUTE)}.${cl.get(cl.SECOND)}"
|
||||
|
||||
version = "0.1.0.$day.$time"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@ -27,10 +29,6 @@ publishing {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId = 'io.gitlab.jfronny'
|
||||
artifactId = 'commons'
|
||||
var cl = Calendar.instance
|
||||
var day = "${cl.get(cl.YEAR)}.${cl.get(cl.MONTH) + 1}.${cl.get(cl.DATE)}"
|
||||
var time = "${cl.get(cl.HOUR_OF_DAY)}.${cl.get(cl.MINUTE)}.${cl.get(cl.SECOND)}"
|
||||
version = "$versionPrefix.$day.$time"
|
||||
|
||||
from components.java
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
||||
}
|
||||
|
||||
version = rootProject.version
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
@ -33,10 +35,6 @@ publishing {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId = 'io.gitlab.jfronny'
|
||||
artifactId = 'commons-gson'
|
||||
var cl = Calendar.instance
|
||||
var day = "${cl.get(cl.YEAR)}.${cl.get(cl.MONTH) + 1}.${cl.get(cl.DATE)}"
|
||||
var time = "${cl.get(cl.HOUR_OF_DAY)}.${cl.get(cl.MINUTE)}.${cl.get(cl.SECOND)}"
|
||||
version = "${rootProject.versionPrefix}.$day.$time"
|
||||
|
||||
project.shadow.component(it)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user