-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert STAR sample to KMP #1103
Changes from 39 commits
a0254a3
1510f37
41af3e6
f105cfd
364cd27
b2a95f4
fc91c6a
7c2aca1
fd6951f
1bc471c
6bac40c
3b62dfc
5896b7d
e7eaee9
c1b9af5
986a5eb
c182c2d
a2ac08c
908a873
be41cf6
9135336
27cdde7
7bc1b5e
4f3dda9
27496b0
3c994bd
3e81bf9
ca26de7
461f53f
d608b9f
7360d2e
c0c7b32
e8a136b
1efe41e
396e1b2
655fbf4
6849346
5096784
46747dd
c8cdad0
4d85c60
a4bb63a
f527798
9ec3e30
ebe86c1
2426c77
adbda8c
b148272
a2ca059
cd63a5f
eb4566f
b3f1354
da0d732
4c2a768
3a2dbe8
30733a6
1215b4c
d9a0bbc
fa28fe3
c3b34a7
b949d2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,11 +31,17 @@ org.gradle.parallel=true | |
org.gradle.configureondemand=true | ||
org.gradle.caching=true | ||
|
||
# Disable noisy DAGP stability warning | ||
dependency.analysis.compatibility=NONE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opportunistic noise cleanup |
||
|
||
# Disable noisy stability warning | ||
kotlin.mpp.stability.nowarn=true | ||
kotlin.mpp.androidSourceSetLayoutVersion=2 | ||
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true | ||
|
||
# https://kotlinlang.org/docs/ksp-multiplatform.html#avoid-the-ksp-configuration-on-ksp-1-0-1 | ||
systemProp.allowAllTargetConfiguration=false | ||
|
||
# Enable for Compose iOS | ||
org.jetbrains.compose.experimental.uikit.enabled=true | ||
# Enable for Compose Web | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ anvil = "2.4.8" | |
atomicfu = "0.23.1" | ||
benchmark = "1.2.2" | ||
coil = "2.5.0" | ||
coil3 = "3.0.0-alpha01" | ||
compose-animation = "1.5.4" | ||
# Pre-release versions for testing Kotlin previews can be found here | ||
# https://androidx.dev/storage/compose-compiler/repository | ||
|
@@ -31,14 +32,15 @@ detekt = "1.23.4" | |
dokka = "1.9.10" | ||
eithernet = "1.8.0" | ||
jdk = "20" | ||
jvmTarget = "11" | ||
kct = "0.4.0" | ||
kotlin = "1.9.22" | ||
kotlinpoet = "1.15.3" | ||
kotlinx-coroutines = "1.7.3" | ||
ksp = "1.9.22-1.0.16" | ||
ktfmt = "0.46" | ||
ktor = "2.3.7" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required for Coil 3, backed by OkHttp on JVM |
||
leakcanary = "2.13" | ||
material = "1.6.1" | ||
material-composeThemeAdapter = "1.2.1" | ||
mavenPublish = "0.26.0" | ||
molecule = "1.3.2" | ||
|
@@ -79,6 +81,7 @@ kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref | |
kotlin-plugin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } | ||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"} | ||
mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" } | ||
molecule = { id = "app.cash.molecule", version.ref = "molecule" } | ||
mosaic = { id = "com.jakewharton.mosaic", version.ref = "mosaic" } | ||
moshiGradlePlugin = { id = "dev.zacsweers.moshix", version.ref = "moshix" } | ||
paparazzi = { id = "app.cash.paparazzi", version.ref = "paparazzi" } | ||
|
@@ -100,7 +103,6 @@ androidx-browser = { module = "androidx.browser:browser", version.ref = "android | |
####### Compose | ||
# You must enable the SlackProperties.enableCompose property to use these. | ||
androidx-compose-accompanist-appCompatThemeAdapter = { module = "com.google.accompanist:accompanist-appcompat-theme", version.ref = "accompanist" } | ||
androidx-compose-accompanist-coil = { module = "com.google.accompanist:accompanist-coil", version.ref = "accompanist" } | ||
androidx-compose-accompanist-flowlayout = { module = "com.google.accompanist:accompanist-flowlayout", version.ref = "accompanist" } | ||
androidx-compose-accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist" } | ||
androidx-compose-accompanist-pager-indicators = { module = "com.google.accompanist:accompanist-pager-indicators", version.ref = "accompanist" } | ||
|
@@ -119,10 +121,8 @@ androidx-compose-integration-materialThemeAdapter = { module = "com.google.andro | |
androidx-compose-integration-rxjava3 = { module = "androidx.compose.runtime:runtime-rxjava3", version.ref = "compose-runtime" } | ||
# Material design icons | ||
androidx-compose-material-icons = { module = "androidx.compose.material:material-icons-core", version.ref = "compose-material" } | ||
androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose-material" } | ||
androidx-compose-material-material = { module = "androidx.compose.material:material", version.ref = "compose-material" } | ||
androidx-compose-material-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" } | ||
androidx-compose-material-material3-windowSizeClass = { module = "androidx.compose.material3:material3-window-size-class", version.ref = "compose-material3" } | ||
# Runtime artifact, must be manually applied. | ||
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "compose-runtime" } | ||
androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata", version.ref = "compose-runtime" } | ||
|
@@ -158,6 +158,7 @@ androidx-test-monitor = "androidx.test:monitor:1.6.1" | |
androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.3.0-beta01" | ||
|
||
anvil-annotations = { module = "com.squareup.anvil:annotations", version.ref = "anvil" } | ||
anvil-annotations-optional = { module = "com.squareup.anvil:annotations-optional", version.ref = "anvil" } | ||
|
||
atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" } | ||
|
||
|
@@ -171,19 +172,29 @@ clikt = "com.github.ajalt.clikt:clikt:4.2.1" | |
coil = { module = "io.coil-kt:coil", version.ref = "coil" } | ||
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } | ||
coil-test = { module = "io.coil-kt:coil-test", version.ref = "coil" } | ||
coil3 = { module = "io.coil-kt.coil3:coil", version.ref = "coil3" } | ||
coil3-compose = { module = "io.coil-kt.coil3:coil-compose-core", version.ref = "coil3" } | ||
coil3-network = { module = "io.coil-kt.coil3:coil-network", version.ref = "coil3" } | ||
coil3-test = { module = "io.coil-kt.coil3:coil-test", version.ref = "coil3" } | ||
|
||
compose-compilerJb = { module = "org.jetbrains.compose.compiler:compiler", version.ref = "compose-jb-compiler" } | ||
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose-jb" } | ||
compose-runtime-saveable = { module = "org.jetbrains.compose.runtime:runtime-saveable", version.ref = "compose-jb" } | ||
compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "compose-jb" } | ||
compose-uiUtil = { module = "org.jetbrains.compose.ui:ui-util", version.ref = "compose-jb" } | ||
compose-ui-testing-junit = { module = "org.jetbrains.compose.ui:ui-test-junit4", version.ref = "compose-jb" } | ||
compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "compose-jb" } | ||
compose-ui-tooling-data = { module = "org.jetbrains.compose.ui:ui-tooling-data", version.ref = "compose-jb" } | ||
compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "compose-jb" } | ||
compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "compose-jb" } | ||
compose-material-icons = { module = "org.jetbrains.compose.material:material-icons-core", version.ref = "compose-jb" } | ||
compose-material-iconsExtended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "compose-jb" } | ||
compose-material-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose-jb" } | ||
compose-material-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose-jb" } | ||
|
||
coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } | ||
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" } | ||
coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" } | ||
coroutines-rxjava = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3", version.ref = "kotlinx-coroutines" } | ||
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } | ||
|
||
|
@@ -195,6 +206,7 @@ detektPlugins-twitterCompose = "com.twitter.compose.rules:detekt:0.0.26" | |
desugarJdkLibs = "com.android.tools:desugar_jdk_libs:2.0.4" | ||
|
||
eithernet = { module = "com.slack.eithernet:eithernet", version.ref = "eithernet" } | ||
eithernet-testFixtures = { module = "com.slack.eithernet:eithernet", version.ref = "eithernet" } | ||
|
||
hilt = { module = "com.google.dagger:hilt-core", version.ref = "dagger" } | ||
jline = "org.jline:jline:3.25.0" | ||
|
@@ -213,11 +225,20 @@ ksp = { module = "com.google.devtools.ksp:symbol-processing", version.ref = "ksp | |
ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" } | ||
# Only present to trigger automatic renovate updates | ||
ktfmt = { module = "com.facebook:ktfmt", version.ref = "ktfmt" } | ||
|
||
ktor-client = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } | ||
ktor-client-contentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } | ||
ktor-client-engine-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } | ||
ktor-client-engine-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" } | ||
ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } | ||
|
||
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } | ||
leakcanary-android-instrumentation = { module = "com.squareup.leakcanary:leakcanary-android-instrumentation", version.ref = "leakcanary" } | ||
|
||
lints-compose = "com.slack.lint.compose:compose-lint-checks:1.2.0" | ||
|
||
material = "com.google.android.material:material:1.11.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required for M3 themes in themes.xml |
||
|
||
molecule-runtime = { module = "app.cash.molecule:molecule-runtime", version.ref = "molecule" } | ||
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" } | ||
moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" } | ||
|
@@ -237,6 +258,7 @@ roborazzi-rules = { module = "io.github.takahirom.roborazzi:roborazzi-junit-rule | |
rxjava = "io.reactivex.rxjava3:rxjava:3.1.8" | ||
|
||
sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" } | ||
sqldelight-driver-jdbc = { module = "app.cash.sqldelight:sqlite-driver", version.ref = "sqldelight" } | ||
sqldelight-coroutines = { module = "app.cash.sqldelight:coroutines-extensions-jvm", version.ref = "sqldelight" } | ||
sqldelight-primitiveAdapters = { module = "app.cash.sqldelight:primitive-adapters", version.ref = "sqldelight" } | ||
|
||
|
@@ -252,6 +274,8 @@ turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" } | |
# KMP UUID | ||
uuid = "com.benasher44:uuid:0.8.2" | ||
|
||
windowSizeClass = "dev.chrisbanes.material3:material3-window-size-class-multiplatform:0.3.2" | ||
|
||
[bundles] | ||
androidx-activity = ["androidx-activity", "androidx-activity-ktx"] | ||
compose-ui = ["androidx-compose-foundation", "androidx-compose-material-material", "androidx-compose-material-material3", "androidx-compose-ui-ui", "androidx-compose-ui-tooling-preview"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
// Copyright (C) 2022 Slack Technologies, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
/* | ||
* Copyright 2023 The Android Open Source Project | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed this header while I was at it |
||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.slack.circuit.sample.counter | ||
|
||
import androidx.compose.material.icons.materialIcon | ||
import androidx.compose.material.icons.materialPath | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
|
||
// Copied because it's not available in compose-desktop yet. | ||
// Copied because it's from the icons-extended dependency, which is huge | ||
@Suppress("MagicNumber") | ||
val Remove: ImageVector | ||
get() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This extra logging was helpful to figure out that KSP couldn't see through the actualized typealias so opted to leave it in