Skip to content

Commit

Permalink
Merge pull request #1242 from square/sedwards/update-versions
Browse files Browse the repository at this point in the history
Update to Kotlin 1.9.24, w/ corresponding Compose, KSP
  • Loading branch information
steve-the-edwards authored Dec 16, 2024
2 parents 7a0d51d + 6e59250 commit 74635d9
Show file tree
Hide file tree
Showing 46 changed files with 333 additions and 287 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
}

// Unclear: there are kotlin_builtins duplication between 1.5.20 and 1.6.10?
packagingOptions {
packaging {
resources.excludes.add("**/*.kotlin_*")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
}

// Collisions in packaging.
packagingOptions {
packaging {
resources.excludes.add("META-INF/AL2.0")
resources.excludes.add("META-INF/LGPL2.1")
}
Expand Down
2 changes: 1 addition & 1 deletion build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
// Hardcoded as this is upstream of the version catalog. Keep this in sync with that.
kotlin("jvm") version "1.9.10" apply false
kotlin("jvm") version "1.9.24" apply false
}

dependencyResolutionManagement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.squareup.workflow1.buildsrc
import com.android.build.gradle.TestedExtension
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import com.rickbusarow.kgx.dependency
import com.rickbusarow.kgx.library
import com.rickbusarow.kgx.libsCatalog
import com.squareup.workflow1.buildsrc.internal.implementation
import com.squareup.workflow1.buildsrc.internal.invoke
Expand Down Expand Up @@ -31,8 +32,8 @@ class AndroidSampleAppPlugin : Plugin<Project> {
implementation(target.project(":workflow-runtime"))
implementation(target.project(":workflow-config:config-android"))

implementation(target.libsCatalog.dependency("androidx-appcompat"))
implementation(target.libsCatalog.dependency("timber"))
implementation(target.libsCatalog.library("androidx-appcompat"))
implementation(target.libsCatalog.library("timber"))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.squareup.workflow1.buildsrc

import com.android.build.gradle.TestedExtension
import com.rickbusarow.kgx.dependency
import com.rickbusarow.kgx.library
import com.rickbusarow.kgx.libsCatalog
import com.squareup.workflow1.buildsrc.internal.androidTestImplementation
import com.squareup.workflow1.buildsrc.internal.invoke
Expand All @@ -28,9 +29,9 @@ class AndroidUiTestsPlugin : Plugin<Project> {
target.dependencies {
androidTestImplementation(target.project(":workflow-ui:internal-testing-android"))

androidTestImplementation(target.libsCatalog.dependency("androidx-test-espresso-core"))
androidTestImplementation(target.libsCatalog.dependency("androidx-test-junit"))
androidTestImplementation(target.libsCatalog.dependency("squareup-leakcanary-instrumentation"))
androidTestImplementation(target.libsCatalog.library("androidx-test-espresso-core"))
androidTestImplementation(target.libsCatalog.library("androidx-test-junit"))
androidTestImplementation(target.libsCatalog.library("squareup-leakcanary-instrumentation"))
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.squareup.workflow1.buildsrc

import com.rickbusarow.kgx.dependency
import com.rickbusarow.kgx.library
import com.rickbusarow.kgx.libsCatalog
import com.squareup.workflow1.buildsrc.internal.androidTestImplementation
import com.squareup.workflow1.buildsrc.internal.invoke
Expand All @@ -15,7 +16,7 @@ class ComposeUiTestsPlugin : Plugin<Project> {
target.dependencies {
androidTestImplementation(target.project(":workflow-ui:internal-testing-compose"))

androidTestImplementation(target.libsCatalog.dependency("androidx-compose-ui-test-junit4"))
androidTestImplementation(target.libsCatalog.library("androidx-compose-ui-test-junit4"))
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
package com.squareup.workflow1.buildsrc

import org.gradle.api.Project
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTests

fun KotlinMultiplatformExtension.iosWithSimulatorArm64(target: Project) {
ios()
fun KotlinMultiplatformExtension.iosWithSimulatorArm64() {
iosX64()
iosArm64()
iosSimulatorArm64()

sourceSets.getByName("iosSimulatorArm64Main") {
it.dependsOn(sourceSets.getByName("iosMain"))
}
sourceSets.getByName("iosSimulatorArm64Test") {
it.dependsOn(sourceSets.getByName("iosTest"))
}
}
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ tasks.register<Copy>("siteDokka") {
// Copy the files instead of configuring a different output directory on the dokka task itself
// since the default output directories disambiguate between different types of outputs, and our
// custom directory doesn't.
from(buildDir.resolve("dokka/htmlMultiModule/workflow"))
into(buildDir.resolve("dokka/workflow"))
from(layout.buildDirectory.file("dokka/htmlMultiModule/workflow"))
into(layout.buildDirectory.file("dokka/workflow"))
}
58 changes: 30 additions & 28 deletions dependencies/classpath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.8.9
com.google.crypto.tink:tink:1.7.0
com.google.dagger:dagger:2.28.3
com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.10-1.0.13
com.google.devtools.ksp:symbol-processing-api:1.9.24-1.0.20
com.google.devtools.ksp:symbol-processing-common-deps:1.9.24-1.0.20
com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.24-1.0.20
com.google.errorprone:error_prone_annotations:2.11.0
com.google.flatbuffers:flatbuffers-java:1.12.0
com.google.guava:failureaccess:1.0.1
Expand Down Expand Up @@ -135,36 +137,36 @@ org.jdom:jdom2:2.0.6
org.jetbrains.dokka:dokka-core:1.9.10
org.jetbrains.dokka:dokka-gradle-plugin:1.9.10
org.jetbrains.intellij.deps:trove4j:1.0.20200330
org.jetbrains.kotlin:kotlin-android-extensions:1.9.10
org.jetbrains.kotlin:kotlin-bom:1.9.10
org.jetbrains.kotlin:kotlin-build-tools-api:1.9.10
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-compiler-runner:1.9.10
org.jetbrains.kotlin:kotlin-daemon-client:1.9.10
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-gradle-plugin-annotations:1.9.10
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.10
org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.9.10
org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.9.10
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.9.10
org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10
org.jetbrains.kotlin:kotlin-gradle-plugins-bom:1.9.10
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.9.10
org.jetbrains.kotlin:kotlin-native-utils:1.9.10
org.jetbrains.kotlin:kotlin-project-model:1.9.10
org.jetbrains.kotlin:kotlin-android-extensions:1.9.24
org.jetbrains.kotlin:kotlin-bom:1.9.24
org.jetbrains.kotlin:kotlin-build-tools-api:1.9.24
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.24
org.jetbrains.kotlin:kotlin-compiler-runner:1.9.24
org.jetbrains.kotlin:kotlin-daemon-client:1.9.24
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.24
org.jetbrains.kotlin:kotlin-gradle-plugin-annotations:1.9.24
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.24
org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.9.24
org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.9.24
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.9.24
org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24
org.jetbrains.kotlin:kotlin-gradle-plugins-bom:1.9.24
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.9.24
org.jetbrains.kotlin:kotlin-native-utils:1.9.24
org.jetbrains.kotlin:kotlin-project-model:1.9.24
org.jetbrains.kotlin:kotlin-reflect:1.9.10
org.jetbrains.kotlin:kotlin-scripting-common:1.9.10
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.10
org.jetbrains.kotlin:kotlin-serialization:1.9.10
org.jetbrains.kotlin:kotlin-scripting-common:1.9.24
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.9.24
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.9.24
org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.24
org.jetbrains.kotlin:kotlin-serialization:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.24
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-tooling-core:1.9.10
org.jetbrains.kotlin:kotlin-util-io:1.9.10
org.jetbrains.kotlin:kotlin-util-klib:1.9.10
org.jetbrains.kotlin:kotlin-tooling-core:1.9.24
org.jetbrains.kotlin:kotlin-util-io:1.9.24
org.jetbrains.kotlin:kotlin-util-klib:1.9.24
org.jetbrains.kotlinx:binary-compatibility-validator:0.13.2
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.3
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.3
Expand Down
13 changes: 7 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ androidx-activity = "1.6.1"
androidx-appcompat = "1.6.1"
androidx-benchmark = "1.2.3"
androidx-cardview = "1.0.0"
androidx-compose-compiler = "1.5.3"
androidx-compose-compiler = "1.5.14"
# see https://developer.android.com/jetpack/compose/bom/bom-mapping
androidx-compose-bom = "2023.01.00"
androidx-compose-bom = "2024.09.02"
androidx-constraintlayout = "2.1.4"
androidx-core = "1.12.0"
androidx-fragment = "1.3.6"
androidx-gridlayout = "1.0.0"
androidx-lifecycle = "2.6.1"
androidx-lifecycle = "2.8.7"
androidx-navigation = "2.4.0-alpha09"
androidx-paging = "3.0.1"
androidx-profileinstaller = "1.2.0-alpha02"
Expand All @@ -42,7 +42,7 @@ dependencyGuard = "0.4.3"

google-accompanist = "0.18.0"
google-dagger = "2.40.5"
google-ksp = "1.9.10-1.0.13"
google-ksp = "1.9.24-1.0.20"
google-material = "1.4.0"

groovy = "3.0.9"
Expand All @@ -53,7 +53,7 @@ kgx = "0.1.12"
kotest = "5.1.0"
# Keep this in sync with what is hard-coded in build-logic/settings.gradle.kts as that is upstream
# of loading the library versions from this file but should be the same.
kotlin = "1.9.10"
kotlin = "1.9.24"

kotlinx-binary-compatibility = "0.13.2"
kotlinx-coroutines = "1.7.3"
Expand Down Expand Up @@ -120,9 +120,9 @@ androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", ver

androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }

androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" }

androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
androidx-compose-material = { module = "androidx.compose.material:material" }

androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" }
Expand All @@ -145,6 +145,7 @@ androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref
androidx-gridlayout = { module = "androidx.gridlayout:gridlayout", version.ref = "androidx-gridlayout" }

androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "androidx-lifecycle" }
androidx-lifecycle-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" }
androidx-lifecycle-core = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "androidx-lifecycle" }
androidx-lifecycle-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-testing = { module = "androidx.lifecycle:lifecycle-runtime-testing", version.ref = "androidx-lifecycle" }
Expand Down
9 changes: 4 additions & 5 deletions internal-testing-utils/dependencies/runtimeClasspath.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
org.jetbrains.kotlin:kotlin-bom:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-bom:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.24
org.jetbrains.kotlin:kotlin-stdlib:1.9.24
org.jetbrains:annotations:13.0
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.animation.with
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.layout.Box
import androidx.compose.material.Button
import androidx.compose.material.Text
Expand Down Expand Up @@ -77,7 +77,7 @@ private fun AnimatedCounter(
AnimatedContent(
targetState = counterValue,
transitionSpec = {
(slideInVertically() + fadeIn() with slideOutVertically() + fadeOut())
((slideInVertically() + fadeIn()).togetherWith(slideOutVertically() + fadeOut()))
.using(SizeTransform(clip = false))
}
) { content(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.forEachGesture
import androidx.compose.foundation.gestures.awaitEachGesture
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.height
Expand Down Expand Up @@ -148,14 +148,13 @@ private fun launchSample(
startActivity(context, intent, options)
}

private fun Modifier.disableTouchInput(): Modifier = pointerInput(Unit) {
forEachGesture {
awaitPointerEventScope {
private fun Modifier.disableTouchInput(): Modifier =
pointerInput(Unit) {
awaitEachGesture {
awaitPointerEvent(Initial).let { event ->
event.changes.forEach { change ->
if (change.pressed != change.previousPressed) change.consume()
}
}
}
}
}
10 changes: 5 additions & 5 deletions trace-encoder/dependencies/runtimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ com.squareup.moshi:moshi-adapters:1.15.0
com.squareup.moshi:moshi:1.15.0
com.squareup.okio:okio-jvm:3.3.0
com.squareup.okio:okio:3.3.0
org.jetbrains.kotlin:kotlin-bom:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-bom:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.24
org.jetbrains.kotlin:kotlin-stdlib:1.9.24
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
com.squareup.okio:okio-jvm:3.3.0
com.squareup.okio:okio:3.3.0
org.jetbrains.kotlin:kotlin-bom:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-bom:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.24
org.jetbrains.kotlin:kotlin-stdlib:1.9.24
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
Expand Down
10 changes: 5 additions & 5 deletions workflow-config/config-jvm/dependencies/runtimeClasspath.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
com.squareup.okio:okio-jvm:3.3.0
com.squareup.okio:okio:3.3.0
org.jetbrains.kotlin:kotlin-bom:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-bom:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.24
org.jetbrains.kotlin:kotlin-stdlib:1.9.24
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
Expand Down
2 changes: 1 addition & 1 deletion workflow-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
kotlin {
val targets = project.findProperty("workflow.targets") ?: "kmp"
if (targets == "kmp" || targets == "ios") {
iosWithSimulatorArm64(project)
iosWithSimulatorArm64()
}
if (targets == "kmp" || targets == "jvm") {
jvm { withJava() }
Expand Down
9 changes: 4 additions & 5 deletions workflow-core/dependencies/jsRuntimeClasspath.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
com.squareup.okio:okio-js:3.3.0
com.squareup.okio:okio:3.3.0
org.jetbrains.kotlin:kotlin-bom:1.9.10
org.jetbrains.kotlin:kotlin-dom-api-compat:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-js:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-bom:1.9.24
org.jetbrains.kotlin:kotlin-dom-api-compat:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-js:1.9.24
org.jetbrains.kotlin:kotlin-stdlib:1.9.24
org.jetbrains.kotlin:kotlinx-atomicfu-runtime:1.8.20
org.jetbrains.kotlinx:atomicfu-js:0.21.0
org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
org.jetbrains:annotations:13.0
8 changes: 4 additions & 4 deletions workflow-core/dependencies/jvmRuntimeClasspath.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
com.squareup.okio:okio-jvm:3.3.0
com.squareup.okio:okio:3.3.0
org.jetbrains.kotlin:kotlin-bom:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-bom:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.24
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.24
org.jetbrains.kotlin:kotlin-stdlib:1.9.24
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
Expand Down
Loading

0 comments on commit 74635d9

Please sign in to comment.