Skip to content

Commit

Permalink
Merge pull request #9 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.5.0
  • Loading branch information
Alex009 authored Dec 6, 2020
2 parents 0dc9b8a + 79999fd commit 481d67b
Show file tree
Hide file tree
Showing 26 changed files with 1,459 additions and 65 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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://api.bintray.com/packages/icerockdev/moko/moko-parcelize/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-parcelize/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.0-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://api.bintray.com/packages/icerockdev/moko/moko-parcelize/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-parcelize/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.20-orange)

# Mobile Kotlin parcelize
This is a Kotlin Multiplatform library that supports Parcelize in common code.
Expand Down Expand Up @@ -32,6 +32,8 @@ This is a Kotlin Multiplatform library that supports Parcelize in common code.
- 0.3.0
- kotlin 1.4.0
- 0.4.0
- kotlin 1.4.20
- 0.5.0

## Installation
root build.gradle
Expand All @@ -46,7 +48,7 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:parcelize:0.4.0")
commonMainApi("dev.icerock.moko:parcelize:0.5.0")
}
```

Expand Down
8 changes: 4 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

plugins {
id("org.jetbrains.kotlin.jvm") version("1.4.0")
id("org.jetbrains.kotlin.jvm") version("1.4.20")
}

repositories {
Expand All @@ -14,7 +14,7 @@ repositories {
}

dependencies {
implementation("dev.icerock:mobile-multiplatform:0.7.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0")
implementation("com.android.tools.build:gradle:4.0.1")
implementation("dev.icerock:mobile-multiplatform:0.9.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20")
implementation("com.android.tools.build:gradle:4.1.1")
}
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/Deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

object Deps {
private const val kotlinVersion = "1.4.0"
private const val kotlinVersion = "1.4.20"
private const val androidAppCompatVersion = "1.1.0"
const val mokoParcelizeVersion = "0.4.0"
const val mokoParcelizeVersion = "0.5.0"

object Android {
const val compileSdk = 28
Expand All @@ -24,7 +24,7 @@ object Deps {
val kotlinAndroid = GradlePlugin(id = "kotlin-android")
val kotlinKapt = GradlePlugin(id = "kotlin-kapt")
val mobileMultiPlatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform")
val iosFramework = GradlePlugin(id = "dev.icerock.mobile.multiplatform.ios-framework")
val appleFramework = GradlePlugin(id = "dev.icerock.mobile.multiplatform.apple-framework")
val mavenPublish = GradlePlugin(id = "maven-publish")
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 4 additions & 0 deletions parcelize/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ plugins {
group = "dev.icerock.moko"
version = Deps.mokoParcelizeVersion

kotlin {
macosX64()
}

publishing {
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-parcelize/;publish=1") {
name = "bintray"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

package dev.icerock.moko.parcelize

actual annotation class Parcelize

actual interface Parcelable

actual annotation class IgnoredOnParcel
4 changes: 2 additions & 2 deletions sample/ios-app/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../mpp-library"

SPEC CHECKSUMS:
MultiPlatformLibrary: cd722dcacda18e0f3b888e477d2bf1743af85ee1
MultiPlatformLibrary: 3c5199ebc082c74305c57ff49da662add4226237

PODFILE CHECKSUM: 4fe4be1b815729054ce80d124b3c324811469f77

COCOAPODS: 1.9.0
COCOAPODS: 1.10.0
80 changes: 41 additions & 39 deletions sample/ios-app/TestProj.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
2B70A10DE02726CA8E6981EB /* Pods_TestProj.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8D683A7C91DCD56058C7435 /* Pods_TestProj.framework */; };
01AC01C121C7C6464FC0A6FE /* Pods_TestProj.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F48297B41FA1A3549A308641 /* Pods_TestProj.framework */; };
45D74FCC22BFDDFD00CAB0C8 /* TestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45D74FCB22BFDDFD00CAB0C8 /* TestViewController.swift */; };
45F4791D219463C7003D25FA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 45F47912219463C7003D25FA /* LaunchScreen.storyboard */; };
45F4791E219463C7003D25FA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 45F47914219463C7003D25FA /* Main.storyboard */; };
Expand All @@ -24,40 +24,31 @@
45F4791A219463C7003D25FA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
45F4791B219463C7003D25FA /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
45F4791C219463C7003D25FA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A644D2F1C5377C40A53FCD6A /* Pods-TestProj.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestProj.release.xcconfig"; path = "Pods/Target Support Files/Pods-TestProj/Pods-TestProj.release.xcconfig"; sourceTree = "<group>"; };
DFBDF7D3559D080FDCA444A6 /* Pods-TestProj.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestProj.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TestProj/Pods-TestProj.debug.xcconfig"; sourceTree = "<group>"; };
E8D683A7C91DCD56058C7435 /* Pods_TestProj.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestProj.framework; sourceTree = BUILT_PRODUCTS_DIR; };
983954D35B9CB10A61822C9F /* Pods-TestProj.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestProj.debug.xcconfig"; path = "Target Support Files/Pods-TestProj/Pods-TestProj.debug.xcconfig"; sourceTree = "<group>"; };
E8801EB5FB205C925771AB45 /* Pods-TestProj.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestProj.release.xcconfig"; path = "Target Support Files/Pods-TestProj/Pods-TestProj.release.xcconfig"; sourceTree = "<group>"; };
F48297B41FA1A3549A308641 /* Pods_TestProj.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestProj.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
287627FC1F319065007FA12B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2B70A10DE02726CA8E6981EB /* Pods_TestProj.framework in Frameworks */,
01AC01C121C7C6464FC0A6FE /* Pods_TestProj.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
0C46713DE6750675C174D0A7 /* Pods */ = {
isa = PBXGroup;
children = (
DFBDF7D3559D080FDCA444A6 /* Pods-TestProj.debug.xcconfig */,
A644D2F1C5377C40A53FCD6A /* Pods-TestProj.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
287627F61F319065007FA12B = {
isa = PBXGroup;
children = (
45964D362282A1FD00C16658 /* mpp-library */,
45F47910219463C7003D25FA /* src */,
287628001F319065007FA12B /* Products */,
EE1ABB3E79CE541540D3155F /* Frameworks */,
0C46713DE6750675C174D0A7 /* Pods */,
759A46649A4C97F44048325D /* Pods */,
43BA0BE77A81AFB3A844032B /* Frameworks */,
);
indentWidth = 4;
sourceTree = "<group>";
Expand All @@ -72,6 +63,14 @@
name = Products;
sourceTree = "<group>";
};
43BA0BE77A81AFB3A844032B /* Frameworks */ = {
isa = PBXGroup;
children = (
F48297B41FA1A3549A308641 /* Pods_TestProj.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
45F47910219463C7003D25FA /* src */ = {
isa = PBXGroup;
children = (
Expand All @@ -93,12 +92,13 @@
path = Resources;
sourceTree = "<group>";
};
EE1ABB3E79CE541540D3155F /* Frameworks */ = {
759A46649A4C97F44048325D /* Pods */ = {
isa = PBXGroup;
children = (
E8D683A7C91DCD56058C7435 /* Pods_TestProj.framework */,
983954D35B9CB10A61822C9F /* Pods-TestProj.debug.xcconfig */,
E8801EB5FB205C925771AB45 /* Pods-TestProj.release.xcconfig */,
);
name = Frameworks;
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand All @@ -108,11 +108,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 287628111F319065007FA12B /* Build configuration list for PBXNativeTarget "TestProj" */;
buildPhases = (
DDE4C06D580BF457BEDF8D0A /* [CP] Check Pods Manifest.lock */,
84E391C243041B64EE4C661C /* [CP] Check Pods Manifest.lock */,
287627FB1F319065007FA12B /* Sources */,
287627FC1F319065007FA12B /* Frameworks */,
287627FD1F319065007FA12B /* Resources */,
A46F90AE236066C789309780 /* [CP] Embed Pods Frameworks */,
DC1A582DC7F6045E9E73E410 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -171,43 +171,43 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
A46F90AE236066C789309780 /* [CP] Embed Pods Frameworks */ = {
84E391C243041B64EE4C661C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-TestProj/Pods-TestProj-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-TestProj/Pods-TestProj-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-TestProj-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TestProj/Pods-TestProj-frameworks.sh\"\n";
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";
showEnvVarsInLog = 0;
};
DDE4C06D580BF457BEDF8D0A /* [CP] Check Pods Manifest.lock */ = {
DC1A582DC7F6045E9E73E410 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-TestProj/Pods-TestProj-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-TestProj-checkManifestLockResult.txt",
"${PODS_ROOT}/Target Support Files/Pods-TestProj/Pods-TestProj-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TestProj/Pods-TestProj-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -249,6 +249,7 @@
buildSettings = {
CURRENT_PROJECT_VERSION = 0;
DEFINES_MODULE = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_VERSION = 4.0;
};
name = Debug;
Expand All @@ -258,13 +259,14 @@
buildSettings = {
CURRENT_PROJECT_VERSION = 0;
DEFINES_MODULE = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_VERSION = 4.0;
};
name = Release;
};
287628121F319065007FA12B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DFBDF7D3559D080FDCA444A6 /* Pods-TestProj.debug.xcconfig */;
baseConfigurationReference = 983954D35B9CB10A61822C9F /* Pods-TestProj.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand All @@ -282,7 +284,7 @@
};
287628131F319065007FA12B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A644D2F1C5377C40A53FCD6A /* Pods-TestProj.release.xcconfig */;
baseConfigurationReference = E8801EB5FB205C925771AB45 /* Pods-TestProj.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand Down
28 changes: 20 additions & 8 deletions sample/ios-app/src/Resources/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="zIh-nI-gcX">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="zIh-nI-gcX">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -14,7 +11,7 @@
<objects>
<navigationController id="zIh-nI-gcX" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="aGe-Yj-KQZ">
<rect key="frame" x="0.0" y="20" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
Expand All @@ -28,17 +25,32 @@
<!--Test-->
<scene sceneID="B5V-K5-FDE">
<objects>
<viewController id="TTy-86-aNs" customClass="TestViewController" customModule="mokoSampleCore" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="TTy-86-aNs" customClass="TestViewController" customModule="mokoSampleParcelize" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="gcA-zH-akF"/>
<viewControllerLayoutGuide type="bottom" id="gTY-6T-yQv"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="KxK-oh-5KO">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xi6-LE-MiS">
<rect key="frame" x="139" y="273.5" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Xi6-LE-MiS" firstAttribute="centerY" secondItem="KxK-oh-5KO" secondAttribute="centerY" id="efV-gk-Ydz"/>
<constraint firstItem="Xi6-LE-MiS" firstAttribute="centerX" secondItem="KxK-oh-5KO" secondAttribute="centerX" id="mQU-1J-xdv"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Test" id="0jM-60-fjM"/>
<connections>
<outlet property="label" destination="Xi6-LE-MiS" id="FJj-iN-xwx"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Jxh-nl-GiI" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
Expand Down
14 changes: 10 additions & 4 deletions sample/ios-app/src/TestViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ import MultiPlatformLibrary

class TestViewController: UIViewController {

@IBOutlet var label: UILabel!

override func viewDidLoad() {
super.viewDidLoad()

let _ = User(firstName: "Aleksey",
lastName: "Mikhailov",
phone: "+79000000000",
age: 26)
let user = User(
firstName: "Aleksey",
lastName: "Mikhailov",
phone: "+79000000000",
age: 26
)

label.text = "Hello, \(user.firstName)!"
}
}
Loading

0 comments on commit 481d67b

Please sign in to comment.