Skip to content

Commit

Permalink
Merge pull request #19 from burnoo/fix-dokka-version
Browse files Browse the repository at this point in the history
Fix version in Dokka docs being "-SNAPSHOT" for release
  • Loading branch information
burnoo authored Aug 6, 2024
2 parents 6562115 + b86d9d3 commit d564fad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compose-remember-setting/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.compose.ExperimentalComposeLibrary
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
Expand Down Expand Up @@ -101,6 +102,12 @@ val currentProperties = rootProject.file("local.properties")
val isRelease: Boolean
get() = currentProperties["isRelease"]?.toString()?.toBoolean() == true

tasks.withType<DokkaTask>().configureEach {
if (isRelease) {
moduleVersion = moduleVersion.get().replace("-SNAPSHOT", "")
}
}

extensions.findByType<PublishingExtension>()?.apply {
repositories {
maven {
Expand Down

0 comments on commit d564fad

Please sign in to comment.