diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-05-07 13:51:17 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-05-07 14:59:28 +0200 |
commit | 0cf60eed31737a347071f057230fcd313c5a3c4c (patch) | |
tree | 9c57ed47e6a397213d98605ee1be0c7fa8574c4e | |
parent | 717018f3d1d8ef2a6f9b7e45be57a75eb7ea7050 (diff) |
Initial history release0.1.0
- add version.properties
Issue-ID: PORTALNG-93
Change-Id: I0b1225a597741a1292ae3e4a33a06421e6d658ef
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
-rw-r--r-- | app/build.gradle | 40 | ||||
-rw-r--r-- | version | 1 | ||||
-rw-r--r-- | version.properties | 10 |
3 files changed, 38 insertions, 13 deletions
diff --git a/app/build.gradle b/app/build.gradle index 2f2dfae..934edf7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,3 @@ -/* - * This file was generated by the Gradle 'init' task. - */ plugins { id 'org.onap.portalng.history.java-application-conventions' id 'io.spring.dependency-management' @@ -11,6 +8,21 @@ plugins { } apply from: "${rootDir}/gradle/verify-licenses.gradle" +def appVersion = getAppVersion() +sourceCompatibility = '17' +targetCompatibility = '17' + +springBoot { + buildInfo { + properties { + artifact = "org-onap-portalng-history" + version = appVersion + group = "org.onap.portalng" + name = "History service that saves user actions" + } + } +} + configurations { compileOnly { extendsFrom annotationProcessor @@ -97,13 +109,17 @@ license { } configurations.implementation.setCanBeResolved(true) -springBoot { - buildInfo { - properties { - artifact = "org-onap-portalng-history" - version = rootProject.file('version').text.trim() - group = rootProject.group - name = "History service that saves user actions" - } - } +def String getAppVersion() { + Properties versionProperties = getVersionProperties() + String major = versionProperties.getProperty('major') + String minor = versionProperties.getProperty('minor') + String patch = versionProperties.getProperty('patch') + return major + '.' + minor + '.' + patch +} +def Properties getVersionProperties() { + def versionProperties = new Properties() + rootProject.file('version.properties').withInputStream { + versionProperties.load(it) + } + return versionProperties }
\ No newline at end of file diff --git a/version b/version deleted file mode 100644 index 6e8bf73..0000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..c946966 --- /dev/null +++ b/version.properties @@ -0,0 +1,10 @@ +# Versioning variables +# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) +# because they are used in Jenkins, whose plug-in doesn't support +major=0 +minor=1 +patch=0 +base_version=${major}.${minor}.${patch} +# Release must be completed with git revision # in Jenkins +release_version=${base_version} +snapshot_version=${base_version}-SNAPSHOT
\ No newline at end of file |