diff --git a/.travis.yml b/.travis.yml
index f5ef5b6..2325a97 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,5 @@
+os: linux
+dist: bionic
language: java
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
@@ -6,7 +8,7 @@ cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
-script: "./gradlew build"
+script: "./gradlew -Pversion=$TRAVIS_TAG build"
jdk:
- openjdk8
branches:
diff --git a/README.md b/README.md
index ceffed3..7c9a602 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ This guide shows how to setup [ktor-elastic](ktor-elastic/README.md)
net.paslavsky
ktor-elastic
- 1.3.2
+ ${exktor.version}
```
@@ -43,7 +43,7 @@ repositories {
}
dependencies {
- implementation 'net.paslavsky:ktor-elastic:1.3.2'
+ implementation "net.paslavsky:ktor-elastic:$exktorVersion"
}
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 5b44706..a83b050 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,10 +11,18 @@ plugins {
`maven-publish`
}
+val ktor_version: String by project
+val _version = project.findProperty("version").let {
+ if ((it as? String).isNullOrBlank()) {
+ ktor_version
+ } else {
+ it!!
+ }
+}
+
group = "net.paslavsky"
-version = "1.3.2"
+version = _version
-val ktor_version: String by project
val Project.sourceSets: SourceSetContainer get() =
(this as ExtensionAware).extensions.getByName("sourceSets") as SourceSetContainer
@@ -27,7 +35,7 @@ subprojects {
}
group = "net.paslavsky"
- version = "1.3.2"
+ version = _version
repositories {
mavenCentral()
diff --git a/ktor-consul/README.md b/ktor-consul/README.md
index 041a090..2f65144 100644
--- a/ktor-consul/README.md
+++ b/ktor-consul/README.md
@@ -21,7 +21,7 @@ integrate [Ktor HTTP clients](https://ktor.io/clients/) with Consul to discovery
net.paslavsky
ktor-consul
- 1.3.2
+ ${exktor.version}
```
@@ -33,7 +33,7 @@ repositories {
}
dependencies {
- implementation 'net.paslavsky:ktor-consul:1.3.2'
+ implementation "net.paslavsky:ktor-consul:$exktorVersion"
}
```
diff --git a/ktor-elastic/README.md b/ktor-elastic/README.md
index e85b40a..bc5734e 100644
--- a/ktor-elastic/README.md
+++ b/ktor-elastic/README.md
@@ -21,7 +21,7 @@ client instance anywhere inside the `Application` context.
net.paslavsky
ktor-elastic
- 1.3.2
+ ${exktor.version}
```
@@ -33,7 +33,7 @@ repositories {
}
dependencies {
- implementation 'net.paslavsky:ktor-elastic:1.3.2'
+ implementation "net.paslavsky:ktor-elastic:$exktorVersion"
}
```
diff --git a/ktor-sql/README.md b/ktor-sql/README.md
index 9dcbcb6..3faa181 100644
--- a/ktor-sql/README.md
+++ b/ktor-sql/README.md
@@ -20,7 +20,7 @@ This module allows to get up HikariCP connection pool at application start.
net.paslavsky
ktor-sql
- 1.3.2
+ ${exktor.version}
```
@@ -32,7 +32,7 @@ repositories {
}
dependencies {
- implementation 'net.paslavsky:ktor-sql:1.3.2'
+ implementation "net.paslavsky:ktor-sql:$exktorVersion"
}
```