-
Notifications
You must be signed in to change notification settings - Fork 60
⬆️ Update versions #174
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
base: develop
Are you sure you want to change the base?
⬆️ Update versions #174
Changes from all commits
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 |
|---|---|---|
|
|
@@ -9,4 +9,6 @@ build | |
| Pods | ||
| xcuserdata | ||
| local.properties | ||
| local.gradle | ||
| local.gradle | ||
| .kotlin | ||
| .DS_Store | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #Tue Jun 10 21:09:29 CEST 2025 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,32 +5,34 @@ | |
| import dev.icerock.moko.gradle.utils.connectTargetsToSourceSet | ||
| import dev.icerock.moko.gradle.utils.createMainTest | ||
| import dev.icerock.moko.gradle.utils.setupDependency | ||
| import io.gitlab.arturbosch.detekt.CONFIGURATION_DETEKT_PLUGINS | ||
|
|
||
| plugins { | ||
| id("org.jetbrains.kotlin.multiplatform") | ||
| id("dev.icerock.moko.gradle.publication") | ||
| id("dev.icerock.moko.gradle.detekt") | ||
| alias(libs.plugins.detekt) | ||
|
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. in moko detekt plugin already configured all required rules and dependencies. why you not use it? |
||
| } | ||
|
|
||
| kotlin { | ||
| iosArm64() | ||
| iosX64() | ||
| iosSimulatorArm64() | ||
| applyDefaultHierarchyTemplate() | ||
|
|
||
| with(this.sourceSets) { | ||
| // creation | ||
| createMainTest("ios") | ||
| listOf( | ||
| iosX64(), | ||
| iosArm64(), | ||
| iosSimulatorArm64(), | ||
| ) | ||
|
Comment on lines
-17
to
+23
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. we should use convention plugin to simplify build configs. now we have duplication in this logic in each build config |
||
|
|
||
| // ios dependencies | ||
| setupDependency("ios", "common") | ||
| connectTargetsToSourceSet( | ||
| targetNames = listOf("iosX64", "iosArm64", "iosSimulatorArm64"), | ||
| sourceSetPrefix = "ios" | ||
| ) | ||
| sourceSets { | ||
| commonMain { | ||
| dependencies { | ||
| api(projects.permissions) | ||
| implementation(libs.coroutines) | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| commonMainApi(projects.permissions) | ||
| commonMainImplementation(libs.coroutines) | ||
| dependencies { | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.cli) | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.formatting) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,44 @@ | ||
| import io.gitlab.arturbosch.detekt.CONFIGURATION_DETEKT_PLUGINS | ||
|
|
||
| /* | ||
| * Copyright 2024 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
| */ | ||
|
|
||
| plugins { | ||
| id("dev.icerock.moko.gradle.multiplatform.mobile") | ||
| id("org.jetbrains.kotlin.multiplatform") | ||
| id("com.android.library") | ||
| id("dev.icerock.moko.gradle.publication") | ||
| id("dev.icerock.moko.gradle.stub.javadoc") | ||
| id("dev.icerock.moko.gradle.detekt") | ||
| alias(libs.plugins.detekt) | ||
| } | ||
|
|
||
| android { | ||
| namespace = "dev.icerock.moko.permissions.bluetooth" | ||
| compileSdk = 36 | ||
| } | ||
|
|
||
| dependencies { | ||
| commonMainApi(projects.permissions) | ||
| commonMainImplementation(libs.coroutines) | ||
| kotlin { | ||
| applyDefaultHierarchyTemplate() | ||
|
|
||
| androidTarget { publishLibraryVariants("release", "debug") } | ||
|
|
||
| listOf( | ||
| iosX64(), | ||
| iosArm64(), | ||
| iosSimulatorArm64(), | ||
| ) | ||
|
Comment on lines
+21
to
+29
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. this should be from convention plugin too |
||
|
|
||
| sourceSets { | ||
| commonMain { | ||
| dependencies { | ||
| api(projects.permissions) | ||
| implementation(libs.coroutines) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.cli) | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.formatting) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,50 @@ | ||
| import io.gitlab.arturbosch.detekt.CONFIGURATION_DETEKT_PLUGINS | ||
|
|
||
| /* | ||
| * Copyright 2024 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
| */ | ||
|
|
||
| plugins { | ||
| id("dev.icerock.moko.gradle.multiplatform.mobile") | ||
| id("org.jetbrains.kotlin.multiplatform") | ||
| id("com.android.library") | ||
| id("dev.icerock.moko.gradle.publication") | ||
| id("dev.icerock.moko.gradle.stub.javadoc") | ||
| id("dev.icerock.moko.gradle.detekt") | ||
| alias(libs.plugins.detekt) | ||
| } | ||
|
|
||
| android { | ||
| namespace = "dev.icerock.moko.permissions.camera" | ||
| compileSdk = 36 | ||
| } | ||
|
|
||
| dependencies { | ||
| commonMainApi(projects.permissions) | ||
| iosMainImplementation(projects.permissionsAvfoundation) | ||
| commonMainImplementation(libs.coroutines) | ||
| kotlin { | ||
| applyDefaultHierarchyTemplate() | ||
|
|
||
| androidTarget { publishLibraryVariants("release", "debug") } | ||
|
|
||
| listOf( | ||
| iosX64(), | ||
| iosArm64(), | ||
| iosSimulatorArm64(), | ||
| ) | ||
|
Comment on lines
+21
to
+29
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. this should be from convention plugin too |
||
|
|
||
| sourceSets { | ||
| commonMain { | ||
| dependencies { | ||
| api(projects.permissions) | ||
| implementation(libs.coroutines) | ||
| } | ||
| } | ||
|
|
||
| iosMain { | ||
| dependencies { | ||
| implementation(projects.permissionsAvfoundation) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.cli) | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.formatting) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,58 @@ | ||
| import io.gitlab.arturbosch.detekt.CONFIGURATION_DETEKT_PLUGINS | ||
|
|
||
| /* | ||
| * Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
| */ | ||
|
|
||
| plugins { | ||
| id("dev.icerock.moko.gradle.multiplatform.mobile") | ||
| id("org.jetbrains.kotlin.multiplatform") | ||
| id("org.jetbrains.kotlin.plugin.compose") | ||
| id("com.android.library") | ||
| id("dev.icerock.moko.gradle.publication") | ||
| id("dev.icerock.moko.gradle.stub.javadoc") | ||
| id("dev.icerock.moko.gradle.detekt") | ||
| alias(libs.plugins.detekt) | ||
| id("org.jetbrains.compose") | ||
| } | ||
|
|
||
| android { | ||
| namespace = "dev.icerock.moko.permissions.compose" | ||
| compileSdk = 36 | ||
|
|
||
| defaultConfig { | ||
| minSdk = 21 | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| commonMainApi(projects.permissions) | ||
| commonMainApi(compose.runtime) | ||
| androidMainImplementation(libs.activity) | ||
| androidMainImplementation(libs.composeUi) | ||
| androidMainImplementation(libs.lifecycleRuntime) | ||
| kotlin { | ||
| applyDefaultHierarchyTemplate() | ||
|
|
||
| androidTarget { publishLibraryVariants("release", "debug") } | ||
|
|
||
| listOf( | ||
| iosX64(), | ||
| iosArm64(), | ||
| iosSimulatorArm64(), | ||
| ) | ||
|
Comment on lines
+27
to
+35
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. this should be from convention plugin too |
||
|
|
||
| sourceSets { | ||
| commonMain { | ||
| dependencies { | ||
| api(projects.permissions) | ||
| api(compose.runtime) | ||
| } | ||
| } | ||
|
|
||
| androidMain { | ||
| dependencies { | ||
| implementation(libs.activity) | ||
| implementation(libs.composeUi) | ||
| implementation(libs.lifecycleRuntime) | ||
| } | ||
| } | ||
| } | ||
|
Comment on lines
+37
to
+52
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. what reason to change small version of dependency declaration to this one? |
||
|
|
||
| dependencies { | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.cli) | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.formatting) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,44 @@ | ||
| import io.gitlab.arturbosch.detekt.CONFIGURATION_DETEKT_PLUGINS | ||
|
|
||
| /* | ||
| * Copyright 2024 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
| */ | ||
|
|
||
| plugins { | ||
| id("dev.icerock.moko.gradle.multiplatform.mobile") | ||
| id("org.jetbrains.kotlin.multiplatform") | ||
| id("com.android.library") | ||
| id("dev.icerock.moko.gradle.publication") | ||
| id("dev.icerock.moko.gradle.stub.javadoc") | ||
| id("dev.icerock.moko.gradle.detekt") | ||
| alias(libs.plugins.detekt) | ||
| } | ||
|
|
||
| android { | ||
| namespace = "dev.icerock.moko.permissions.contacts" | ||
| compileSdk = 36 | ||
| } | ||
|
|
||
| dependencies { | ||
| commonMainApi(projects.permissions) | ||
| commonMainImplementation(libs.coroutines) | ||
| kotlin { | ||
| applyDefaultHierarchyTemplate() | ||
|
|
||
| androidTarget { publishLibraryVariants("release", "debug") } | ||
|
|
||
| listOf( | ||
| iosX64(), | ||
| iosArm64(), | ||
| iosSimulatorArm64(), | ||
| ) | ||
|
Comment on lines
+21
to
+29
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. this should be from convention plugin too |
||
|
|
||
| sourceSets { | ||
| commonMain { | ||
| dependencies { | ||
| api(projects.permissions) | ||
| implementation(libs.coroutines) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.cli) | ||
| CONFIGURATION_DETEKT_PLUGINS(libs.detekt.formatting) | ||
| } | ||
| } | ||
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.
if library will be compiled with kotlin 2.2.0 then users that use kotlin 2.0 or kotlin 1.9 will lost access to library.
i not see any reason to increase minimal kotlin version in this library. maybe you have some reasons?
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.
Are we sure about this? I don't think upgrading to Kotlin 2.2.0 prevents users with lower versions from using the library 🤔
One important thing to note is that upgrading Kotlin improves many aspects of KMP in general in terms of configuration and setup.
This is the main reason why I upgraded to this version.
Also, upgrading to a newer version of Kotlin simply implies that if users want to use the latest release, they should also upgrade. Projects using KMP today should most likely not be using Kotlin versions lower than 2.0 🤔
Concerning all the other comments of using the configured moko plugins, since upgrading to Kotlin 2.2.0 changes various KMP configurations, these plugins would have to be upgraded beforehand which is why I didn't do it. If you want, I could take some time and update them but I'd need to be sure that upgrading to Kotlin 2+ is possible for you