Skip to content

Commit

Permalink
Update Compose Multiplatform to 1.6.10-rc01. (#2237)
Browse files Browse the repository at this point in the history
* Update Compose Multiplatform to 1.6.10-rc01.

* Set reportsDestination.
  • Loading branch information
colinrtwhite committed May 9, 2024
1 parent be0f115 commit d84ebea
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 31 deletions.
35 changes: 14 additions & 21 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import org.jetbrains.compose.ComposeExtension
import org.jetbrains.compose.experimental.dsl.ExperimentalExtension
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

buildscript {
Expand All @@ -26,6 +26,7 @@ buildscript {
classpath(libs.gradlePlugin.android)
classpath(libs.gradlePlugin.atomicFu)
classpath(libs.gradlePlugin.jetbrainsCompose)
classpath(libs.gradlePlugin.composeCompiler)
classpath(libs.gradlePlugin.kotlin)
classpath(libs.gradlePlugin.mavenPublish)
classpath(libs.gradlePlugin.paparazzi)
Expand Down Expand Up @@ -138,37 +139,29 @@ allprojects {

plugins.withId("org.jetbrains.compose") {
extensions.configure<ComposeExtension> {
kotlinCompilerPlugin = libs.jetbrains.compose.compiler.get().toString()
extensions.configure<ExperimentalExtension> {
web.application {}
}
}
}

plugins.withId("dev.drewhamilton.poko") {
extensions.configure<PokoPluginExtension> {
pokoAnnotation = "coil3/annotation/Data"
}
}
plugins.withId("org.jetbrains.kotlin.plugin.compose") {
extensions.configure<ComposeCompilerGradlePluginExtension> {
enableIntrinsicRemember = true
enableNonSkippingGroupOptimization = true
stabilityConfigurationFile = rootDir.resolve("coil-core/compose_compiler_config.conf")

if (enableComposeMetrics && name in publicModules) {
plugins.withId("org.jetbrains.compose") {
tasks.withType<KotlinCompile> {
val outputDir = layout.buildDirectory.dir("composeMetrics").get().asFile.path
compilerOptions.freeCompilerArgs.addAll(
"-P", "$composePlugin:metricsDestination=$outputDir",
"-P", "$composePlugin:reportsDestination=$outputDir",
)
if (enableComposeMetrics && name in publicModules) {
val outputDir = layout.buildDirectory.dir("composeMetrics").get().asFile
metricsDestination = outputDir
reportsDestination = outputDir
}
}
}

plugins.withId("org.jetbrains.compose") {
tasks.withType<KotlinCompile> {
val outputDir = rootDir.resolve("coil-core/compose_compiler_config.conf").path
compilerOptions.freeCompilerArgs.addAll(
"-P", "$composePlugin:stabilityConfigurationPath=$outputDir",
)
plugins.withId("dev.drewhamilton.poko") {
extensions.configure<PokoPluginExtension> {
pokoAnnotation = "coil3/annotation/Data"
}
}

Expand Down
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repositories {
dependencies {
implementation(libs.gradlePlugin.android)
implementation(libs.gradlePlugin.jetbrainsCompose)
implementation(libs.gradlePlugin.composeCompiler)
implementation(libs.gradlePlugin.kotlin)
implementation(libs.gradlePlugin.mavenPublish)
}
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/coil3/skikoWasm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ private value class ResolvedDependencyDescriptor(
private val dependency: ResolvedDependency,
) : DependencyDescriptor {

override val group: String?
override val group: String
get() = dependency.moduleGroup

override val name: String?
override val name: String
get() = dependency.moduleName

override val version: String?
override val version: String
get() = dependency.moduleVersion
}

Expand Down
1 change: 1 addition & 0 deletions coil-compose-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
id("kotlinx-atomicfu")
id("dev.drewhamilton.poko")
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
id("androidx.baselineprofile")
}

Expand Down
2 changes: 1 addition & 1 deletion coil-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id("com.android.library")
id("kotlin-multiplatform")
id("kotlinx-atomicfu")
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
}

addAllMultiplatformTargets()
Expand Down
8 changes: 3 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ androidx-activity = "1.9.0"
androidx-benchmark = "1.2.4"
androidx-lifecycle = "2.7.0"
coroutines = "1.8.0"
jetbrains-compose = "1.6.2"
jetbrains-compose-compiler = "2.0.0-RC2"
jetbrains-compose = "1.6.10-rc01"
kotlin = "2.0.0-RC2"
ktlint = "1.1.0"
ktor = "2.3.11"
Expand All @@ -16,7 +15,7 @@ roborazzi = "1.15.0"
skiko = "0.8.4"

[plugins]
baselineProfile = { id = "androidx.baselineprofile", version.ref = "androidx-benchmark"}
baselineProfile = { id = "androidx.baselineprofile", version.ref = "androidx-benchmark" }
binaryCompatibility = "org.jetbrains.kotlinx.binary-compatibility-validator:0.14.0"
dokka = "org.jetbrains.dokka:1.9.20"
poko = "dev.drewhamilton.poko:0.16.0-SNAPSHOT"
Expand All @@ -26,6 +25,7 @@ spotless = "com.diffplug.spotless:6.25.0"
gradlePlugin-android = "com.android.tools.build:gradle:8.4.0"
gradlePlugin-atomicFu = "org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.24.0"
gradlePlugin-jetbrainsCompose = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jetbrains-compose" }
gradlePlugin-composeCompiler = { module = "org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin", version.ref = "kotlin" }
gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.28.0"
gradlePlugin-paparazzi = { module = "app.cash.paparazzi:paparazzi-gradle-plugin", version.ref = "paparazzi" }
Expand All @@ -52,8 +52,6 @@ androidx-test-runner = "androidx.test:runner:1.5.2"
androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.3.0"
androidx-vectordrawable-animated = "androidx.vectordrawable:vectordrawable-animated:1.2.0"

jetbrains-compose-compiler = { module = "org.jetbrains.kotlin:kotlin-compose-compiler-plugin-embeddable", version.ref = "jetbrains-compose-compiler" }

coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
Expand Down
2 changes: 1 addition & 1 deletion internal/test-paparazzi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("com.android.library")
id("kotlin-android")
id("app.cash.paparazzi")
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
}

androidLibrary(name = "coil3.test.paparazzi")
Expand Down
1 change: 1 addition & 0 deletions internal/test-roborazzi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id("kotlin-android")
id("io.github.takahirom.roborazzi")
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
}

androidLibrary(name = "coil3.test.roborazzi")
Expand Down
1 change: 1 addition & 0 deletions samples/compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
id("com.android.application")
id("kotlin-multiplatform")
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
}

androidApplication(name = "sample.compose") {
Expand Down

0 comments on commit d84ebea

Please sign in to comment.