-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from icerockdev/develop
Release 0.2.1
- Loading branch information
Showing
8 changed files
with
130 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,46 @@ | ||
name: KMP library publish | ||
name: Create release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version' | ||
default: '0.1.0' | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS-latest | ||
|
||
publish: | ||
name: Publish library at mavenCentral | ||
runs-on: macOS-latest | ||
env: | ||
OSSRH_USER: ${{ secrets.OSSRH_USER }} | ||
OSSRH_KEY: ${{ secrets.OSSRH_KEY }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Cocoapods install | ||
run: (cd sample/ios-app && pod install) | ||
- name: Publish library | ||
run: ./gradlew publish | ||
release: | ||
name: Create release | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
java-version: 1.8 | ||
- name: Cocoapods install | ||
run: (cd sample/ios-app && pod install) | ||
- name: Publish library | ||
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} | ||
commitish: ${{ github.ref }} | ||
tag_name: release/${{ github.event.inputs.version }} | ||
release_name: Release ${{ github.event.inputs.version }} | ||
body: "Will be filled later" | ||
draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
plugins { | ||
id("org.jetbrains.kotlin.jvm") version("1.4.10") | ||
id("org.jetbrains.kotlin.jvm") version("1.4.31") | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
google() | ||
|
||
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") } | ||
jcenter { | ||
content { | ||
includeGroup("org.jetbrains.trove4j") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("dev.icerock:mobile-multiplatform:0.7.1") | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10") | ||
implementation("dev.icerock:mobile-multiplatform:0.9.1") | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31") | ||
implementation("com.android.tools.build:gradle:4.0.1") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,16 @@ | |
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
import java.util.Base64 | ||
import kotlin.text.String | ||
|
||
plugins { | ||
plugin(Deps.Plugins.androidLibrary) | ||
plugin(Deps.Plugins.kotlinMultiplatform) | ||
plugin(Deps.Plugins.kotlinAndroidExtensions) | ||
plugin(Deps.Plugins.mobileMultiplatform) | ||
plugin(Deps.Plugins.mavenPublish) | ||
plugin(Deps.Plugins.signing) | ||
} | ||
|
||
group = "dev.icerock.moko" | ||
|
@@ -22,13 +26,65 @@ dependencies { | |
} | ||
} | ||
|
||
val javadocJar by tasks.registering(Jar::class) { | ||
archiveClassifier.set("javadoc") | ||
} | ||
|
||
publishing { | ||
repositories.maven("https://api.bintray.com/maven/icerockdev/moko/moko-socket-io/;publish=1") { | ||
name = "bintray" | ||
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
name = "OSSRH" | ||
|
||
credentials { | ||
username = System.getProperty("BINTRAY_USER") | ||
password = System.getProperty("BINTRAY_KEY") | ||
username = System.getenv("OSSRH_USER") | ||
password = System.getenv("OSSRH_KEY") | ||
} | ||
} | ||
|
||
publications.withType<MavenPublication> { | ||
// Stub javadoc.jar artifact | ||
artifact(javadocJar.get()) | ||
|
||
// Provide artifacts information requited by Maven Central | ||
pom { | ||
name.set("MOKO socket io") | ||
description.set("Socket.IO implementation Kotlin Multiplatform library") | ||
url.set("https://github.com/icerockdev/moko-socket-io") | ||
licenses { | ||
license { | ||
url.set("https://github.com/icerockdev/moko-socket-io/blob/master/LICENSE.md") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("Alex009") | ||
name.set("Aleksey Mikhailov") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("Dorofeev") | ||
name.set("Andrey Dorofeef") | ||
email.set("[email protected]") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:ssh://github.com/icerockdev/moko-socket-io.git") | ||
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-socket-io.git") | ||
url.set("https://github.com/icerockdev/moko-socket-io") | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID") | ||
val signingPassword: String? = System.getenv("SIGNING_PASSWORD") | ||
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key -> | ||
String(Base64.getDecoder().decode(base64Key)) | ||
} | ||
if (signingKeyId != null) { | ||
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) | ||
sign(publishing.publications) | ||
} | ||
} | ||
} | ||
|