Skip to content

Commit

Permalink
build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
osoykan committed Apr 30, 2024
1 parent 3ad70b9 commit 3e46e59
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
25 changes: 12 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,6 @@ plugins {
group = "com.trendyol"
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
val details = versionDetails()

fun determine(lastTag: String): String {
System.getenv("SNAPSHOT")?.let {
return nextPatchSnapshot(lastTag)
}
return lastTag
}

fun nextPatchSnapshot(version: String): String {
val (major, minor, patch) = version.split(".")
return "$major.$minor.${patch.toInt() + 1}-SNAPSHOT"
}

version = determine(details.lastTag)

allprojects {
Expand Down Expand Up @@ -183,3 +170,15 @@ subprojects.of("lib", "spring", "ktor", filter = { p -> publishedProjects.contai
tasks.withType<DokkaMultiModuleTask>().configureEach {
outputDirectory.set(file(rootDir.resolve("docs/source")))
}

fun determine(lastTag: String): String {
System.getenv("SNAPSHOT")?.let {
return project.properties["snapshot"].toString()
}
return lastTag
}

fun nextPatchSnapshot(version: String): String {
val (major, minor, patch) = version.split(".")
return "$major.$minor.${patch.toInt() + 1}-SNAPSHOT"
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ projectDescription=The easiest way of e2e testing in Kotlin
projectUrl=https://github.com/Trendyol/stove
licenceUrl=https://github.com/Trendyol/stove/blob/master/LICENCE
licence=Apache-2.0 license
snapshot=0.9.9-SNAPSHOT

0 comments on commit 3e46e59

Please sign in to comment.