Skip to content

Commit 800a31b

Browse files
committed
#6 fixes for mavenCentral
1 parent acf5df2 commit 800a31b

File tree

7 files changed

+122
-101
lines changed

7 files changed

+122
-101
lines changed

.github/workflows/compilation-check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ jobs:
1919
- name: Cocoapods install
2020
run: (cd sample/ios-app && pod install)
2121
- name: Check library
22-
run: ./gradlew build publishToMavenLocal
22+
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
23+
- name: Install pods with kotlin
24+
run: cd sample/ios-app && pod install
25+
- name: build ios sample
26+
run: cd sample/ios-app && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

build.gradle.kts

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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
}
@@ -25,13 +27,17 @@ buildscript {
2527

2628
allprojects {
2729
repositories {
30+
mavenCentral()
2831
google()
29-
jcenter()
3032

31-
maven { url = uri("https://kotlin.bintray.com/kotlin") }
32-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
3333
maven { url = uri("https://dl.bintray.com/aakira/maven") }
34-
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+
}
3541
}
3642

3743
apply(plugin = Deps.Plugins.detekt.id)
@@ -55,6 +61,75 @@ allprojects {
5561
}
5662
}
5763

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+
}
58133
}
59134

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

buildSrc/src/main/kotlin/Deps.kt

Lines changed: 2 additions & 3 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"
@@ -21,8 +21,6 @@ object Deps {
2121
const val compileSdk = 28
2222
const val targetSdk = 28
2323
const val minSdk = 16
24-
25-
val signing = GradlePlugin(id = "signing")
2624
}
2725

2826
object Plugins {
@@ -34,6 +32,7 @@ object Deps {
3432

3533
val mobileMultiplatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform")
3634
val mavenPublish = GradlePlugin(id = "org.gradle.maven-publish")
35+
val signing = GradlePlugin(id = "signing")
3736

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

crash-reporting-core/build.gradle.kts

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,78 +2,13 @@
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-
85
plugins {
96
plugin(Deps.Plugins.androidLibrary)
107
plugin(Deps.Plugins.kotlinMultiplatform)
118
plugin(Deps.Plugins.mobileMultiplatform)
129
plugin(Deps.Plugins.mavenPublish)
13-
plugin(Deps.Plugins.signing)
1410
}
1511

16-
group = "dev.icerock.moko"
17-
version = Deps.mokoCrashReportingVersion
18-
1912
dependencies {
2013
androidMainImplementation(Deps.Libs.Android.appCompat)
2114
}
22-
23-
val javadocJar by tasks.registering(Jar::class) {
24-
archiveClassifier.set("javadoc")
25-
}
26-
27-
publishing {
28-
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
29-
name = "OSSRH"
30-
31-
credentials {
32-
username = System.getenv("OSSRH_USER")
33-
password = System.getenv("OSSRH_KEY")
34-
}
35-
}
36-
37-
publications.withType<MavenPublication> {
38-
// Stub javadoc.jar artifact
39-
artifact(javadocJar.get())
40-
41-
// Provide artifacts information requited by Maven Central
42-
pom {
43-
name.set("MOKO crash reporting")
44-
description.set("Fatal and Non-Fatal reporting to Crashlytics for Kotlin Multiplatform Mobile")
45-
url.set("https://github.com/icerockdev/moko-crash-reporting")
46-
licenses {
47-
license {
48-
url.set("https://github.com/icerockdev/moko-crash-reporting/blob/master/LICENSE.md")
49-
}
50-
}
51-
52-
developers {
53-
developer {
54-
id.set("Alex009")
55-
name.set("Aleksey Mikhailov")
56-
email.set("aleksey.mikhailov@icerockdev.com")
57-
}
58-
}
59-
60-
scm {
61-
connection.set("scm:git:ssh://github.com/icerockdev/moko-crash-reporting.git")
62-
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-crash-reporting.git")
63-
url.set("https://github.com/icerockdev/moko-crash-reporting")
64-
}
65-
}
66-
}
67-
68-
signing {
69-
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
70-
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
71-
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
72-
String(Base64.getDecoder().decode(base64Key))
73-
}
74-
if (signingKeyId != null) {
75-
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
76-
sign(publishing.publications)
77-
}
78-
}
79-
}

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-
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CLIENT_ID</key>
6+
<string>149963383979-cdc8ptbcfqdofkk5jfdm4ln8m7ngv6p8.apps.googleusercontent.com</string>
7+
<key>REVERSED_CLIENT_ID</key>
8+
<string>com.googleusercontent.apps.149963383979-cdc8ptbcfqdofkk5jfdm4ln8m7ngv6p8</string>
9+
<key>API_KEY</key>
10+
<string>AIzaSyBnehCN7AvIrtno7WGpCjyHfY3LQZ6f-3w</string>
11+
<key>GCM_SENDER_ID</key>
12+
<string>149963383979</string>
13+
<key>PLIST_VERSION</key>
14+
<string>1</string>
15+
<key>BUNDLE_ID</key>
16+
<string>dev.icerock.moko.sample.crashReporting-test</string>
17+
<key>PROJECT_ID</key>
18+
<string>moko-crash-report</string>
19+
<key>STORAGE_BUCKET</key>
20+
<string>moko-crash-report.appspot.com</string>
21+
<key>IS_ADS_ENABLED</key>
22+
<false></false>
23+
<key>IS_ANALYTICS_ENABLED</key>
24+
<false></false>
25+
<key>IS_APPINVITE_ENABLED</key>
26+
<true></true>
27+
<key>IS_GCM_ENABLED</key>
28+
<true></true>
29+
<key>IS_SIGNIN_ENABLED</key>
30+
<true></true>
31+
<key>GOOGLE_APP_ID</key>
32+
<string>1:149963383979:ios:70426b87b87dee8ae543ee</string>
33+
<key>DATABASE_URL</key>
34+
<string>https://moko-crash-report.firebaseio.com</string>
35+
</dict>
36+
</plist>

0 commit comments

Comments
 (0)