Skip to content

Commit 7f3a4c1

Browse files
committed
added semantic version support via gradle plugin
1 parent ce0496a commit 7f3a4c1

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ plugins {
1111
id 'kr.motd.sphinx' version '2.9.0' // documentation generation
1212
id 'jacoco' // java code coverage plugin
1313
id "org.sonarqube" version "2.8" // sonarqube
14+
id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning
1415
}
1516

1617
ext {
@@ -25,7 +26,6 @@ ext {
2526

2627
group = 'com.github.ie3-institute'
2728
description = 'PowerSystemDataModel'
28-
version = '1.1-SNAPSHOT'
2929
sourceCompatibility = javaVersion
3030
targetCompatibility = javaVersion
3131

@@ -40,6 +40,7 @@ apply from: scriptsLocation + 'jacoco.gradle' // jacoco java code coverage
4040
apply from: scriptsLocation + 'mavenCentralPublish.gradle'
4141
apply from: scriptsLocation + 'sonarqube.gradle'
4242
apply from: scriptsLocation + 'vcs.gradle'
43+
apply from: scriptsLocation + 'semVer.gradle'
4344

4445
repositories {
4546
jcenter() //searches in bintray's repository 'jCenter', which contains Maven Central

gradle/scripts/semVer.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// tasks for semantic versioning using semver-gradle https://github.com/ethauvin/semver-gradle
2+
3+
task currentVersion {
4+
doFirst{
5+
println semver.semver
6+
}
7+
}

version.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#Generated by the Semver Plugin for Gradle
2+
#Fri Sep 11 12:40:49 CEST 2020
3+
version.buildmeta=
4+
version.major=1
5+
version.minor=0
6+
version.patch=0
7+
version.prerelease=
8+
version.semver=1.0.0

0 commit comments

Comments
 (0)