Skip to content

Commit 15b5565

Browse files
Don't apply -SNAPSHOT to dokka version (#650)
1 parent e0c0d14 commit 15b5565

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@ apiValidation {
4646

4747
val isTagBuild: Boolean = System.getenv("BUILDKITE_TAG")?.isNotEmpty() == true
4848

49-
val sdkVersion = providers.exec {
49+
val rawSdkVersion = providers.exec {
5050
commandLine("git", "describe", "--tags")
51-
}.standardOutput.asText.get().trim() + if (isTagBuild) "" else "-SNAPSHOT" // Add -SNAPSHOT suffix once 0.31.0 version is released
51+
}.standardOutput.asText.get().trim()
5252

53-
extra["sdkVersion"] = sdkVersion
53+
extra["sdkVersion"] = rawSdkVersion + if (isTagBuild) "" else "-SNAPSHOT" // Add -SNAPSHOT suffix once 0.31.0 version is released
5454

5555
tasks.dokkaHtmlMultiModule {
5656
notCompatibleWithConfigurationCache("https://github.com/Kotlin/dokka/issues/2231")
5757
val mainDir = projectDir.resolve("docs/dokka/") // docs/dokka/
5858
val historyDir = mainDir.resolve("history/") // docs/dokka/history/ - all versions
5959
val currentDir = mainDir.resolve("current/") // docs/dokka/current/ - what we'll serve in github pages
60-
val newVersionDir = historyDir.resolve(sdkVersion) // docs/dokka/history/x.x.x/ - new version
60+
val newVersionDir = historyDir.resolve(rawSdkVersion) // docs/dokka/history/x.x.x/ - new version
6161

6262
moduleName.set("Gravatar Android SDK")
6363
outputDirectory.set(newVersionDir)
@@ -68,7 +68,7 @@ tasks.dokkaHtmlMultiModule {
6868
}
6969

7070
pluginConfiguration<VersioningPlugin, VersioningConfiguration> {
71-
version = sdkVersion
71+
version = rawSdkVersion
7272
olderVersionsDir = historyDir
7373
}
7474

0 commit comments

Comments
 (0)