mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
Provide default value for Compose version for Gradle plugin
There are two versions used in the Gradle plugin: * The version of the plugin itself; * The version of Compose dependency used by the plugin. On CI both versions are set to the same value specific to the build. However, locally using 0.1.0-SNAPSHOT for the Compose version is inconvenient, because we don't publish 0.1.0-SNAPSHOT anywhere. Even if it existed, a moving version is not convenient for using in tests. This commit changes version handling: * The version of Compose is set via `compose.version` Gradle property to the latest stable version, unless overridden by `COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION` env. var. * The version of the plugin is set via `deploy.version` Gradle property to 0.1.0-SNAPSHOT, unless overridden by `COMPOSE_GRADLE_PLUGIN_VERSION` env. var
This commit is contained in:
committed by
Alexey Tsvetkov
parent
c105e3a8eb
commit
ad0b6fc916
@@ -7,8 +7,9 @@ object BuildProperties {
|
||||
const val website = "https://jetbrains.org/compose"
|
||||
const val vcs = "https://github.com/JetBrains/compose-jb"
|
||||
fun composeVersion(project: Project): String =
|
||||
project.findProperty("compose.version") as? String
|
||||
?: System.getenv("COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION")
|
||||
?: "0.1.0-SNAPSHOT"
|
||||
fun deployVersion(project: Project): String = System.getenv("COMPOSE_GRADLE_PLUGIN_VERSION") ?: composeVersion(project)
|
||||
System.getenv("COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION")
|
||||
?: project.findProperty("compose.version") as String
|
||||
fun deployVersion(project: Project): String =
|
||||
System.getenv("COMPOSE_GRADLE_PLUGIN_VERSION")
|
||||
?: project.findProperty("deploy.version") as String
|
||||
}
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
org.gradle.parallel=true
|
||||
kotlin.code.style=official
|
||||
|
||||
#compose.version=0.1.0-m1-build57
|
||||
# A version of Compose libraries,
|
||||
# that will be used by published Gradle plugin,
|
||||
# unless overridden by COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION env var.
|
||||
#
|
||||
# __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
compose.version=0.1.0-build113
|
||||
|
||||
# A version of Gradle plugin, that will be published,
|
||||
# unless overridden by COMPOSE_GRADLE_PLUGIN_VERSION env var.
|
||||
deploy.version=0.1.0-SNAPSHOT
|
||||
Reference in New Issue
Block a user