Inject the whole compiler coordinate triple (#116)

This will make it easier to switch to JB Compose.

Also clean up some other version catalog stuff.
This commit is contained in:
Jake Wharton
2023-02-19 00:02:40 -05:00
committed by GitHub
parent 5fb13ee52a
commit f599129b61
4 changed files with 9 additions and 12 deletions

View File

@ -1,21 +1,16 @@
[versions]
kotlin = "1.8.10"
kotlinx-coroutines = "1.6.4"
androidx-compose-compiler = "1.4.2"
[libraries]
kotlin-compiler = { module = "org.jetbrains.kotlin:kotlin-compiler", version.ref = "kotlin" }
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
android-gradlePlugin = "com.android.tools.build:gradle:7.4.1"
androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "androidx-compose-compiler" }
jetbrains-compose-runtime = "org.jetbrains.compose.runtime:runtime:1.3.0"
compose-compiler = "androidx.compose.compiler:compiler:1.4.2"
compose-runtime = "org.jetbrains.compose.runtime:runtime:1.3.0"
maven-publish-gradlePlugin = "com.vanniktech:gradle-maven-publish-plugin:0.14.0"
dokka-gradlePlugin = "org.jetbrains.dokka:dokka-gradle-plugin:1.7.20"

View File

@ -43,6 +43,8 @@ buildConfig {
}
packageName('com.jakewharton.mosaic.gradle')
buildConfigField("String", "composeCompilerVersion", "\"${libs.versions.androidx.compose.compiler.get()}\"")
buildConfigField("String", "composeCompilerGroupId", "\"${libs.compose.compiler.get().module.group}\"")
buildConfigField("String", "composeCompilerArtifactId", "\"${libs.compose.compiler.get().module.name}\"")
buildConfigField("String", "composeCompilerVersion", "\"${libs.compose.compiler.get().version}\"")
buildConfigField("String", "mosaicVersion", "\"${project.version}\"")
}

View File

@ -18,8 +18,8 @@ class MosaicPlugin : KotlinCompilerPluginSupportPlugin {
override fun getCompilerPluginId() = "com.jakewharton.mosaic"
override fun getPluginArtifact() = SubpluginArtifact(
"androidx.compose.compiler",
"compiler",
composeCompilerGroupId,
composeCompilerArtifactId,
composeCompilerVersion,
)

View File

@ -13,7 +13,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
api libs.jetbrains.compose.runtime
api libs.compose.runtime
api libs.kotlinx.coroutines.core
implementation libs.codepoints
}