Skip to content

Commit 3c97b69

Browse files
authored
Merge pull request #22 from icerockdev/develop
Release 0.6.1
2 parents fb78928 + 7957f46 commit 3c97b69

8 files changed

Lines changed: 118 additions & 29 deletions

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1-
name: KMP library publish
1+
name: Create release
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version'
8+
default: '0.1.0'
9+
required: true
610

711
jobs:
8-
build:
12+
publish:
13+
name: Publish library at mavenCentral
914
runs-on: ${{ matrix.os }}
15+
env:
16+
OSSRH_USER: ${{ secrets.OSSRH_USER }}
17+
OSSRH_KEY: ${{ secrets.OSSRH_KEY }}
18+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }}
19+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
20+
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }}
1021
strategy:
1122
matrix:
1223
os: [macos-latest, windows-latest, ubuntu-latest]
@@ -17,4 +28,20 @@ jobs:
1728
with:
1829
java-version: 1.8
1930
- name: Publish
20-
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} -DIS_MAIN_HOST=${{ matrix.os == 'ubuntu-latest' }}
31+
run: ./gradlew publish -DIS_MAIN_HOST=${{ matrix.os == 'ubuntu-latest' }}
32+
release:
33+
name: Create release
34+
needs: publish
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Create Release
38+
id: create_release
39+
uses: actions/create-release@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
commitish: ${{ github.ref }}
44+
tag_name: release/${{ github.event.inputs.version }}
45+
release_name: Release ${{ github.event.inputs.version }}
46+
body: "Will be filled later"
47+
draft: true

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
![moko-parcelize](img/logo.png)
2-
[![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.21-orange)
2+
[![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)
33

44
# MOKO Parcelize
55
This is a Kotlin Multiplatform library that supports Parcelize in common code.
@@ -25,6 +25,7 @@ This is a Kotlin Multiplatform library that supports Parcelize in common code.
2525
- iOS version 9.0+
2626

2727
## Versions
28+
### Bintray
2829
- kotlin 1.3.50
2930
- 0.1.0
3031
- kotlin 1.3.60
@@ -37,21 +38,24 @@ This is a Kotlin Multiplatform library that supports Parcelize in common code.
3738
- 0.5.0
3839
- kotlin 1.4.21
3940
- 0.6.0
41+
### mavenCentral
42+
- kotlin 1.4.31
43+
- 0.6.1
4044

4145
## Installation
4246
root build.gradle
4347
```groovy
4448
allprojects {
4549
repositories {
46-
maven { url = "https://dl.bintray.com/icerockdev/moko" }
50+
mavenCentral()
4751
}
4852
}
4953
```
5054

5155
project build.gradle
5256
```groovy
5357
dependencies {
54-
commonMainApi("dev.icerock.moko:parcelize:0.6.0")
58+
commonMainApi("dev.icerock.moko:parcelize:0.6.1")
5559
}
5660
```
5761

build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
allprojects {
66
repositories {
7-
7+
mavenCentral()
88
google()
9-
jcenter()
109

11-
maven { url = uri("https://kotlin.bintray.com/kotlin") }
12-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
13-
maven { url = uri("https://dl.bintray.com/icerockdev/moko") }
10+
jcenter {
11+
content {
12+
includeGroup("org.jetbrains.trove4j")
13+
}
14+
}
1415
}
1516

1617
plugins.withId(Deps.Plugins.androidLibrary.id) {

buildSrc/build.gradle.kts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33
*/
44

55
plugins {
6-
id("org.jetbrains.kotlin.jvm") version("1.4.21")
6+
id("org.jetbrains.kotlin.jvm") version("1.4.31")
77
}
88

99
repositories {
10-
jcenter()
10+
mavenCentral()
1111
google()
1212

13-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
13+
jcenter {
14+
content {
15+
includeGroup("org.jetbrains.trove4j")
16+
}
17+
}
1418
}
1519

1620
dependencies {
17-
implementation("dev.icerock:mobile-multiplatform:0.9.0")
18-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
21+
implementation("dev.icerock:mobile-multiplatform:0.9.1")
22+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31")
1923
implementation("com.android.tools.build:gradle:4.1.1")
2024
}

buildSrc/src/main/kotlin/Deps.kt

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

55
object Deps {
6-
private const val kotlinVersion = "1.4.21"
6+
private const val kotlinVersion = "1.4.31"
77
private const val androidAppCompatVersion = "1.1.0"
8-
const val mokoParcelizeVersion = "0.6.0"
8+
const val mokoParcelizeVersion = "0.6.1"
99

1010
object Android {
1111
const val compileSdk = 28
@@ -23,6 +23,7 @@ object Deps {
2323
val mobileMultiPlatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform")
2424
val appleFramework = GradlePlugin(id = "dev.icerock.mobile.multiplatform.apple-framework")
2525
val mavenPublish = GradlePlugin(id = "maven-publish")
26+
val signing = GradlePlugin(id = "signing")
2627
}
2728

2829
object Libs {

gradle.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ kotlin.mpp.enableGranularSourceSetsMetadata=true
77
kotlin.mpp.enableCompatibilityMetadataVariant=true
88

99
android.useAndroidX=true
10-
11-
# Workaround for Bintray treating .sha512 files as artifacts
12-
# https://github.com/gradle/gradle/issues/11412
13-
systemProp.org.gradle.internal.publish.checksums.insecure=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

parcelize/build.gradle.kts

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5+
import java.util.Base64
6+
import kotlin.text.String
7+
58
plugins {
69
plugin(Deps.Plugins.androidLibrary)
710
plugin(Deps.Plugins.kotlinMultiPlatform)
811
plugin(Deps.Plugins.kotlinParcelize)
912
plugin(Deps.Plugins.mobileMultiPlatform)
1013
plugin(Deps.Plugins.mavenPublish)
14+
plugin(Deps.Plugins.signing)
1115
}
1216

1317
group = "dev.icerock.moko"
@@ -61,13 +65,17 @@ fun org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.windows() {
6165
mingwX86()
6266
}
6367

68+
val javadocJar by tasks.registering(Jar::class) {
69+
archiveClassifier.set("javadoc")
70+
}
71+
6472
publishing {
65-
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-parcelize/;publish=1") {
66-
name = "bintray"
73+
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
74+
name = "OSSRH"
6775

6876
credentials {
69-
username = System.getProperty("BINTRAY_USER")
70-
password = System.getProperty("BINTRAY_KEY")
77+
username = System.getenv("OSSRH_USER")
78+
password = System.getenv("OSSRH_KEY")
7179
}
7280
}
7381

@@ -92,4 +100,52 @@ publishing {
92100
.matching { it.publication == targetPublication }
93101
.all { onlyIf { System.getProperty("IS_MAIN_HOST") == "true" } }
94102
}
103+
104+
publications.withType<MavenPublication> {
105+
// Stub javadoc.jar artifact
106+
artifact(javadocJar.get())
107+
108+
// Provide artifacts information requited by Maven Central
109+
pom {
110+
name.set("MOKO parcelize")
111+
description.set("@Parcelize support for android from common code in Kotlin Multiplatform")
112+
url.set("https://github.com/icerockdev/moko-parcelize")
113+
licenses {
114+
license {
115+
url.set("https://github.com/icerockdev/moko-parcelize/blob/master/LICENSE.md")
116+
}
117+
}
118+
119+
developers {
120+
developer {
121+
id.set("Alex009")
122+
name.set("Aleksey Mikhailov")
123+
email.set("[email protected]")
124+
}
125+
developer {
126+
id.set("nrobi144")
127+
name.set("Nagy Robert")
128+
email.set("[email protected]")
129+
}
130+
}
131+
132+
scm {
133+
connection.set("scm:git:ssh://github.com/icerockdev/moko-parcelize.git")
134+
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-parcelize.git")
135+
url.set("https://github.com/icerockdev/moko-parcelize")
136+
}
137+
}
138+
}
139+
140+
signing {
141+
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
142+
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
143+
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
144+
String(Base64.getDecoder().decode(base64Key))
145+
}
146+
if (signingKeyId != null) {
147+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
148+
sign(publishing.publications)
149+
}
150+
}
95151
}

0 commit comments

Comments
 (0)