mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
Allow overriding COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION via Gradle property
Gradle properties are more convenient for local builds
This commit is contained in:
@@ -8,7 +8,7 @@ plugins {
|
||||
|
||||
subprojects {
|
||||
group = BuildProperties.group
|
||||
version = BuildProperties.version
|
||||
version = BuildProperties.deployVersion(project)
|
||||
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-dev")
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import org.gradle.api.Project
|
||||
|
||||
// "Global" properties
|
||||
object BuildProperties {
|
||||
const val name = "JetBrains Compose Plugin"
|
||||
const val group = "org.jetbrains.compose"
|
||||
const val website = "https://jetbrains.org/compose"
|
||||
const val vcs = "https://github.com/JetBrains/compose-jb"
|
||||
val composeVersion: String
|
||||
get() = System.getenv("COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION") ?: "0.1.0-SNAPSHOT"
|
||||
val version: String
|
||||
get() = System.getenv("COMPOSE_GRADLE_PLUGIN_VERSION") ?: composeVersion
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ gradlePluginConfig {
|
||||
buildConfig {
|
||||
packageName = "org.jetbrains.compose"
|
||||
clsName = "ComposeBuildConfig"
|
||||
buildConfigField("String", "composeVersion", BuildProperties.composeVersion)
|
||||
buildConfigField("String", "composeVersion", BuildProperties.composeVersion(project))
|
||||
}
|
||||
|
||||
val embedded by configurations.creating
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
org.gradle.parallel=true
|
||||
kotlin.code.style=official
|
||||
|
||||
#compose.version=0.1.0-m1-build57
|
||||
Reference in New Issue
Block a user