Skip to content

Commit 182c3ee

Browse files
jameswardzsmb13
andauthored
Bump versions, clean up plugin configuration (android#12)
* bump versions and build cleanup * bump nativecoroutines * Bump several versions, clean up plugin configuration --------- Co-authored-by: Márton Braun
1 parent 8b5385b commit 182c3ee

File tree

10 files changed

+62
-51
lines changed

10 files changed

+62
-51
lines changed

DiceRoller/androidApp/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
* limitations under the License.
1515
*/
1616
plugins {
17-
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
1817
alias(libs.plugins.android.application)
19-
id("org.jetbrains.kotlin.android")
18+
alias(libs.plugins.kotlin.android)
2019
}
2120

2221
android {
@@ -38,7 +37,7 @@ android {
3837
targetCompatibility = JavaVersion.VERSION_1_8
3938
}
4039
composeOptions {
41-
kotlinCompilerExtensionVersion = "1.4.4"
40+
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
4241
}
4342
kotlinOptions {
4443
jvmTarget = "1.8"
@@ -49,7 +48,6 @@ dependencies {
4948
implementation(project(":shared"))
5049

5150
implementation(platform(libs.androidx.compose.bom))
52-
5351
implementation(libs.androidx.lifecycle.viewmodel.compose)
5452
implementation(libs.androidx.lifecycle.runtime.compose)
5553
implementation(libs.androidx.activity.compose)

DiceRoller/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
* limitations under the License.
1515
*/
1616
plugins {
17-
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
1817
alias(libs.plugins.android.application) apply false
19-
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
18+
alias(libs.plugins.android.library) apply false
19+
alias(libs.plugins.kotlin.android) apply false
20+
alias(libs.plugins.kotlin.cocoapods) apply false
2021
alias(libs.plugins.kotlin.multiplatform) apply false
22+
alias(libs.plugins.ksp) apply false
23+
alias(libs.plugins.nativecoroutines) apply false
2124
}
2225

2326
tasks.register<Delete>("clean") {

DiceRoller/gradle/libs.versions.toml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
[versions]
22
agp = "7.4.2"
3-
dataStoreVersion = "1.1.0-alpha03"
4-
kotlin = "1.8.10"
5-
nativecoroutines = "0.13.3"
6-
compose = "1.4.2"
3+
compose-compiler = "1.4.7"
4+
compose-bom = "2023.06.00"
5+
dataStoreVersion = "1.1.0-alpha04"
6+
kotlin = "1.8.21"
7+
nativecoroutines = "1.0.0-ALPHA-10"
8+
ksp = "1.8.21-1.0.11"
79
compileSdk = "33"
810
minSdk = "24"
9-
androidx-core = "1.9.0"
11+
androidx-core = "1.10.1"
1012
androidx-lifecycle = "2.6.1"
11-
activityCompose = "1.7.0"
12-
androidxComposeBom = "2023.03.00"
13+
activityCompose = "1.7.2"
1314

1415
[plugins]
1516
android-application = { id = "com.android.application", version.ref = "agp" }
17+
android-library = { id = "com.android.library", version.ref = "agp" }
18+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
19+
kotlin-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
1620
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
21+
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
1722
nativecoroutines = { id = "com.rickclephas.kmp.nativecoroutines", version.ref = "nativecoroutines" }
1823

1924
[libraries]
@@ -27,8 +32,8 @@ androidx-datastore-core-okio = { group = "androidx.datastore", name = "datastore
2732
androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "dataStoreVersion" }
2833
androidx-lifecycle-runtime-kts = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidx-lifecycle"}
2934

30-
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidxComposeBom" }
35+
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
3136
androidx-compose-material = { group = "androidx.compose.material", name = "material" }
3237
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
3338
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
34-
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
39+
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

DiceRoller/iosApp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ target 'iosApp' do
22
use_frameworks!
33
platform :ios, '14.1'
44
pod 'shared', :path => '../shared'
5-
pod 'KMPNativeCoroutinesAsync', '0.13.3'
5+
pod 'KMPNativeCoroutinesAsync', '1.0.0-ALPHA-10'
66
end

DiceRoller/iosApp/Podfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
PODS:
2-
- KMPNativeCoroutinesAsync (0.13.3):
3-
- KMPNativeCoroutinesCore (= 0.13.3)
4-
- KMPNativeCoroutinesCore (0.13.3)
2+
- KMPNativeCoroutinesAsync (1.0.0-ALPHA-10):
3+
- KMPNativeCoroutinesCore (= 1.0.0-ALPHA-10)
4+
- KMPNativeCoroutinesCore (1.0.0-ALPHA-10)
55
- shared (1.0)
66

77
DEPENDENCIES:
8-
- KMPNativeCoroutinesAsync (= 0.13.3)
8+
- KMPNativeCoroutinesAsync (= 1.0.0-ALPHA-10)
99
- shared (from `../shared`)
1010

1111
SPEC REPOS:
@@ -18,10 +18,10 @@ EXTERNAL SOURCES:
1818
:path: "../shared"
1919

2020
SPEC CHECKSUMS:
21-
KMPNativeCoroutinesAsync: 0fb5f7258e7b2bae50f03614a134bbbbfa3343ab
22-
KMPNativeCoroutinesCore: 53c5b81bf7b74c556ce595931b3cdde87d6b2e45
21+
KMPNativeCoroutinesAsync: c941aeffc6fef5ab52fa6448221d130c050a9574
22+
KMPNativeCoroutinesCore: 826573240f36e70f257c5215acab10a72b05ba82
2323
shared: d3e936b2c1df570cf43bf984e725cd24b68be937
2424

25-
PODFILE CHECKSUM: 20cbc8f6d669e90d09748fe15772591883d512bb
25+
PODFILE CHECKSUM: b69254d89a5e04a64d7a1076a395426a967d0720
2626

2727
COCOAPODS: 1.11.3

DiceRoller/iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@
1010
058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; };
1111
058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; };
1212
2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; };
13+
448BBB475161743EC2EFDCFE /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E4B92C03A079D47F9060D76 /* Pods_iosApp.framework */; };
1314
710DFC2B28E5B22200811AB5 /* GameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710DFC2A28E5B22200811AB5 /* GameView.swift */; };
1415
710DFC2D28E5B24800811AB5 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710DFC2C28E5B24700811AB5 /* SettingsView.swift */; };
1516
71B85CFE28E5F7B600E0871E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 71B85CFD28E5F7B600E0871E /* Localizable.strings */; };
1617
71D4030628E468990035E65F /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71D4030528E468990035E65F /* SettingsViewModel.swift */; };
1718
7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; };
18-
A71E3755E26CB89CEE27A62A /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79A89A657DBAF800A4813D04 /* Pods_iosApp.framework */; };
1919
/* End PBXBuildFile section */
2020

2121
/* Begin PBXFileReference section */
2222
058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
2323
058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
2424
2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; };
25-
2B15E55A9D8A1F09E204277A /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; };
25+
59AF3AC2A9B75E091DEEFDCF /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; };
26+
6E4B92C03A079D47F9060D76 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2627
710DFC2A28E5B22200811AB5 /* GameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameView.swift; sourceTree = ""; };
2728
710DFC2C28E5B24700811AB5 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; };
2829
71B85CFD28E5F7B600E0871E /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; };
2930
71D4030528E468990035E65F /* SettingsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewModel.swift; sourceTree = ""; };
3031
7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
3132
7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
3233
7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33-
79A89A657DBAF800A4813D04 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
34-
B7271A71977DE5FA71439401 /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; };
34+
83578E8C26856CC58AFE546B /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; };
3535
/* End PBXFileReference section */
3636

3737
/* Begin PBXFrameworksBuildPhase section */
3838
AE2BC44806600205BF5D4530 /* Frameworks */ = {
3939
isa = PBXFrameworksBuildPhase;
4040
buildActionMask = 2147483647;
4141
files = (
42-
A71E3755E26CB89CEE27A62A /* Pods_iosApp.framework in Frameworks */,
42+
448BBB475161743EC2EFDCFE /* Pods_iosApp.framework in Frameworks */,
4343
);
4444
runOnlyForDeploymentPostprocessing = 0;
4545
};
@@ -54,21 +54,13 @@
5454
path = "Preview Content";
5555
sourceTree = "";
5656
};
57-
13173C18A01D5F7959BD6391 /* Frameworks */ = {
58-
isa = PBXGroup;
59-
children = (
60-
79A89A657DBAF800A4813D04 /* Pods_iosApp.framework */,
61-
);
62-
name = Frameworks;
63-
sourceTree = "";
64-
};
6557
7555FF72242A565900829871 = {
6658
isa = PBXGroup;
6759
children = (
6860
7555FF7D242A565900829871 /* iosApp */,
6961
7555FF7C242A565900829871 /* Products */,
7062
A4E9137FD4450CB386A209B4 /* Pods */,
71-
13173C18A01D5F7959BD6391 /* Frameworks */,
63+
F7275733F2EF0D8EC0DD1AFE /* Frameworks */,
7264
);
7365
sourceTree = "";
7466
};
@@ -99,24 +91,32 @@
9991
A4E9137FD4450CB386A209B4 /* Pods */ = {
10092
isa = PBXGroup;
10193
children = (
102-
2B15E55A9D8A1F09E204277A /* Pods-iosApp.debug.xcconfig */,
103-
B7271A71977DE5FA71439401 /* Pods-iosApp.release.xcconfig */,
94+
59AF3AC2A9B75E091DEEFDCF /* Pods-iosApp.debug.xcconfig */,
95+
83578E8C26856CC58AFE546B /* Pods-iosApp.release.xcconfig */,
10496
);
10597
path = Pods;
10698
sourceTree = "";
10799
};
100+
F7275733F2EF0D8EC0DD1AFE /* Frameworks */ = {
101+
isa = PBXGroup;
102+
children = (
103+
6E4B92C03A079D47F9060D76 /* Pods_iosApp.framework */,
104+
);
105+
name = Frameworks;
106+
sourceTree = "";
107+
};
108108
/* End PBXGroup section */
109109

110110
/* Begin PBXNativeTarget section */
111111
7555FF7A242A565900829871 /* iosApp */ = {
112112
isa = PBXNativeTarget;
113113
buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */;
114114
buildPhases = (
115-
25664A71DE6640AE346CBED5 /* [CP] Check Pods Manifest.lock */,
115+
9DEA9F703C97A9A036D25298 /* [CP] Check Pods Manifest.lock */,
116116
7555FF77242A565900829871 /* Sources */,
117117
7555FF79242A565900829871 /* Resources */,
118118
AE2BC44806600205BF5D4530 /* Frameworks */,
119-
30E5372459F56AAAE7908ABF /* [CP] Embed Pods Frameworks */,
119+
AE61BD9B679BAC25DC47E6D1 /* [CP] Embed Pods Frameworks */,
120120
);
121121
buildRules = (
122122
);
@@ -174,7 +174,7 @@
174174
/* End PBXResourcesBuildPhase section */
175175

176176
/* Begin PBXShellScriptBuildPhase section */
177-
25664A71DE6640AE346CBED5 /* [CP] Check Pods Manifest.lock */ = {
177+
9DEA9F703C97A9A036D25298 /* [CP] Check Pods Manifest.lock */ = {
178178
isa = PBXShellScriptBuildPhase;
179179
buildActionMask = 2147483647;
180180
files = (
@@ -196,7 +196,7 @@
196196
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
197197
showEnvVarsInLog = 0;
198198
};
199-
30E5372459F56AAAE7908ABF /* [CP] Embed Pods Frameworks */ = {
199+
AE61BD9B679BAC25DC47E6D1 /* [CP] Embed Pods Frameworks */ = {
200200
isa = PBXShellScriptBuildPhase;
201201
buildActionMask = 2147483647;
202202
files = (
@@ -349,7 +349,7 @@
349349
};
350350
7555FFA6242A565B00829871 /* Debug */ = {
351351
isa = XCBuildConfiguration;
352-
baseConfigurationReference = 2B15E55A9D8A1F09E204277A /* Pods-iosApp.debug.xcconfig */;
352+
baseConfigurationReference = 59AF3AC2A9B75E091DEEFDCF /* Pods-iosApp.debug.xcconfig */;
353353
buildSettings = {
354354
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
355355
CODE_SIGN_STYLE = Automatic;
@@ -370,7 +370,7 @@
370370
};
371371
7555FFA7242A565B00829871 /* Release */ = {
372372
isa = XCBuildConfiguration;
373-
baseConfigurationReference = B7271A71977DE5FA71439401 /* Pods-iosApp.release.xcconfig */;
373+
baseConfigurationReference = 83578E8C26856CC58AFE546B /* Pods-iosApp.release.xcconfig */;
374374
buildSettings = {
375375
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
376376
CODE_SIGN_STYLE = Automatic;

DiceRoller/iosApp/iosApp/SettingsViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ final class SettingsViewModel: ObservableObject {
4848

4949
func startObservingSettings() async {
5050
do {
51-
let stream = asyncStream(for: repository.settingsNative)
51+
let stream = asyncSequence(for: repository.settings)
5252
for try await settings in stream {
5353
self.diceCount = Int(settings.diceCount)
5454
self.sideCount = Int(settings.sideCount)

DiceRoller/shared/build.gradle.kts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@
1414
* limitations under the License.
1515
*/
1616
plugins {
17-
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
1817
alias(libs.plugins.kotlin.multiplatform)
19-
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
2018
alias(libs.plugins.nativecoroutines)
21-
id("org.jetbrains.kotlin.native.cocoapods")
22-
id("com.android.library")
19+
alias(libs.plugins.ksp)
20+
alias(libs.plugins.kotlin.cocoapods)
21+
alias(libs.plugins.android.library)
2322
}
2423

2524
version = "1.0"
@@ -48,6 +47,10 @@ kotlin {
4847
}
4948
}
5049

50+
sourceSets.all {
51+
languageSettings.optIn("kotlin.experimental.ExperimentalObjCName")
52+
}
53+
5154
sourceSets {
5255
val commonMain by getting {
5356
dependencies {

DiceRoller/shared/src/commonMain/kotlin/com/google/samples/apps/diceroller/DiceSettingsRepository.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import androidx.datastore.preferences.core.Preferences
2020
import androidx.datastore.preferences.core.booleanPreferencesKey
2121
import androidx.datastore.preferences.core.edit
2222
import androidx.datastore.preferences.core.intPreferencesKey
23+
import com.rickclephas.kmp.nativecoroutines.NativeCoroutines
2324
import kotlinx.coroutines.CoroutineScope
2425
import kotlinx.coroutines.Dispatchers
2526
import kotlinx.coroutines.flow.Flow
@@ -41,6 +42,7 @@ class DiceSettingsRepository(
4142
private val sideCountKey = intPreferencesKey("side_count")
4243
private val uniqueRollsOnlyKey = booleanPreferencesKey("unique_rolls_only")
4344

45+
@NativeCoroutines
4446
val settings: Flow<DiceSettings> = dataStore.data.map {
4547
DiceSettings(
4648
it[diceCountKey] ?: DEFAULT_DICE_COUNT,

0 commit comments

Comments
 (0)