Skip to content

Commit d565d66

Browse files
authored
Merge pull request #22 from icerockdev/develop
Release 0.3.2
2 parents 131dbc7 + 3ccfa2f commit d565d66

9 files changed

Lines changed: 127 additions & 39 deletions

File tree

.github/workflows/publish.yml

Lines changed: 33 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: macOS-latest
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

1122
steps:
1223
- uses: actions/checkout@v1
@@ -15,4 +26,21 @@ jobs:
1526
with:
1627
java-version: 1.8
1728
- name: Publish
18-
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }}
29+
run: ./gradlew publish
30+
31+
release:
32+
name: Create release
33+
needs: publish
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Create Release
37+
id: create_release
38+
uses: actions/create-release@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
commitish: ${{ github.ref }}
43+
tag_name: release/${{ github.event.inputs.version }}
44+
release_name: Release ${{ github.event.inputs.version }}
45+
body: "Will be filled later"
46+
draft: true

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![moko-errors](img/logo.png)
22

3-
[![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-errors/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-errors/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.0-orange)
3+
[![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/errors) ](https://repo1.maven.org/maven2/dev/icerock/moko/errors) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.31-orange)
44

55
# Mobile Kotlin errors
66
This is a Kotlin MultiPlatform library that provides automatic exception handling and
@@ -34,6 +34,7 @@ on the platforms. Converts the exception class to an error object to display. Th
3434
- iOS version 9.0+
3535

3636
## Versions
37+
### Bintray
3738
- kotlin 1.3.72
3839
- 0.1.0
3940
- 0.2.0
@@ -42,21 +43,24 @@ on the platforms. Converts the exception class to an error object to display. Th
4243
- 0.3.0
4344
- kotlin 1.4.21
4445
- 0.3.1
46+
### mavenCentral
47+
- kotlin 1.4.31
48+
- 0.3.2
4549

4650
## Installation
4751
root build.gradle
4852
```groovy
4953
allprojects {
5054
repositories {
51-
maven { url = "https://dl.bintray.com/icerockdev/moko" }
55+
mavenCentral()
5256
}
5357
}
5458
```
5559

5660
project build.gradle
5761
```groovy
5862
dependencies {
59-
commonMainApi("dev.icerock.moko:errors:0.3.1")
63+
commonMainApi("dev.icerock.moko:errors:0.3.2")
6064
}
6165
```
6266

build.gradle.kts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44

55
buildscript {
66
repositories {
7-
jcenter()
7+
mavenCentral()
88
google()
99

10-
maven { url = uri("https://dl.bintray.com/kotlin/kotlin") }
11-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
12-
maven { url = uri("https://plugins.gradle.org/m2/") }
13-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
10+
gradlePluginPortal()
1411
}
1512

1613
dependencies {
@@ -24,12 +21,15 @@ plugins {
2421

2522
allprojects {
2623
repositories {
24+
mavenCentral()
2725
google()
28-
jcenter()
2926

30-
maven { url = uri("https://kotlin.bintray.com/kotlin") }
31-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
32-
maven { url = uri("https://dl.bintray.com/icerockdev/moko") }
27+
jcenter {
28+
content {
29+
includeGroup("org.jetbrains.trove4j")
30+
includeGroup("org.jetbrains.kotlinx")
31+
}
32+
}
3333
}
3434

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

buildSrc/build.gradle.kts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +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-
mavenLocal()
11-
12-
jcenter()
10+
mavenCentral()
1311
google()
1412

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

1820
dependencies {
19-
implementation("dev.icerock:mobile-multiplatform:0.7.0")
20-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
21-
implementation("com.android.tools.build:gradle:4.0.1")
21+
implementation("dev.icerock:mobile-multiplatform:0.9.1")
22+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31")
23+
implementation("com.android.tools.build:gradle:4.1.2")
2224
}

buildSrc/src/main/kotlin/Deps.kt

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

55
object Deps {
6-
private const val kotlinVersion = "1.4.21"
6+
private const val kotlinVersion = "1.4.31"
77

88
private const val androidAppCompatVersion = "1.1.0"
99
private const val materialDesignVersion = "1.0.0"
@@ -13,9 +13,9 @@ object Deps {
1313
private const val detektVersion = "1.7.4"
1414

1515
private const val coroutinesVersion = "1.4.2"
16-
private const val mokoMvvmVersion = "0.9.0"
17-
private const val mokoResourcesVersion = "0.14.0"
18-
const val mokoErrorsVersion = "0.3.1"
16+
private const val mokoMvvmVersion = "0.9.2"
17+
private const val mokoResourcesVersion = "0.15.1"
18+
const val mokoErrorsVersion = "0.3.2"
1919

2020
object Android {
2121
const val compileSdk = 28
@@ -33,6 +33,7 @@ object Deps {
3333
val kotlinAndroidExtensions = GradlePlugin(id = "kotlin-android-extensions")
3434
val kotlinSerialization = GradlePlugin(id = "kotlin-serialization")
3535
val mavenPublish = GradlePlugin(id = "org.gradle.maven-publish")
36+
val signing = GradlePlugin(id = "signing")
3637

3738
val mobileMultiplatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform")
3839
val iosFramework = GradlePlugin(id = "dev.icerock.mobile.multiplatform.ios-framework")

errors/build.gradle.kts

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
* Copyright 2020 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.kotlinAndroidExtensions)
912
plugin(Deps.Plugins.mobileMultiplatform)
1013
plugin(Deps.Plugins.mokoResources)
1114
plugin(Deps.Plugins.mavenPublish)
15+
plugin(Deps.Plugins.signing)
1216
}
1317

1418
group = "dev.icerock.moko"
@@ -32,13 +36,66 @@ multiplatformResources {
3236
multiplatformResourcesPackage = "dev.icerock.moko.errors"
3337
}
3438

39+
val javadocJar by tasks.registering(Jar::class) {
40+
archiveClassifier.set("javadoc")
41+
}
42+
3543
publishing {
36-
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-errors/;publish=1") {
37-
name = "bintray"
44+
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
45+
name = "OSSRH"
3846

3947
credentials {
40-
username = System.getProperty("BINTRAY_USER")
41-
password = System.getProperty("BINTRAY_KEY")
48+
username = System.getenv("OSSRH_USER")
49+
password = System.getenv("OSSRH_KEY")
50+
}
51+
}
52+
53+
publications.withType<MavenPublication> {
54+
// Stub javadoc.jar artifact
55+
artifact(javadocJar.get())
56+
57+
// Provide artifacts information requited by Maven Central
58+
pom {
59+
name.set("MOKO errors")
60+
description.set("Automated exceptions handler for mobile (android & ios) Kotlin Multiplatform development.")
61+
url.set("https://github.com/icerockdev/moko-errors")
62+
licenses {
63+
license {
64+
url.set("https://github.com/icerockdev/moko-errors/blob/master/LICENSE.md")
65+
}
66+
}
67+
68+
developers {
69+
developer {
70+
id.set("Tetraquark")
71+
name.set("Vladislav Areshkin")
72+
email.set("vareshkin@icerockdev.com")
73+
}
74+
developer {
75+
id.set("Alex009")
76+
name.set("Aleksey Mikhailov")
77+
email.set("aleksey.mikhailov@icerockdev.com")
78+
}
79+
}
80+
81+
scm {
82+
connection.set("scm:git:ssh://github.com/icerockdev/moko-errors.git")
83+
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-errors.git")
84+
url.set("https://github.com/icerockdev/moko-errors")
85+
}
86+
}
87+
}
88+
89+
signing {
90+
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
91+
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
92+
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
93+
String(Base64.getDecoder().decode(base64Key))
94+
}
95+
if (signingKeyId != null) {
96+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
97+
sign(publishing.publications)
4298
}
4399
}
44100
}
101+

gradle.properties

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

1010
android.useAndroidX=true
11-
12-
# Workaround for Bintray treating .sha512 files as artifacts
13-
# https://github.com/gradle/gradle/issues/11412
14-
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.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

sample/mpp-library/MultiPlatformLibrary.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'MultiPlatformLibrary'
3-
spec.version = '0.3.1'
3+
spec.version = '0.3.2'
44
spec.homepage = 'Link to a Kotlin/Native module homepage'
55
spec.source = { :git => "Not Published", :tag => "Cocoapods/#{spec.name}/#{spec.version}" }
66
spec.authors = 'IceRock Development'

0 commit comments

Comments
 (0)