Skip to content

Commit ef9e539

Browse files
authored
Merge pull request #11 from icerockdev/develop
Release 0.2.1
2 parents 9fe74c2 + 441f946 commit ef9e539

File tree

8 files changed

+130
-40
lines changed

8 files changed

+130
-40
lines changed

.github/workflows/publish.yml

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,46 @@
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:
9-
runs-on: macOS-latest
10-
12+
publish:
13+
name: Publish library at mavenCentral
14+
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 }}
21+
steps:
22+
- uses: actions/checkout@v1
23+
- name: Set up JDK 1.8
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: 1.8
27+
- name: Cocoapods install
28+
run: (cd sample/ios-app && pod install)
29+
- name: Publish library
30+
run: ./gradlew publish
31+
release:
32+
name: Create release
33+
needs: publish
34+
runs-on: ubuntu-latest
1135
steps:
12-
- uses: actions/checkout@v1
13-
- name: Set up JDK 1.8
14-
uses: actions/setup-java@v1
36+
- name: Create Release
37+
id: create_release
38+
uses: actions/create-release@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1541
with:
16-
java-version: 1.8
17-
- name: Cocoapods install
18-
run: (cd sample/ios-app && pod install)
19-
- name: Publish library
20-
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }}
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: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
![moko-socket-io](https://user-images.githubusercontent.com/5010169/80988267-712b7e80-8e5d-11ea-955e-c788a567c64e.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-socket-io/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-socket-io/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.10-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/socket-io) ](https://repo1.maven.org/maven2/dev/icerock/moko/socket-io) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.31-orange)
33

44
# Mobile Kotlin socket io
55
This is a Kotlin MultiPlatform library that provides real-time, event-based communication for iOS and Android.
@@ -24,25 +24,29 @@ This is a Kotlin MultiPlatform library that provides real-time, event-based comm
2424
- iOS version 9.0+
2525

2626
## Versions
27+
### Bintray
2728
- kotlin 1.3.72
2829
- 0.1.0
2930
- kotlin 1.4.10
3031
- 0.2.0
32+
### mavenCentral
33+
- kotlin 1.4.31
34+
- 0.2.1
3135

3236
## Installation
3337
root build.gradle
3438
```groovy
3539
allprojects {
3640
repositories {
37-
maven { url = "https://dl.bintray.com/icerockdev/moko" }
41+
mavenCentral()
3842
}
3943
}
4044
```
4145

4246
project build.gradle
4347
```groovy
4448
dependencies {
45-
commonMainApi("dev.icerock.moko:socket-io:0.2.0")
49+
commonMainApi("dev.icerock.moko:socket-io:0.2.1")
4650
commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC")
4751
}
4852
@@ -55,7 +59,7 @@ cocoaPods {
5559

5660
Podfile
5761
```ruby
58-
pod 'mokoSocketIo', :git => 'https://github.com/icerockdev/moko-socket-io.git', :tag => 'release/0.2.0'
62+
pod 'mokoSocketIo', :git => 'https://github.com/icerockdev/moko-socket-io.git', :tag => 'release/0.2.1'
5963
```
6064

6165
## Usage

build.gradle.kts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ plugins {
88

99
allprojects {
1010
repositories {
11+
mavenCentral()
1112
google()
12-
jcenter()
1313

14-
maven { url = uri("https://kotlin.bintray.com/kotlin") }
15-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
16-
maven { url = uri("https://dl.bintray.com/icerockdev/moko") }
14+
jcenter {
15+
content {
16+
includeGroup("org.jetbrains.trove4j")
17+
includeGroup("org.jetbrains.kotlinx")
18+
}
19+
}
1720
}
1821

1922
apply(plugin = Deps.Plugins.detekt.id)

buildSrc/build.gradle.kts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
plugins {
2-
id("org.jetbrains.kotlin.jvm") version("1.4.10")
2+
id("org.jetbrains.kotlin.jvm") version("1.4.31")
33
}
44

55
repositories {
6-
jcenter()
6+
mavenCentral()
77
google()
88

9-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
9+
jcenter {
10+
content {
11+
includeGroup("org.jetbrains.trove4j")
12+
}
13+
}
1014
}
1115

1216
dependencies {
13-
implementation("dev.icerock:mobile-multiplatform:0.7.1")
14-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10")
17+
implementation("dev.icerock:mobile-multiplatform:0.9.1")
18+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31")
1519
implementation("com.android.tools.build:gradle:4.0.1")
1620
}

buildSrc/src/main/kotlin/Deps.kt

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

55
object Deps {
66

7-
private const val kotlinVersion = "1.4.0"
8-
private const val detektVersion = "1.7.4"
7+
private const val kotlinVersion = "1.4.31"
8+
private const val detektVersion = "1.15.0"
99

1010
private const val androidAppCompatVersion = "1.1.0"
1111
private const val androidSocketIoVersion = "1.0.0"
1212
private const val kotlinxSerializationVersion = "1.0.0-RC"
1313

14-
const val mokoSocketIoVersion = "0.2.0"
14+
const val mokoSocketIoVersion = "0.2.1"
1515

1616

1717
object Android {
@@ -30,6 +30,7 @@ object Deps {
3030

3131
val mobileMultiplatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform")
3232
val mavenPublish = GradlePlugin(id = "org.gradle.maven-publish")
33+
val signing = GradlePlugin(id = "signing")
3334

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

gradle.properties

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@ kotlin.native.enableDependencyPropagation=false
77
kotlin.mpp.enableGranularSourceSetsMetadata=true
88
kotlin.mpp.enableCompatibilityMetadataVariant=true
99

10-
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
10+
android.useAndroidX=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.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

socket-io/build.gradle.kts

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
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.mavenPublish)
14+
plugin(Deps.Plugins.signing)
1115
}
1216

1317
group = "dev.icerock.moko"
@@ -22,13 +26,65 @@ dependencies {
2226
}
2327
}
2428

29+
val javadocJar by tasks.registering(Jar::class) {
30+
archiveClassifier.set("javadoc")
31+
}
32+
2533
publishing {
26-
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-socket-io/;publish=1") {
27-
name = "bintray"
34+
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
35+
name = "OSSRH"
2836

2937
credentials {
30-
username = System.getProperty("BINTRAY_USER")
31-
password = System.getProperty("BINTRAY_KEY")
38+
username = System.getenv("OSSRH_USER")
39+
password = System.getenv("OSSRH_KEY")
40+
}
41+
}
42+
43+
publications.withType<MavenPublication> {
44+
// Stub javadoc.jar artifact
45+
artifact(javadocJar.get())
46+
47+
// Provide artifacts information requited by Maven Central
48+
pom {
49+
name.set("MOKO socket io")
50+
description.set("Socket.IO implementation Kotlin Multiplatform library")
51+
url.set("https://github.com/icerockdev/moko-socket-io")
52+
licenses {
53+
license {
54+
url.set("https://github.com/icerockdev/moko-socket-io/blob/master/LICENSE.md")
55+
}
56+
}
57+
58+
developers {
59+
developer {
60+
id.set("Alex009")
61+
name.set("Aleksey Mikhailov")
62+
email.set("[email protected]")
63+
}
64+
developer {
65+
id.set("Dorofeev")
66+
name.set("Andrey Dorofeef")
67+
email.set("[email protected]")
68+
}
69+
}
70+
71+
scm {
72+
connection.set("scm:git:ssh://github.com/icerockdev/moko-socket-io.git")
73+
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-socket-io.git")
74+
url.set("https://github.com/icerockdev/moko-socket-io")
75+
}
76+
}
77+
}
78+
79+
signing {
80+
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
81+
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
82+
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
83+
String(Base64.getDecoder().decode(base64Key))
84+
}
85+
if (signingKeyId != null) {
86+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
87+
sign(publishing.publications)
3288
}
3389
}
3490
}

0 commit comments

Comments
 (0)