Skip to content

Commit

Permalink
Changed versioning concept
Browse files Browse the repository at this point in the history
  • Loading branch information
paslavsky committed Jul 10, 2020
1 parent 1ae0ef5 commit ba7a1ac
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
os: linux
dist: bionic
language: java
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -6,7 +8,7 @@ cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
script: "./gradlew build"
script: "./gradlew -Pversion=$TRAVIS_TAG build"
jdk:
- openjdk8
branches:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This guide shows how to setup [ktor-elastic](ktor-elastic/README.md)
<dependency>
<groupId>net.paslavsky</groupId>
<artifactId>ktor-elastic</artifactId>
<version>1.3.2</version>
<version>${exktor.version}</version>
</dependency>
</dependencies>
```
Expand All @@ -43,7 +43,7 @@ repositories {
}
dependencies {
implementation 'net.paslavsky:ktor-elastic:1.3.2'
implementation "net.paslavsky:ktor-elastic:$exktorVersion"
}
```

Expand Down
14 changes: 11 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +35,7 @@ subprojects {
}

group = "net.paslavsky"
version = "1.3.2"
version = _version

repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions ktor-consul/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ integrate [Ktor HTTP clients](https://ktor.io/clients/) with Consul to discovery
<dependency>
<groupId>net.paslavsky</groupId>
<artifactId>ktor-consul</artifactId>
<version>1.3.2</version>
<version>${exktor.version}</version>
</dependency>
</dependencies>
```
Expand All @@ -33,7 +33,7 @@ repositories {
}
dependencies {
implementation 'net.paslavsky:ktor-consul:1.3.2'
implementation "net.paslavsky:ktor-consul:$exktorVersion"
}
```

Expand Down
4 changes: 2 additions & 2 deletions ktor-elastic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ client instance anywhere inside the `Application` context.
<dependency>
<groupId>net.paslavsky</groupId>
<artifactId>ktor-elastic</artifactId>
<version>1.3.2</version>
<version>${exktor.version}</version>
</dependency>
</dependencies>
```
Expand All @@ -33,7 +33,7 @@ repositories {
}
dependencies {
implementation 'net.paslavsky:ktor-elastic:1.3.2'
implementation "net.paslavsky:ktor-elastic:$exktorVersion"
}
```

Expand Down
4 changes: 2 additions & 2 deletions ktor-sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This module allows to get up HikariCP connection pool at application start.
<dependency>
<groupId>net.paslavsky</groupId>
<artifactId>ktor-sql</artifactId>
<version>1.3.2</version>
<version>${exktor.version}</version>
</dependency>
</dependencies>
```
Expand All @@ -32,7 +32,7 @@ repositories {
}
dependencies {
implementation 'net.paslavsky:ktor-sql:1.3.2'
implementation "net.paslavsky:ktor-sql:$exktorVersion"
}
```

Expand Down

0 comments on commit ba7a1ac

Please sign in to comment.