Skip to content

Commit 5d57eac

Browse files
authored
Merge pull request #9 from icerockdev/develop
Release 0.1.2
2 parents cd34eb3 + f6a26cf commit 5d57eac

File tree

12 files changed

+183
-74
lines changed

12 files changed

+183
-74
lines changed

.github/workflows/compilation-check.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@ jobs:
1818
java-version: 1.8
1919
- name: Cocoapods install
2020
run: (cd sample/ios-app && pod install)
21+
- name: Build K/N cache
22+
run: ./gradlew :crash-reporting-core:runCommonizer
2123
- name: Check library
22-
run: ./gradlew build publishToMavenLocal
24+
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
25+
- name: Install pods with kotlin
26+
run: cd sample/ios-app && pod install
27+
- name: build ios sample
28+
run: cd sample/ios-app && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

.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: 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
@@ -17,4 +28,20 @@ jobs:
1728
- name: Cocoapods install
1829
run: (cd sample/ios-app && pod install)
1930
- name: Publish library
20-
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }}
31+
run: ./gradlew publish
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: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
![moko-crash-reporting](https://user-images.githubusercontent.com/701307/98647965-37858400-2368-11eb-98e8-6e62d75fa6af.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-crash-reporting/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-crash-reporting/_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/crash-reporting) ](https://repo1.maven.org/maven2/dev/icerock/moko/crash-reporting) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.31-orange)
33

44
# Mobile Kotlin crash report
55

@@ -26,26 +26,30 @@ This is a Kotlin MultiPlatform library that provides reporting fatal and non-fat
2626
- iOS version 9.0+
2727

2828
## Versions
29+
### Bintray
2930
- kotlin 1.4.10
3031
- 0.1.0
3132
- kotlin 1.4.21
3233
- 0.1.1
34+
### mavenCentral
35+
- kotlin 1.4.31
36+
- 0.1.2
3337

3438
## Installation
3539
root build.gradle
3640
```groovy
3741
allprojects {
3842
repositories {
39-
maven { url = "https://dl.bintray.com/icerockdev/moko" }
43+
mavenCentral()
4044
maven { url = uri("https://dl.bintray.com/aakira/maven") } // for CrashReportingAntilog
4145
}
4246
}
4347
```
4448
project build.gradle
4549
```groovy
4650
dependencies {
47-
commonMainImplementation("dev.icerock.moko:crash-reporting-crashlytics:0.1.1") // for CrashlyticsLogger
48-
commonMainImplementation("dev.icerock.moko:crash-reporting-napier:0.1.1") // for CrashReportingAntilog
51+
commonMainImplementation("dev.icerock.moko:crash-reporting-crashlytics:0.1.2") // for CrashlyticsLogger
52+
commonMainImplementation("dev.icerock.moko:crash-reporting-napier:0.1.2") // for CrashReportingAntilog
4953
commonMainImplementation("com.github.aakira:napier:1.4.1") // for CrashReportingAntilog
5054
}
5155
```
@@ -61,8 +65,8 @@ cocoaPods {
6165
```
6266
project Podfile
6367
```ruby
64-
pod 'MCRCDynamicProxy', :git => 'https://github.com/icerockdev/moko-crash-reporting.git', :tag => 'release/0.1.1'
65-
pod 'MCRCStaticReporter', :git => 'https://github.com/icerockdev/moko-crash-reporting.git', :tag => 'release/0.1.1'
68+
pod 'MCRCDynamicProxy', :git => 'https://github.com/icerockdev/moko-crash-reporting.git', :tag => 'release/0.1.2'
69+
pod 'MCRCStaticReporter', :git => 'https://github.com/icerockdev/moko-crash-reporting.git', :tag => 'release/0.1.2'
6670
```
6771

6872
On iOS side add to `AppDelegate`:

build.gradle.kts

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
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+
57
plugins {
68
plugin(Deps.Plugins.detekt) apply false
79
}
810

911
buildscript {
1012
repositories {
11-
jcenter()
13+
mavenCentral()
1214
google()
1315

14-
maven { url = uri("https://dl.bintray.com/kotlin/kotlin") }
15-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
16-
maven { url = uri("https://plugins.gradle.org/m2/") }
16+
jcenter {
17+
content {
18+
includeGroup("org.jetbrains.trove4j")
19+
}
20+
}
1721
}
1822
dependencies {
1923
plugin(Deps.Plugins.googleServices)
@@ -23,13 +27,17 @@ buildscript {
2327

2428
allprojects {
2529
repositories {
30+
mavenCentral()
2631
google()
27-
jcenter()
2832

29-
maven { url = uri("https://kotlin.bintray.com/kotlin") }
30-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
3133
maven { url = uri("https://dl.bintray.com/aakira/maven") }
32-
maven { url = uri("https://dl.bintray.com/icerockdev/moko") }
34+
35+
jcenter {
36+
content {
37+
includeGroup("org.jetbrains.trove4j")
38+
includeGroup("org.jetbrains.kotlinx")
39+
}
40+
}
3341
}
3442

3543
apply(plugin = Deps.Plugins.detekt.id)
@@ -53,6 +61,75 @@ allprojects {
5361
}
5462
}
5563

64+
plugins.withId(Deps.Plugins.mavenPublish.id) {
65+
group = "dev.icerock.moko"
66+
version = Deps.mokoCrashReportingVersion
67+
68+
val javadocJar by tasks.registering(Jar::class) {
69+
archiveClassifier.set("javadoc")
70+
}
71+
72+
configure<PublishingExtension> {
73+
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
74+
name = "OSSRH"
75+
76+
credentials {
77+
username = System.getenv("OSSRH_USER")
78+
password = System.getenv("OSSRH_KEY")
79+
}
80+
}
81+
82+
publications.withType<MavenPublication> {
83+
// Stub javadoc.jar artifact
84+
artifact(javadocJar.get())
85+
86+
// Provide artifacts information requited by Maven Central
87+
pom {
88+
name.set("MOKO crash reporting")
89+
description.set("Fatal and Non-Fatal reporting to Crashlytics for Kotlin Multiplatform Mobile")
90+
url.set("https://github.com/icerockdev/moko-crash-reporting")
91+
licenses {
92+
license {
93+
url.set("https://github.com/icerockdev/moko-crash-reporting/blob/master/LICENSE.md")
94+
}
95+
}
96+
97+
developers {
98+
developer {
99+
id.set("Dorofeev")
100+
name.set("Andrey Dorofeev")
101+
email.set("adorofeev@icerockdev.com")
102+
}
103+
developer {
104+
id.set("Alex009")
105+
name.set("Aleksey Mikhailov")
106+
email.set("aleksey.mikhailov@icerockdev.com")
107+
}
108+
}
109+
110+
scm {
111+
connection.set("scm:git:ssh://github.com/icerockdev/moko-crash-reporting.git")
112+
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-crash-reporting.git")
113+
url.set("https://github.com/icerockdev/moko-crash-reporting")
114+
}
115+
}
116+
}
117+
118+
apply(plugin = Deps.Plugins.signing.id)
119+
120+
configure<SigningExtension> {
121+
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
122+
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
123+
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
124+
String(Base64.getDecoder().decode(base64Key))
125+
}
126+
if (signingKeyId != null) {
127+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
128+
sign(publications)
129+
}
130+
}
131+
}
132+
}
56133
}
57134

58135
tasks.register("clean", Delete::class).configure {

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.0.1")
2024
}

buildSrc/src/main/kotlin/Deps.kt

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

55
object Deps {
6-
private const val detektVersion = "1.7.4"
6+
private const val detektVersion = "1.15.0"
77

88
private const val androidAppCompatVersion = "1.1.0"
99
private const val napierVersion = "1.4.1"
@@ -14,7 +14,7 @@ object Deps {
1414
private const val firebaseCoreVersion = "17.4.3"
1515
private const val firebaseCrashlyticsVersion = "17.1.0"
1616

17-
const val mokoCrashReportingVersion = "0.1.1"
17+
const val mokoCrashReportingVersion = "0.1.2"
1818

1919

2020
object Android {
@@ -32,6 +32,7 @@ object Deps {
3232

3333
val mobileMultiplatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform")
3434
val mavenPublish = GradlePlugin(id = "org.gradle.maven-publish")
35+
val signing = GradlePlugin(id = "signing")
3536

3637
val detekt = GradlePlugin(id = "io.gitlab.arturbosch.detekt", version = detektVersion)
3738
val iosFramework = GradlePlugin(id = "dev.icerock.mobile.multiplatform.ios-framework")

crash-reporting-core/build.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@ plugins {
99
plugin(Deps.Plugins.mavenPublish)
1010
}
1111

12-
group = "dev.icerock.moko"
13-
version = Deps.mokoCrashReportingVersion
14-
1512
dependencies {
1613
androidMainImplementation(Deps.Libs.Android.appCompat)
1714
}
18-
19-
publishing {
20-
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-crash-reporting/;publish=1") {
21-
name = "bintray"
22-
23-
credentials {
24-
username = System.getProperty("BINTRAY_USER")
25-
password = System.getProperty("BINTRAY_KEY")
26-
}
27-
}
28-
}

crash-reporting-crashlytics/build.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ plugins {
99
plugin(Deps.Plugins.mavenPublish)
1010
}
1111

12-
group = "dev.icerock.moko"
13-
version = Deps.mokoCrashReportingVersion
14-
1512
dependencies {
1613
commonMainApi(project(":crash-reporting-core"))
1714

@@ -21,17 +18,6 @@ dependencies {
2118
androidMainImplementation(Deps.Libs.Android.firebaseCrashlytics)
2219
}
2320

24-
publishing {
25-
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-crash-reporting/;publish=1") {
26-
name = "bintray"
27-
28-
credentials {
29-
username = System.getProperty("BINTRAY_USER")
30-
password = System.getProperty("BINTRAY_KEY")
31-
}
32-
}
33-
}
34-
3521
cocoaPods {
3622
podsProject = file("../sample/ios-app/Pods/Pods.xcodeproj")
3723

crash-reporting-napier/build.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ plugins {
99
plugin(Deps.Plugins.mavenPublish)
1010
}
1111

12-
group = "dev.icerock.moko"
13-
version = Deps.mokoCrashReportingVersion
14-
1512
dependencies {
1613
commonMainImplementation(Deps.Libs.MultiPlatform.napier.common)
1714

@@ -20,14 +17,3 @@ dependencies {
2017
androidMainImplementation(Deps.Libs.Android.appCompat)
2118

2219
}
23-
24-
publishing {
25-
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-crash-reporting/;publish=1") {
26-
name = "bintray"
27-
28-
credentials {
29-
username = System.getProperty("BINTRAY_USER")
30-
password = System.getProperty("BINTRAY_KEY")
31-
}
32-
}
33-
}

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

0 commit comments

Comments
 (0)