Skip to content

Commit cc0f4d6

Browse files
authored
Merge pull request #42 from icerockdev/develop
Release 0.10.0
2 parents 3b0cd77 + 58327e4 commit cc0f4d6

File tree

7 files changed

+384
-311
lines changed

7 files changed

+384
-311
lines changed

README.md

Lines changed: 60 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ dependencies {
2020
```
2121

2222
## Usage
23-
### Setup gradle module as mobile multiplatform
23+
### Setup mobile targets without config
2424
`build.gradle.kts`
2525
```kotlin
2626
plugins {
2727
id("com.android.library")
2828
id("org.jetbrains.kotlin.multiplatform")
29-
id("dev.icerock.mobile.multiplatform")
29+
id("dev.icerock.mobile.multiplatform.targets")
3030
}
3131
```
32-
Plugin automatically setup android, ios targets.
33-
For Android setup sourceset path to `androidMain`.
34-
For iOS setup `sync` gradle tasks in group `cocoapods` for `cocoapods` integration.
32+
33+
Plugin automatically setup android, ios targets.
34+
For Android setup sourceSet path to `androidMain`.
3535

3636
By default used `ios()` targets creation with intermediate source set `iosMain`. To disable it add
37-
into `gradle.properties` line:
37+
into `gradle.properties` line:
3838
```
3939
mobile.multiplatform.useIosShortcut=false
4040
```
@@ -44,41 +44,20 @@ To disable warning about used ios targets add into `gradle.properties` line:
4444
mobile.multiplatform.iosTargetWarning=false
4545
```
4646

47-
### Definition of dependencies
48-
```kotlin
49-
val mokoTime = MultiPlatformLibrary(
50-
android = "dev.icerock.moko:time-android:0.1.0",
51-
common = "dev.icerock.moko:time:0.1.0",
52-
iosX64 = "dev.icerock.moko:time-iosx64:0.1.0",
53-
iosArm64 = "dev.icerock.moko:time-iosarm64:0.1.0"
54-
)
55-
56-
val appCompat = AndroidLibrary(
57-
name = "androidx.appcompat:appcompat:1.1.0"
58-
)
59-
60-
val myFeature = MultiPlatformModule(
61-
name = ":mpp-library:feature:myFeature"
62-
)
63-
```
64-
65-
### Setup dependencies
66-
`build.gradle.kts`
67-
```kotlin
68-
dependencies {
69-
mppLibrary(mokoTime)
70-
androidLibrary(appCompat)
71-
mppModule(myFeature)
72-
}
73-
```
74-
75-
### Setup export as iOS framework
47+
### Setup cocoapods integration for iOS
7648
`build.gradle.kts`
7749
```kotlin
7850
plugins {
7951
id("dev.icerock.mobile.multiplatform.ios-framework")
8052
}
53+
```
54+
55+
Plugin will setup `sync` gradle tasks in group `cocoapods` for `cocoapods` integration.
8156

57+
Example of `podspec` for integration here - https://github.com/icerockdev/moko-template/blob/master/mpp-library/MultiPlatformLibrary.podspec
58+
59+
#### Add artifacts to export
60+
```kotlin
8261
// optional for export dependencies into framework header
8362
framework {
8463
export(project = project(":myproject"))
@@ -88,17 +67,23 @@ framework {
8867
}
8968
```
9069

91-
### Setup sync task for all Apple frameworks
70+
### Setup cocoapods integration for all Apple frameworks
9271
`build.gradle.kts`
9372
```kotlin
9473
plugins {
9574
id("dev.icerock.mobile.multiplatform.apple-framework")
9675
}
9776
```
9877

78+
with `framework` configuration you can add dependencies to export (just like in iOS framework).
79+
9980
### Setup CocoaPods interop
10081
`build.gradle.kts`
10182
```kotlin
83+
plugins {
84+
id("dev.icerock.mobile.multiplatform.cocoapods")
85+
}
86+
10287
cocoaPods {
10388
podsProject = file("../ios-app/Pods/Pods.xcodeproj") // here should be path to your Pods project
10489
buildConfiguration = "dev-debug" // optional, default is "debug"
@@ -116,6 +101,45 @@ mobile.multiplatform.podsConfiguration=dev-debug
116101
```
117102
`podsProject` should be relative path from root gradle project.
118103

104+
### Multiple plugins in one line (deprecated, saved for backward compatibility)
105+
```kotlin
106+
plugins {
107+
id("dev.icerock.mobile.multiplatform")
108+
}
109+
```
110+
This line will enable:
111+
- `dev.icerock.mobile.multiplatform.cocoapods`
112+
- `dev.icerock.mobile.multiplatform.targets`
113+
- publish of android build variants - `release` and `debug`
114+
115+
### Definition of dependencies (deprecated, saved for backward compatibility)
116+
```kotlin
117+
val mokoTime = MultiPlatformLibrary(
118+
android = "dev.icerock.moko:time-android:0.1.0",
119+
common = "dev.icerock.moko:time:0.1.0",
120+
iosX64 = "dev.icerock.moko:time-iosx64:0.1.0",
121+
iosArm64 = "dev.icerock.moko:time-iosarm64:0.1.0"
122+
)
123+
124+
val appCompat = AndroidLibrary(
125+
name = "androidx.appcompat:appcompat:1.1.0"
126+
)
127+
128+
val myFeature = MultiPlatformModule(
129+
name = ":mpp-library:feature:myFeature"
130+
)
131+
```
132+
133+
### Setup dependencies (deprecated, saved for backward compatibility)
134+
`build.gradle.kts`
135+
```kotlin
136+
dependencies {
137+
mppLibrary(mokoTime)
138+
androidLibrary(appCompat)
139+
mppModule(myFeature)
140+
}
141+
```
142+
119143
## License
120144
121145
Copyright 2019 IceRock MAG Inc.

build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44

55
import java.util.Base64
6-
import kotlin.text.String
76

87
plugins {
98
`kotlin-dsl`
@@ -12,7 +11,7 @@ plugins {
1211
}
1312

1413
group = "dev.icerock"
15-
version = "0.9.2"
14+
version = "0.10.0"
1615

1716
repositories {
1817
mavenCentral()
@@ -61,6 +60,8 @@ publishing {
6160
url.set("https://github.com/icerockdev/mobile-multiplatform-gradle-plugin")
6261
licenses {
6362
license {
63+
name.set("Apache-2.0")
64+
distribution.set("repo")
6465
url.set("https://github.com/icerockdev/mobile-multiplatform-gradle-plugin/blob/master/LICENSE.md")
6566
}
6667
}
@@ -90,7 +91,7 @@ signing {
9091
String(Base64.getDecoder().decode(base64Key))
9192
}
9293

93-
if(signingKeyId != null) {
94+
if (signingKeyId != null) {
9495
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
9596
sign(publishing.publications)
9697
}

0 commit comments

Comments
 (0)