Skip to content

Commit

Permalink
Kotlin 1.7.10, Compose compiler 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
motorro committed Aug 15, 2022
1 parent 62e52d7 commit a2d14f8
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 66 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,9 @@ adopt it's output to your platform view components.

## Note on multiplatform ##
Although the logic for registration flow of `Welcome` app is made common,
I've failed to implement registration view in `androidMain` source due to some Kotlin-multiplatform
glitches or misconfiguration. The problem is Android sources fail to import common dependencies
from other common modules. If anyone could help me fixing that issue and moving `register` module
to `commonregister` I'll much appreciate this. Also if someone would like to try building an iOS
sample around `commonregister` module - that will be awesome!
I've failed to implement registration view in `androidMain` source due to [some Kotlin-multiplatform
glitches](https://youtrack.jetbrains.com/issue/KTIJ-22056/KMM-Cant-reference-shared-module-commonMain-source-set-classes-from-another-modules-androidMain-source-set)
or misconfiguration. The problem is Android sources fail to import common dependencies from other
common modules. If anyone could help me fixing that issue and moving `register` module to
`commonregister` I'll much appreciate this. Also if someone would like to try building an iOS sample
around `commonregister` module - that will be awesome!
1 change: 0 additions & 1 deletion androidcore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ dependencies {

implementation libs.bundles.compose.core
implementation libs.compose.activity
implementation libs.compose.navigation
implementation libs.compose.foundation
implementation libs.compose.foundation.layouts

Expand Down
21 changes: 10 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
kotlin = "1.7.0"
kotlin = "1.7.10"
coroutines = "1.6.4"
compose = "1.1.1"
compose_compiler = "1.2.0"
compose = "1.2.1"
compose_compiler = "1.3.0"
hilt = "2.42"

[plugins]
android_app = { id = "com.android.application", version = "7.2.1" }
android_lib = { id = "com.android.library", version = "7.2.1" }
android_app = { id = "com.android.application", version = "7.2.2" }
android_lib = { id = "com.android.library", version = "7.2.2" }
kotlin_jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin_kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
Expand All @@ -34,11 +34,10 @@ compose-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "co
compose-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
compose-test-junit = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" }
compose-activity = { module = "androidx.activity:activity-compose", version.ref = "compose" }
compose-livedata = { module = "androidx.compose.runtime:runtime-livedata", version = "1.1.1" }
compose-navigation = { module = "androidx.navigation:navigation-compose", version = "2.4.2" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version = "1.2.0-beta01" }
compose-foundation-layouts = { module = "androidx.compose.foundation:foundation-layout", version = "1.2.0-beta01" }
compose-activity = { module = "androidx.activity:activity-compose", version = "1.5.1" }
compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version = "2.5.1" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
compose-foundation-layouts = { module = "androidx.compose.foundation:foundation-layout", version.ref = "compose" }

hilt_android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
hilt_compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }
Expand All @@ -64,5 +63,5 @@ test-mockk-common = { module = "io.mockk:mockk-common", version = "1.12.3" }
test-kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }

[bundles]
compose-core = ["compose-ui", "compose-tooling-preview", "compose-material", "compose-livedata"]
compose-core = ["compose-ui", "compose-tooling-preview", "compose-material"]
test-core = ["test-kotlin", "test-junit", "test-mockk"]
76 changes: 32 additions & 44 deletions kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"

brace-expansion@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
dependencies:
balanced-match "^1.0.0"

braces@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
Expand Down Expand Up @@ -126,10 +133,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==

[email protected].3:
version "4.3.3"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664"
integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==
[email protected].4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
dependencies:
ms "2.1.2"

Expand Down Expand Up @@ -217,11 +224,6 @@ [email protected]:
once "^1.3.0"
path-is-absolute "^1.0.0"

[email protected]:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==

has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
Expand Down Expand Up @@ -284,11 +286,6 @@ is-unicode-supported@^0.1.0:
resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7"
integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==

isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==

[email protected]:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
Expand All @@ -311,12 +308,12 @@ [email protected]:
chalk "^4.1.0"
is-unicode-supported "^0.1.0"

minimatch@3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
minimatch@5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b"
integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==
dependencies:
brace-expansion "^1.1.7"
brace-expansion "^2.0.1"

minimatch@^3.0.4:
version "3.1.2"
Expand All @@ -325,32 +322,30 @@ minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"

mocha@9.2.1:
version "9.2.1"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.1.tgz#a1abb675aa9a8490798503af57e8782a78f1338e"
integrity sha512-T7uscqjJVS46Pq1XDXyo9Uvey9gd3huT/DD9cYBb4K2Xc/vbKRPUWK067bxDQRK0yIz6Jxk73IrnimvASzBNAQ==
mocha@10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9"
integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==
dependencies:
"@ungap/promise-all-settled" "1.1.2"
ansi-colors "4.1.1"
browser-stdout "1.3.1"
chokidar "3.5.3"
debug "4.3.3"
debug "4.3.4"
diff "5.0.0"
escape-string-regexp "4.0.0"
find-up "5.0.0"
glob "7.2.0"
growl "1.10.5"
he "1.2.0"
js-yaml "4.1.0"
log-symbols "4.1.0"
minimatch "3.0.4"
minimatch "5.0.1"
ms "2.1.3"
nanoid "3.2.0"
nanoid "3.3.3"
serialize-javascript "6.0.0"
strip-json-comments "3.1.1"
supports-color "8.1.1"
which "2.0.2"
workerpool "6.2.0"
workerpool "6.2.1"
yargs "16.2.0"
yargs-parser "20.2.4"
yargs-unparser "2.0.0"
Expand All @@ -365,10 +360,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

nanoid@3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c"
integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==
nanoid@3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==

normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
Expand Down Expand Up @@ -497,17 +492,10 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"

[email protected]:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"

[email protected]:
version "6.2.0"
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b"
integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==
[email protected]:
version "6.2.1"
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==

wrap-ansi@^7.0.0:
version "7.0.0"
Expand Down
2 changes: 1 addition & 1 deletion lce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dependencies {

implementation libs.bundles.compose.core
implementation libs.compose.activity
implementation libs.compose.navigation
implementation libs.compose.viewmodel
implementation libs.compose.foundation
implementation libs.compose.foundation.layouts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package com.motorro.statemachine.lce.ui

import android.annotation.SuppressLint
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.*
Expand All @@ -31,6 +32,7 @@ import com.motorro.statemachine.lce.data.LceUiState
import com.motorro.statemachine.lce.model.LceViewModel

@Composable
@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
fun LceScreen(onExit: @Composable () -> Unit) {
val model: LceViewModel = viewModel()
val state = model.state.collectAsState(LceUiState.Loading)
Expand Down
1 change: 0 additions & 1 deletion login/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {

implementation libs.bundles.compose.core
implementation libs.compose.activity
implementation libs.compose.navigation
implementation libs.compose.foundation
implementation libs.compose.foundation.layouts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ internal class PasswordEntryStateTest : BaseStateTest() {

@Test
fun returnsToEmailEntryOnBack() {
val data = LoginDataState(GOOD)
every { host.backToEmailEntry() } just Runs
val state = createState()

Expand Down
1 change: 0 additions & 1 deletion register/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {

implementation libs.bundles.compose.core
implementation libs.compose.activity
implementation libs.compose.navigation
implementation libs.compose.foundation
implementation libs.compose.foundation.layouts

Expand Down
2 changes: 1 addition & 1 deletion welcome/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ dependencies {

implementation libs.bundles.compose.core
implementation libs.compose.activity
implementation libs.compose.navigation
implementation libs.compose.viewmodel
implementation libs.compose.foundation
implementation libs.compose.foundation.layouts

Expand Down

0 comments on commit a2d14f8

Please sign in to comment.