diff --git a/README.md b/README.md index f63c7e61..0a8d863a 100755 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ buildscript { } dependencies { - classpath "dev.icerock.moko:resources-generator:0.19.0" + classpath "dev.icerock.moko:resources-generator:0.19.1" } } @@ -63,10 +63,10 @@ project build.gradle apply plugin: "dev.icerock.mobile.multiplatform-resources" dependencies { - commonMainApi("dev.icerock.moko:resources:0.19.0") - androidMainApi("dev.icerock.moko:resources-compose:0.19.0") - jvmMainApi("dev.icerock.moko:resources-compose:0.19.0") - commonTestImplementation("dev.icerock.moko:resources-test:0.19.0") + commonMainApi("dev.icerock.moko:resources:0.19.1") + androidMainApi("dev.icerock.moko:resources-compose:0.19.1") + jvmMainApi("dev.icerock.moko:resources-compose:0.19.1") + commonTestImplementation("dev.icerock.moko:resources-test:0.19.1") } multiplatformResources { diff --git a/build.gradle.kts b/build.gradle.kts index ad9957b7..fb446813 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,8 +13,8 @@ buildscript { } dependencies { classpath("dev.icerock.moko:resources-generator") - classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.1") - classpath("com.gradleup:auto-manifest-plugin:1.1.1") + classpath(libs.composeJetBrainsPlugin) + classpath(libs.autoManifestPlugin) classpath(":resources-build-logic") } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 64a8b28c..e59e0ca0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,7 +36,7 @@ robolectricVersion = "4.7.3" mokoGraphicsVersion = "0.9.0" mokoParcelizeVersion = "0.8.0" mokoTestVersion = "0.5.0" -mokoResourcesVersion = "0.19.0" +mokoResourcesVersion = "0.19.1" mokoMultiplatformPluginVersion = "0.13.0" [libraries] @@ -86,9 +86,12 @@ kotlinTestAnnotations = { module = "org.jetbrains.kotlin:kotlin-test-annotations # gradle kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinVersion" } # This version is used to fix compatibility issues between -# Kotlin Gradle Plugin 1.6.10 -> 1.6.20-RC -kotlinGradlePluginRC = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version = "1.6.20-RC" } +# Kotlin Gradle Plugin 1.6.10 -> 1.6.20 +# we can't update all project to 1.6.20 now because Jetpack Compose not updated yet +kotlinGradlePluginNext = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version = "1.6.21" } androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradleVersion" } kotlinCompilerEmbeddable = { module = "org.jetbrains.kotlin:kotlin-compiler-embeddable", version.ref = "kotlinVersion" } detektGradlePlugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detektVersion" } mokoMultiplatformPlugin = { module = "dev.icerock:mobile-multiplatform", version.ref = "mokoMultiplatformPluginVersion" } +composeJetBrainsPlugin = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "composeJetbrainsVersion" } +autoManifestPlugin = { module = "com.gradleup:auto-manifest-plugin", version = "1.1.1" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2e6e5897..aa991fce 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/resources-generator/build.gradle.kts b/resources-generator/build.gradle.kts index 1624a6b0..9f139945 100644 --- a/resources-generator/build.gradle.kts +++ b/resources-generator/build.gradle.kts @@ -15,7 +15,7 @@ version = libs.versions.mokoResourcesVersion.get() dependencies { implementation(gradleKotlinDsl()) - compileOnly(libs.kotlinGradlePluginRC) + compileOnly(libs.kotlinGradlePluginNext) compileOnly(libs.androidGradlePlugin) implementation(libs.kotlinPoet) implementation(libs.kotlinxSerialization) diff --git a/resources-generator/src/main/kotlin/dev/icerock/gradle/generator/apple/AppleMRGenerator.kt b/resources-generator/src/main/kotlin/dev/icerock/gradle/generator/apple/AppleMRGenerator.kt index 6085f270..990ef1be 100644 --- a/resources-generator/src/main/kotlin/dev/icerock/gradle/generator/apple/AppleMRGenerator.kt +++ b/resources-generator/src/main/kotlin/dev/icerock/gradle/generator/apple/AppleMRGenerator.kt @@ -305,18 +305,18 @@ $linkTask produces static framework, Xcode should have Build Phase with copyFram val fatTask: FatFrameworkTask = task as FatFrameworkTask // compatibility of this api was changed - // from 1.6.10 to 1.6.20-RC, so reflection was + // from 1.6.10 to 1.6.20, so reflection was // used here. val fatFrameworkDir: File = FatFrameworkTask::class .memberProperties .run { find { it.name == "fatFrameworkDir" } - ?: find { it.name == "destinationDir" } + ?: find { it.name == "fatFramework" } }?.invoke(fatTask) as File val frameworkFile = when (val any: Any = fatTask.frameworks.first()) { is Framework -> any.outputFile - is FrameworkDescriptor -> any.file + is FrameworkDescriptor -> any.files.rootDir else -> error("Unsupported type of $any") } diff --git a/sample/mpp-hierarhical/mpp_hierarhical.podspec b/sample/mpp-hierarhical/mpp_hierarhical.podspec index 4e6460f2..3de85f0f 100644 --- a/sample/mpp-hierarhical/mpp_hierarhical.podspec +++ b/sample/mpp-hierarhical/mpp_hierarhical.podspec @@ -2,24 +2,20 @@ Pod::Spec.new do |spec| spec.name = 'mpp_hierarhical' spec.version = '1.0' spec.homepage = 'Link to a Kotlin/Native module homepage' - spec.source = { :git => "Not Published", :tag => "Cocoapods/#{spec.name}/#{spec.version}" } + spec.source = { :http=> ''} spec.authors = '' spec.license = '' spec.summary = 'Some description for a Kotlin/Native module' - - spec.vendored_frameworks = "build/cocoapods/framework/mpp_hierarhical.framework" - spec.libraries = "c++" - spec.module_name = "#{spec.name}_umbrella" - + spec.vendored_frameworks = 'build/cocoapods/framework/mpp_hierarhical.framework' + spec.libraries = 'c++' + - - spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sample:mpp-hierarhical', 'PRODUCT_MODULE_NAME' => 'mpp_hierarhical', } - + spec.script_phases = [ { :name => 'Build mpp_hierarhical', @@ -35,8 +31,9 @@ Pod::Spec.new do |spec| "$REPO_ROOT/../../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration=$CONFIGURATION + -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" SCRIPT } ] + end \ No newline at end of file diff --git a/sample/mpp-library/build.gradle.kts b/sample/mpp-library/build.gradle.kts index 35d01256..4c2fe5d1 100644 --- a/sample/mpp-library/build.gradle.kts +++ b/sample/mpp-library/build.gradle.kts @@ -25,7 +25,7 @@ android { kotlin { explicitApi() - val xcFramework = XCFramework("MPL") + val xcFramework = XCFramework("MultiPlatformLibrary") targets.withType(org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget::class) .matching { it.konanTarget.family == org.jetbrains.kotlin.konan.target.Family.IOS } .configureEach {