From 15c5176ff98d71cfe0b6cd34272496556b6e18ab Mon Sep 17 00:00:00 2001 From: Shubham Singh Date: Sat, 30 Mar 2024 19:16:55 +0530 Subject: [PATCH] Upgrade dependencies --- adapt/adapt.podspec | 13 ++++++++++++- adapt/build.gradle.kts | 8 +------- gradle.properties | 17 +++++++++++------ gradle/libs.versions.toml | 10 +++++----- gradle/wrapper/gradle-wrapper.properties | 20 ++------------------ sample/composeApp/build.gradle.kts | 8 +------- sample/composeApp/composeApp.podspec | 13 ++++++++++++- 7 files changed, 44 insertions(+), 45 deletions(-) diff --git a/adapt/adapt.podspec b/adapt/adapt.podspec index 7818b71..1b6d11f 100644 --- a/adapt/adapt.podspec +++ b/adapt/adapt.podspec @@ -11,6 +11,17 @@ Pod::Spec.new do |spec| spec.ios.deployment_target = '11.0' + if !Dir.exist?('build/cocoapods/framework/adapt.framework') || Dir.empty?('build/cocoapods/framework/adapt.framework') + raise " + + Kotlin framework 'adapt' doesn't exist yet, so a proper Xcode project can't be generated. + 'pod install' should be executed after running ':generateDummyFramework' Gradle task: + + ./gradlew :adapt:generateDummyFramework + + Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)" + end + spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':adapt', 'PRODUCT_MODULE_NAME' => 'adapt', @@ -35,5 +46,5 @@ Pod::Spec.new do |spec| SCRIPT } ] - spec.resources = ['build/compose/ios/adapt/compose-resources'] + spec.resources = ['build\compose\ios\adapt\compose-resources'] end \ No newline at end of file diff --git a/adapt/build.gradle.kts b/adapt/build.gradle.kts index e73567c..1677c0f 100644 --- a/adapt/build.gradle.kts +++ b/adapt/build.gradle.kts @@ -26,7 +26,7 @@ plugins { @OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class) kotlin { - targetHierarchy.default() + applyDefaultHierarchyTemplate() androidTarget { compilations.all { kotlinOptions { @@ -89,12 +89,6 @@ kotlin { } } -// TODO: Remove this when JetBrains Compose supports Kotlin 1.9.10 -compose { - kotlinCompilerPlugin.set(dependencies.compiler.forKotlin("1.9.0")) - kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.9.10") -} - android { namespace = "design.adapt" compileSdk = 34 diff --git a/gradle.properties b/gradle.properties index db15804..13016d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,18 +13,23 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -#Gradle +# Gradle org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" -#Kotlin +# Kotlin kotlin.code.style=official kotlin.js.compiler=ir -#MPP +# MPP kotlin.mpp.enableCInteropCommonization=true kotlin.mpp.androidSourceSetLayoutVersion=2 -#Compose +# Native +# To avoid messages like: "The following Kotlin/Native targets cannot be built on this machine and +# are disabled: iosArm64, iosSimulatorArm64, iosX64" +kotlin.native.ignoreDisabledTargets=true +# Compose org.jetbrains.compose.experimental.uikit.enabled=true org.jetbrains.compose.experimental.jscanvas.enabled=true -#Android +# Android android.useAndroidX=true android.nonTransitiveRClass=true +# To avoid messages like: "Kotlin Multiplatform <-> Android Gradle Plugin compatibility issue" +kotlin.mpp.androidGradlePluginCompatibility.nowarn=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index df01d77..312629d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,10 @@ [versions] -agp = "8.1.1" -androidx-activityCompose = "1.7.2" +agp = "8.3.1" +androidx-activityCompose = "1.8.2" androidx-appcompat = "1.6.1" -compose = "1.5.0" -compose-compiler = "1.5.2" # This needs to be at least 1.5.2 (reason: https://github.com/JetBrains/compose-multiplatform/issues/3531#issuecomment-1690831975) -kotlin = "1.9.10" +compose = "1.6.10-dev1551" +compose-compiler = "1.5.11" +kotlin = "1.9.23" maven-publish = "0.25.3" [libraries] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f95b92b..2467898 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,22 +1,6 @@ -# -# Copyright 2023 Shubham Singh -# -# 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. -# - - +#Sat Mar 30 18:45:32 IST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/sample/composeApp/build.gradle.kts b/sample/composeApp/build.gradle.kts index e3dc620..90e5b00 100644 --- a/sample/composeApp/build.gradle.kts +++ b/sample/composeApp/build.gradle.kts @@ -25,7 +25,7 @@ plugins { @OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class) kotlin { - targetHierarchy.default() + applyDefaultHierarchyTemplate() androidTarget { compilations.all { kotlinOptions { @@ -109,12 +109,6 @@ kotlin { } } -// TODO: Remove this when JetBrains Compose supports Kotlin 1.9.10 -compose { - kotlinCompilerPlugin.set(dependencies.compiler.forKotlin("1.9.0")) - kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.9.10") -} - android { namespace = "design.adapt" compileSdk = 34 diff --git a/sample/composeApp/composeApp.podspec b/sample/composeApp/composeApp.podspec index 8f055a1..cff2d8a 100644 --- a/sample/composeApp/composeApp.podspec +++ b/sample/composeApp/composeApp.podspec @@ -11,6 +11,17 @@ Pod::Spec.new do |spec| spec.ios.deployment_target = '11.0' + if !Dir.exist?('build/cocoapods/framework/ComposeApp.framework') || Dir.empty?('build/cocoapods/framework/ComposeApp.framework') + raise " + + Kotlin framework 'ComposeApp' doesn't exist yet, so a proper Xcode project can't be generated. + 'pod install' should be executed after running ':generateDummyFramework' Gradle task: + + ./gradlew :sample:composeApp:generateDummyFramework + + Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)" + end + spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sample:composeApp', 'PRODUCT_MODULE_NAME' => 'ComposeApp', @@ -35,5 +46,5 @@ Pod::Spec.new do |spec| SCRIPT } ] - spec.resources = ['build/compose/ios/ComposeApp/compose-resources'] + spec.resources = ['build\compose\ios\ComposeApp\compose-resources'] end \ No newline at end of file