Updated the examples.
This commit is contained in:
parent
6081bdfdd5
commit
4efc2ba2d6
15 changed files with 51 additions and 34 deletions
|
@ -1,7 +1,7 @@
|
|||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
id 'net.thauvin.erik.gradle.semver' version '1.0.0'
|
||||
id 'net.thauvin.erik.gradle.semver' version '1.0.1'
|
||||
id 'com.github.ben-manes.versions' version '0.21.0'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
plugins {
|
||||
kotlin("jvm").version("1.3.30")
|
||||
application
|
||||
id("org.jetbrains.kotlin.kapt").version("1.3.30")
|
||||
id("net.thauvin.erik.gradle.semver").version("1.0.0")
|
||||
id("org.jetbrains.kotlin.kapt").version("1.3.31")
|
||||
id("net.thauvin.erik.gradle.semver").version("1.0.1")
|
||||
id("com.github.ben-manes.versions").version("0.21.0")
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
id 'net.thauvin.erik.gradle.semver' version '1.0.0'
|
||||
id 'net.thauvin.erik.gradle.semver' version '1.0.1'
|
||||
id 'com.github.ben-manes.versions' version '0.21.0'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#Generated by the Semver Plugin for Gradle
|
||||
#Tue Apr 23 16:37:45 PDT 2019
|
||||
version.buildmeta=20190423163745
|
||||
#Fri May 24 01:11:52 PDT 2019
|
||||
version.buildmeta=20190524011152
|
||||
version.major=1
|
||||
version.minor=1
|
||||
version.patch=8
|
||||
version.prerelease=alpha
|
||||
version.semver=1.1.8-alpha+20190423163745
|
||||
version.semver=1.1.8-alpha+20190524011152
|
||||
|
|
|
@ -4,9 +4,9 @@ import java.time.LocalDateTime
|
|||
import java.time.format.DateTimeFormatter
|
||||
|
||||
plugins {
|
||||
kotlin("jvm").version("1.3.30")
|
||||
kotlin("jvm").version("1.3.31")
|
||||
application
|
||||
id("net.thauvin.erik.gradle.semver").version("1.0.0")
|
||||
id("net.thauvin.erik.gradle.semver").version("1.0.1")
|
||||
id("com.github.ben-manes.versions").version("0.21.0")
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#Generated by the Semver Plugin for Gradle
|
||||
#Tue Apr 23 16:38:50 PDT 2019
|
||||
version.buildmeta=20190423163850
|
||||
#Fri May 24 01:12:52 PDT 2019
|
||||
version.buildmeta=20190524011252
|
||||
version.major=1
|
||||
version.minor=2
|
||||
version.patch=4
|
||||
version.prerelease=beta
|
||||
version.semver=1.2.4-beta+20190423163850
|
||||
version.semver=1.2.4-beta+20190524011252
|
||||
|
|
|
@ -3,7 +3,7 @@ buildscript {
|
|||
mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
classpath "net.thauvin.erik.gradle:semver:1.0.0"
|
||||
classpath "net.thauvin.erik.gradle:semver:1.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ run {
|
|||
}
|
||||
|
||||
semver {
|
||||
properties = "$projectDir/${f.name}"
|
||||
properties = "${f.name}"
|
||||
keysPrefix = f.name.substring(0, f.name.indexOf(".") + 1)
|
||||
buildMetaKey = "meta"
|
||||
semverKey = "fullversion"
|
||||
|
|
0
examples/test/locked
Normal file
0
examples/test/locked
Normal file
8
examples/test/locked.properties
Normal file
8
examples/test/locked.properties
Normal file
|
@ -0,0 +1,8 @@
|
|||
#Generated by the Semver Plugin for Gradle
|
||||
#Fri Apr 19 13:31:37 PDT 2019
|
||||
version.fullversion=11.0.0-alpha+20190419133137
|
||||
version.major=11
|
||||
version.meta=20190419133137
|
||||
version.minor=0
|
||||
version.patch=0
|
||||
version.prerelease=alpha
|
8
examples/version.properties
Normal file
8
examples/version.properties
Normal file
|
@ -0,0 +1,8 @@
|
|||
#Generated by the Semver Plugin for Gradle
|
||||
#Thu May 23 22:24:06 PDT 2019
|
||||
version.fullversion=1.0.0
|
||||
version.major=1
|
||||
version.meta=
|
||||
version.minor=0
|
||||
version.patch=0
|
||||
version.prerelease=
|
|
@ -48,7 +48,6 @@ object UtilsSpec : Spek({
|
|||
val version = Version()
|
||||
val config = SemverConfig()
|
||||
val propsFile = File("test.properties")
|
||||
val propsLocked = File("locked.properties")
|
||||
lateinit var props: Properties
|
||||
|
||||
Scenario("Save/Load Properties") {
|
||||
|
@ -171,8 +170,25 @@ object UtilsSpec : Spek({
|
|||
}
|
||||
}
|
||||
|
||||
Scenario("Load locked properties") {
|
||||
lateinit var locked: File
|
||||
|
||||
Given("the locked location") {
|
||||
locked = File("locked")
|
||||
}
|
||||
|
||||
Then("loading locked properties") {
|
||||
assertFailsWith<GradleException> {
|
||||
Utils.loadProperties(File(locked, propsFile.name))
|
||||
}
|
||||
locked.delete()
|
||||
}
|
||||
}
|
||||
|
||||
Scenario("Save to locked properties") {
|
||||
lateinit var propsLocked: File
|
||||
Given("the locked properties") {
|
||||
propsLocked = File("locked.properties")
|
||||
propsLocked.createNewFile()
|
||||
propsLocked.setReadOnly()
|
||||
config.properties = propsLocked.name
|
||||
|
@ -185,20 +201,5 @@ object UtilsSpec : Spek({
|
|||
propsLocked.delete()
|
||||
}
|
||||
}
|
||||
|
||||
Scenario("Load locked properties") {
|
||||
lateinit var locked: File
|
||||
|
||||
Given("the locked location") {
|
||||
locked = File("locked")
|
||||
}
|
||||
|
||||
Then("loading locked properties") {
|
||||
assertFailsWith<GradleException> {
|
||||
Utils.loadProperties(File(locked, propsLocked.name))
|
||||
}
|
||||
locked.delete()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue