From 6bff2a0abaefaea340f80640b89cfccd86b17146 Mon Sep 17 00:00:00 2001 From: shabinder Date: Sat, 5 Jun 2021 12:45:42 +0530 Subject: [PATCH 01/13] Kotlin and Dependencies Updated: - Kotlin 1.4.31 -> 1.5.10 - AppCompat 1.1.0 -> 1.3.0 - dev.icerock:mobile-multiplatform: 0.9.1 -> 0.9.2 --- buildSrc/build.gradle.kts | 6 +++--- buildSrc/src/main/kotlin/Deps.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index e856d25..ed23317 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.kotlin.jvm") version("1.4.31") + id("org.jetbrains.kotlin.jvm") version("1.5.10") } repositories { @@ -18,7 +18,7 @@ repositories { } dependencies { - implementation("dev.icerock:mobile-multiplatform:0.9.1") - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31") + implementation("dev.icerock:mobile-multiplatform:0.9.2") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10") implementation("com.android.tools.build:gradle:4.1.1") } diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index 6345bb5..8e832d5 100755 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -3,8 +3,8 @@ */ object Deps { - private const val kotlinVersion = "1.4.31" - private const val androidAppCompatVersion = "1.1.0" + private const val kotlinVersion = "1.5.10" + private const val androidAppCompatVersion = "1.3.0" const val mokoParcelizeVersion = "0.6.1" object Android { From f61f70153173f6db8671936f0524fbb1c96da772 Mon Sep 17 00:00:00 2001 From: shabinder Date: Sat, 5 Jun 2021 12:49:06 +0530 Subject: [PATCH 02/13] js IR & Legacy Support --- parcelize/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parcelize/build.gradle.kts b/parcelize/build.gradle.kts index a283d3a..a62b2cf 100644 --- a/parcelize/build.gradle.kts +++ b/parcelize/build.gradle.kts @@ -22,7 +22,7 @@ kotlin { tvos() watchos() jvm() - js { + js(BOTH) { nodejs() browser() } From c9cd9de9696b163606fe8bb645cf6a705a274281 Mon Sep 17 00:00:00 2001 From: shabinder Date: Sat, 5 Jun 2021 12:50:16 +0530 Subject: [PATCH 03/13] Version Bump: 0.6.1 -> 0.7.0 --- buildSrc/src/main/kotlin/Deps.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index 8e832d5..3dd1f1f 100755 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -5,7 +5,7 @@ object Deps { private const val kotlinVersion = "1.5.10" private const val androidAppCompatVersion = "1.3.0" - const val mokoParcelizeVersion = "0.6.1" + const val mokoParcelizeVersion = "0.7.0" object Android { const val compileSdk = 28 From b34313971a730ea364929bcc07395dfbbd013441 Mon Sep 17 00:00:00 2001 From: Anton Shestak Date: Sat, 5 Jun 2021 16:54:55 +0700 Subject: [PATCH 04/13] updated gradle plugin version --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 442d913..0f80bbf 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-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From b51ed706d185d50ba2687fa949972d2d5ceaad7a Mon Sep 17 00:00:00 2001 From: Anton Shestak Date: Sat, 5 Jun 2021 17:07:00 +0700 Subject: [PATCH 05/13] removed buildSrc --- buildSrc/build.gradle.kts | 24 ------------------- buildSrc/src/main/kotlin/Deps.kt | 40 -------------------------------- 2 files changed, 64 deletions(-) delete mode 100644 buildSrc/build.gradle.kts delete mode 100755 buildSrc/src/main/kotlin/Deps.kt diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts deleted file mode 100644 index e856d25..0000000 --- a/buildSrc/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. - */ - -plugins { - id("org.jetbrains.kotlin.jvm") version("1.4.31") -} - -repositories { - mavenCentral() - google() - - jcenter { - content { - includeGroup("org.jetbrains.trove4j") - } - } -} - -dependencies { - implementation("dev.icerock:mobile-multiplatform:0.9.1") - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31") - implementation("com.android.tools.build:gradle:4.1.1") -} diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt deleted file mode 100755 index 6345bb5..0000000 --- a/buildSrc/src/main/kotlin/Deps.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. - */ - -object Deps { - private const val kotlinVersion = "1.4.31" - private const val androidAppCompatVersion = "1.1.0" - const val mokoParcelizeVersion = "0.6.1" - - object Android { - const val compileSdk = 28 - const val targetSdk = 28 - const val minSdk = 16 - } - - object Plugins { - val androidLibrary = GradlePlugin(id = "com.android.library") - val androidApplication = GradlePlugin(id = "com.android.application") - val kotlinMultiPlatform = GradlePlugin(id = "org.jetbrains.kotlin.multiplatform") - val kotlinAndroid = GradlePlugin(id = "kotlin-android") - val kotlinParcelize = GradlePlugin(id = "kotlin-parcelize") - val kotlinKapt = GradlePlugin(id = "kotlin-kapt") - val mobileMultiPlatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform") - val appleFramework = GradlePlugin(id = "dev.icerock.mobile.multiplatform.apple-framework") - val mavenPublish = GradlePlugin(id = "maven-publish") - val signing = GradlePlugin(id = "signing") - } - - object Libs { - object Android { - const val appCompat = - "androidx.appcompat:appcompat:$androidAppCompatVersion" - } - - object MultiPlatform { - const val mokoParcelize = - "dev.icerock.moko:parcelize:$mokoParcelizeVersion" - } - } -} From a502818e40da9cee030eff183260d0459fd14444 Mon Sep 17 00:00:00 2001 From: Anton Shestak Date: Sat, 5 Jun 2021 17:07:16 +0700 Subject: [PATCH 06/13] all versions now in libs.versions.toml --- gradle/wrapper/libs.versions.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gradle/wrapper/libs.versions.toml diff --git a/gradle/wrapper/libs.versions.toml b/gradle/wrapper/libs.versions.toml new file mode 100644 index 0000000..5dbd548 --- /dev/null +++ b/gradle/wrapper/libs.versions.toml @@ -0,0 +1,11 @@ +[versions] +kotlinVersion = "1.4.31" +androidAppCompatVersion = "1.1.0" +mokoParcelizeVersion = "0.7.0" +compileSdk = "28" +targetSdk = "28" +minSdk = "16" + +[libraries] +appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" } +mokoGraphics = { module = "dev.icerock.moko:parcelize", version.ref = "mokoParcelizeVersion" } \ No newline at end of file From 7f6ab93c797eb45c5ca26814b07d1431c2346c10 Mon Sep 17 00:00:00 2001 From: Anton Shestak Date: Sat, 5 Jun 2021 17:39:38 +0700 Subject: [PATCH 07/13] temp commit --- build.gradle.kts | 30 +++++++++++++++++++++---- gradle/{wrapper => }/libs.versions.toml | 6 ++--- parcelize/build.gradle.kts | 16 +++++++------ sample/android-app/build.gradle.kts | 16 ++++++------- sample/build.gradle.kts | 2 +- sample/mpp-library/build.gradle.kts | 17 +++++++++----- settings.gradle.kts | 2 ++ 7 files changed, 60 insertions(+), 29 deletions(-) rename gradle/{wrapper => }/libs.versions.toml (57%) diff --git a/build.gradle.kts b/build.gradle.kts index 79cc4a5..e5a789c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,28 @@ /* * Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. */ +plugins{ + //id("kotlin-android") apply false +} + +buildscript { + repositories { + mavenCentral() + google() + + jcenter { + content { + includeGroup("org.jetbrains.trove4j") + } + } + + } + dependencies { + classpath("dev.icerock:mobile-multiplatform:0.9.2") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10") + classpath("com.android.tools.build:gradle:4.2.1") + } +} allprojects { repositories { @@ -14,13 +36,13 @@ allprojects { } } - plugins.withId(Deps.Plugins.androidLibrary.id) { + plugins.withId("com.android.library") { configure { - compileSdkVersion(Deps.Android.compileSdk) + compileSdkVersion(libs.versions.compileSdk.get().toInt()) defaultConfig { - minSdkVersion(Deps.Android.minSdk) - targetSdkVersion(Deps.Android.targetSdk) + minSdkVersion(libs.versions.minSdk.get().toInt()) + targetSdkVersion(libs.versions.targetSdk.get().toInt()) } } } diff --git a/gradle/wrapper/libs.versions.toml b/gradle/libs.versions.toml similarity index 57% rename from gradle/wrapper/libs.versions.toml rename to gradle/libs.versions.toml index 5dbd548..d6716de 100644 --- a/gradle/wrapper/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] -kotlinVersion = "1.4.31" +kotlinVersion = "1.5.10" androidAppCompatVersion = "1.1.0" -mokoParcelizeVersion = "0.7.0" +mokoParcelizeVersion = "0.6.1" compileSdk = "28" targetSdk = "28" minSdk = "16" [libraries] appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" } -mokoGraphics = { module = "dev.icerock.moko:parcelize", version.ref = "mokoParcelizeVersion" } \ No newline at end of file +mokoParcelize = { module = "dev.icerock.moko:parcelize", version.ref = "mokoParcelizeVersion" } \ No newline at end of file diff --git a/parcelize/build.gradle.kts b/parcelize/build.gradle.kts index a283d3a..73b0773 100644 --- a/parcelize/build.gradle.kts +++ b/parcelize/build.gradle.kts @@ -6,16 +6,18 @@ import java.util.Base64 import kotlin.text.String plugins { - plugin(Deps.Plugins.androidLibrary) - plugin(Deps.Plugins.kotlinMultiPlatform) - plugin(Deps.Plugins.kotlinParcelize) - plugin(Deps.Plugins.mobileMultiPlatform) - plugin(Deps.Plugins.mavenPublish) - plugin(Deps.Plugins.signing) + + id("com.android.library") + id("org.jetbrains.kotlin.multiplatform") + id("kotlin-parcelize") + id("dev.icerock.mobile.multiplatform") + id("maven-publish") + id("signing") } group = "dev.icerock.moko" -version = Deps.mokoParcelizeVersion +version = libs.versions.mokoParcelizeVersion.get() + kotlin { macosX64("macOS") diff --git a/sample/android-app/build.gradle.kts b/sample/android-app/build.gradle.kts index 0bb4884..0a80c36 100644 --- a/sample/android-app/build.gradle.kts +++ b/sample/android-app/build.gradle.kts @@ -3,13 +3,13 @@ */ plugins { - plugin(Deps.Plugins.androidApplication) - plugin(Deps.Plugins.kotlinAndroid) - plugin(Deps.Plugins.kotlinKapt) + id("com.android.application") + id("kotlin-android") + id("kotlin-kapt") } android { - compileSdkVersion(Deps.Android.compileSdk) + compileSdkVersion(libs.versions.compileSdk.get().toInt()) buildFeatures.dataBinding = true @@ -18,8 +18,8 @@ android { } defaultConfig { - minSdkVersion(Deps.Android.minSdk) - targetSdkVersion(Deps.Android.targetSdk) + minSdkVersion(libs.versions.minSdk.get().toInt()) + targetSdkVersion(libs.versions.targetSdk.get().toInt()) applicationId = "dev.icerock.moko.samples.parcelize" @@ -46,7 +46,7 @@ android { } dependencies { - implementation(Deps.Libs.Android.appCompat) + implementation(libs.appCompat) - implementation(project(":sample:mpp-library")) + implementation(projects.sample.mppLibrary) } diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 8835433..aef6a7a 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -5,7 +5,7 @@ subprojects { configurations.all { resolutionStrategy.dependencySubstitution { - substitute(module(Deps.Libs.MultiPlatform.mokoParcelize)) + substitute(module(libs.mokoParcelize.get.module)) .with(project(":parcelize")) } } diff --git a/sample/mpp-library/build.gradle.kts b/sample/mpp-library/build.gradle.kts index 81ea554..4175e71 100644 --- a/sample/mpp-library/build.gradle.kts +++ b/sample/mpp-library/build.gradle.kts @@ -3,17 +3,22 @@ */ plugins { - plugin(Deps.Plugins.androidLibrary) - plugin(Deps.Plugins.kotlinMultiPlatform) - plugin(Deps.Plugins.mobileMultiPlatform) - plugin(Deps.Plugins.kotlinParcelize) - plugin(Deps.Plugins.appleFramework) + id("com.android.library") + id("org.jetbrains.kotlin.multiplatform") + id("dev.icerock.mobile.multiplatform") + id("kotlin-parcelize") + id("dev.icerock.mobile.multiplatform.apple-framework") } kotlin { macosX64() + targets.withType(org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget::class.java).all { + binaries.withType(org.jetbrains.kotlin.gradle.plugin.mpp.Framework::class.java).all { + export(projects.parcelize) + } + } } dependencies { - commonMainApi(Deps.Libs.MultiPlatform.mokoParcelize) + "commonMainApi"(projects.parcelize) } diff --git a/settings.gradle.kts b/settings.gradle.kts index fd3d048..b751f81 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,8 @@ /* * Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. */ +enableFeaturePreview("VERSION_CATALOGS") +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") include(":parcelize") include(":sample:android-app") From f1af413f0d8a571b9a0ed221213e176a86613137 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Sun, 6 Jun 2021 14:04:13 +0700 Subject: [PATCH 08/13] update workflow --- .github/workflows/compilation-check.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/compilation-check.yml b/.github/workflows/compilation-check.yml index 15b8eae..f8e3fe6 100644 --- a/.github/workflows/compilation-check.yml +++ b/.github/workflows/compilation-check.yml @@ -20,3 +20,9 @@ jobs: java-version: 1.8 - name: Check build run: ./gradlew build publishToMavenLocal + - name: Install pods + run: cd sample/ios-app && pod install + if: matrix.os == 'macOS-latest' + - name: Check iOS + run: cd sample/ios-app && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO + if: matrix.os == 'macOS-latest' From e116813e971bee838db997aca5c7b249c17b48a6 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Sun, 6 Jun 2021 14:06:30 +0700 Subject: [PATCH 09/13] remove string configuration --- sample/mpp-library/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/mpp-library/build.gradle.kts b/sample/mpp-library/build.gradle.kts index ece7384..87a30a2 100644 --- a/sample/mpp-library/build.gradle.kts +++ b/sample/mpp-library/build.gradle.kts @@ -21,5 +21,5 @@ kotlin { } dependencies { - "commonMainApi"(projects.parcelize) + commonMainApi(projects.parcelize) } From 1ee479a972b54d5cc3423e7b27bc3e35205d1371 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Sun, 6 Jun 2021 14:09:27 +0700 Subject: [PATCH 10/13] kotlin warning disable --- gradle.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gradle.properties b/gradle.properties index 560fcf6..abcb263 100755 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,8 @@ org.gradle.configureondemand=false org.gradle.parallel=true kotlin.code.style=official + +kotlin.mpp.stability.nowarn=true kotlin.mpp.enableGranularSourceSetsMetadata=true kotlin.mpp.enableCompatibilityMetadataVariant=true From 12211289c63a289884ab79d4ca4c718540f87c81 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Sun, 6 Jun 2021 14:39:50 +0700 Subject: [PATCH 11/13] cdn for cocoapods --- sample/ios-app/Podfile | 2 +- sample/ios-app/Podfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/ios-app/Podfile b/sample/ios-app/Podfile index a57cc39..2ba190c 100644 --- a/sample/ios-app/Podfile +++ b/sample/ios-app/Podfile @@ -1,4 +1,4 @@ -source 'https://github.com/CocoaPods/Specs.git' +source 'https://cdn.cocoapods.org/' # ignore all warnings from all pods inhibit_all_warnings! diff --git a/sample/ios-app/Podfile.lock b/sample/ios-app/Podfile.lock index 37bf143..52b121d 100644 --- a/sample/ios-app/Podfile.lock +++ b/sample/ios-app/Podfile.lock @@ -11,6 +11,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: MultiPlatformLibrary: 3c5199ebc082c74305c57ff49da662add4226237 -PODFILE CHECKSUM: 4fe4be1b815729054ce80d124b3c324811469f77 +PODFILE CHECKSUM: d6e8b2708149aca1e6d60e470ae2dab21359ea6a COCOAPODS: 1.10.0 From ecb2615131680695171687b6be1ae405ecfc8382 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Sun, 6 Jun 2021 14:40:00 +0700 Subject: [PATCH 12/13] remove unnecessary export --- sample/mpp-library/build.gradle.kts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sample/mpp-library/build.gradle.kts b/sample/mpp-library/build.gradle.kts index 87a30a2..6a5db7a 100644 --- a/sample/mpp-library/build.gradle.kts +++ b/sample/mpp-library/build.gradle.kts @@ -12,12 +12,6 @@ plugins { kotlin { macosX64() - - targets.withType(org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget::class.java).all { - binaries.withType(org.jetbrains.kotlin.gradle.plugin.mpp.Framework::class.java).all { - export(projects.parcelize) - } - } } dependencies { From cd22fa35314518b2e3b85b9c8e3e505da3992046 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Sun, 6 Jun 2021 18:41:13 +0700 Subject: [PATCH 13/13] up version --- README.md | 22 ++-------------------- gradle/libs.versions.toml | 3 +-- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 16e6513..896f619 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![moko-parcelize](img/logo.png) -[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![Download](https://img.shields.io/maven-central/v/dev.icerock.moko/parcelize) ](https://repo1.maven.org/maven2/dev/icerock/moko/parcelize) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.31-orange) +[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![Download](https://img.shields.io/maven-central/v/dev.icerock.moko/parcelize) ](https://repo1.maven.org/maven2/dev/icerock/moko/parcelize) ![kotlin-version](https://img.shields.io/badge/kotlin-1.5.10-orange) # MOKO Parcelize This is a Kotlin Multiplatform library that supports Parcelize in common code. @@ -24,24 +24,6 @@ This is a Kotlin Multiplatform library that supports Parcelize in common code. - Android API 16+ - iOS version 9.0+ -## Versions -### Bintray -- kotlin 1.3.50 - - 0.1.0 -- kotlin 1.3.60 - - 0.2.0 -- kotlin 1.3.70 - - 0.3.0 -- kotlin 1.4.0 - - 0.4.0 -- kotlin 1.4.20 - - 0.5.0 -- kotlin 1.4.21 - - 0.6.0 -### mavenCentral -- kotlin 1.4.31 - - 0.6.1 - ## Installation root build.gradle ```groovy @@ -55,7 +37,7 @@ allprojects { project build.gradle ```groovy dependencies { - commonMainApi("dev.icerock.moko:parcelize:0.6.1") + commonMainApi("dev.icerock.moko:parcelize:0.7.0") } ``` diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d6716de..5220bd4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,6 @@ [versions] -kotlinVersion = "1.5.10" androidAppCompatVersion = "1.1.0" -mokoParcelizeVersion = "0.6.1" +mokoParcelizeVersion = "0.7.0" compileSdk = "28" targetSdk = "28" minSdk = "16"