Skip to content

Commit 9fe74c2

Browse files
authored
Merge pull request #2 from icerockdev/develop
Release 0.2.0
2 parents dec587d + a1a9108 commit 9fe74c2

File tree

27 files changed

+120
-205
lines changed

27 files changed

+120
-205
lines changed

.github/workflows/compilation-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- name: Cocoapods install
2020
run: (cd sample/ios-app && pod install)
2121
- name: Check library
22-
run: ./gradlew -PlibraryPublish detekt :socket-io:build
22+
run: ./gradlew build publishToMavenLocal

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: Cocoapods install
1818
run: (cd sample/ios-app && pod install)
1919
- name: Publish library
20-
run: ./gradlew -PlibraryPublish :socket-io:publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }}
20+
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }}

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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.3.72-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://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)
33

4-
# Mobile Kotlin resources
5-
This is a Kotlin MultiPlatform library that provides access to the resources on iOS & Android with the support of the default system localization.
4+
# Mobile Kotlin socket io
5+
This is a Kotlin MultiPlatform library that provides real-time, event-based communication for iOS and Android.
66

77
## Table of Contents
88
- [Features](#features)
@@ -19,13 +19,15 @@ This is a Kotlin MultiPlatform library that provides access to the resources on
1919
- **Socket.IO in common code** - actual implementations is [socket.io-client-java](https://github.com/socketio/socket.io-client-java) and [socket.io-client-swift](https://github.com/socketio/socket.io-client-swift);
2020

2121
## Requirements
22-
- Gradle version 5.6.4+
22+
- Gradle version 6.0+
2323
- Android API 16+
2424
- iOS version 9.0+
2525

2626
## Versions
2727
- kotlin 1.3.72
2828
- 0.1.0
29+
- kotlin 1.4.10
30+
- 0.2.0
2931

3032
## Installation
3133
root build.gradle
@@ -40,8 +42,8 @@ allprojects {
4042
project build.gradle
4143
```groovy
4244
dependencies {
43-
commonMainApi("dev.icerock.moko:socket-io:0.1.0")
44-
commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:0.20.0")
45+
commonMainApi("dev.icerock.moko:socket-io:0.2.0")
46+
commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC")
4547
}
4648
4749
cocoaPods {
@@ -53,7 +55,7 @@ cocoaPods {
5355

5456
Podfile
5557
```ruby
56-
pod 'mokoSocketIo', :git => 'https://github.com/icerockdev/moko-socket-io.git', :tag => 'release/0.1.0'
58+
pod 'mokoSocketIo', :git => 'https://github.com/icerockdev/moko-socket-io.git', :tag => 'release/0.2.0'
5759
```
5860

5961
## Usage
@@ -113,7 +115,6 @@ Please see more examples in the [sample directory](sample).
113115
## Set Up Locally
114116
- The [socket-io directory](socket-io) contains the `socket-io` library;
115117
- The [sample directory](sample) contains sample apps for Android and iOS; plus the mpp-library connected to the apps;
116-
- For local testing a use the `./publishToMavenLocal.sh` script - so that sample apps use the locally published version.
117118

118119
## Contributing
119120
All development (both new features and bug fixes) is performed in the `develop` branch. This way `master` always contains the sources of the most recently released version. Please send PRs with bug fixes to the `develop` branch. Documentation fixes in the markdown files are an exception to this rule. They are updated directly in `master`.

build.gradle.kts

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,8 @@ plugins {
66
plugin(Deps.Plugins.detekt) apply false
77
}
88

9-
buildscript {
10-
repositories {
11-
mavenLocal()
12-
13-
jcenter()
14-
google()
15-
16-
maven { url = uri("https://dl.bintray.com/kotlin/kotlin") }
17-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
18-
maven { url = uri("https://plugins.gradle.org/m2/") }
19-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
20-
}
21-
dependencies {
22-
with(Deps.Plugins) {
23-
listOf(
24-
androidApplication,
25-
androidLibrary,
26-
kotlinMultiplatform,
27-
kotlinKapt,
28-
kotlinAndroid
29-
)
30-
}.let { plugins(it) }
31-
}
32-
}
33-
349
allprojects {
3510
repositories {
36-
mavenLocal()
37-
3811
google()
3912
jcenter()
4013

@@ -46,14 +19,24 @@ allprojects {
4619
apply(plugin = Deps.Plugins.detekt.id)
4720

4821
configure<io.gitlab.arturbosch.detekt.extensions.DetektExtension> {
49-
toolVersion = Versions.detekt
5022
input.setFrom("src/commonMain/kotlin", "src/androidMain/kotlin", "src/iosMain/kotlin")
5123
}
5224

5325
dependencies {
5426
"detektPlugins"(Deps.Libs.Jvm.detektFormatting)
5527
}
5628

29+
plugins.withId(Deps.Plugins.androidLibrary.id) {
30+
configure<com.android.build.gradle.LibraryExtension> {
31+
compileSdkVersion(Deps.Android.compileSdk)
32+
33+
defaultConfig {
34+
minSdkVersion(Deps.Android.minSdk)
35+
targetSdkVersion(Deps.Android.targetSdk)
36+
}
37+
}
38+
}
39+
5740
}
5841

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

buildSrc/build.gradle.kts

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

55
repositories {
@@ -10,11 +10,7 @@ repositories {
1010
}
1111

1212
dependencies {
13-
implementation("dev.icerock:mobile-multiplatform:0.6.1")
14-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
15-
implementation("com.android.tools.build:gradle:3.6.3")
16-
}
17-
18-
kotlinDslPluginOptions {
19-
experimentalWarning.set(false)
20-
}
13+
implementation("dev.icerock:mobile-multiplatform:0.7.1")
14+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10")
15+
implementation("com.android.tools.build:gradle:4.0.1")
16+
}

buildSrc/src/main/kotlin/Deps.kt

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,54 @@
33
*/
44

55
object Deps {
6+
7+
private const val kotlinVersion = "1.4.0"
8+
private const val detektVersion = "1.7.4"
9+
10+
private const val androidAppCompatVersion = "1.1.0"
11+
private const val androidSocketIoVersion = "1.0.0"
12+
private const val kotlinxSerializationVersion = "1.0.0-RC"
13+
14+
const val mokoSocketIoVersion = "0.2.0"
15+
16+
17+
object Android {
18+
const val compileSdk = 28
19+
const val targetSdk = 28
20+
const val minSdk = 16
21+
}
22+
623
object Plugins {
7-
val androidApplication = PluginDesc(id = "com.android.application")
8-
val androidLibrary = PluginDesc(id = "com.android.library")
24+
val androidApplication = GradlePlugin(id = "com.android.application")
25+
val androidLibrary = GradlePlugin(id = "com.android.library")
926

10-
val kotlinMultiplatform = PluginDesc(id = "org.jetbrains.kotlin.multiplatform")
11-
val kotlinKapt = PluginDesc(id = "kotlin-kapt")
12-
val kotlinAndroid = PluginDesc(id = "kotlin-android")
13-
val kotlinAndroidExtensions = PluginDesc(id = "kotlin-android-extensions")
27+
val kotlinMultiplatform = GradlePlugin(id = "org.jetbrains.kotlin.multiplatform")
28+
val kotlinAndroid = GradlePlugin(id = "kotlin-android")
29+
val kotlinAndroidExtensions = GradlePlugin(id = "kotlin-android-extensions")
1430

15-
val mobileMultiplatform = PluginDesc(id = "dev.icerock.mobile.multiplatform")
31+
val mobileMultiplatform = GradlePlugin(id = "dev.icerock.mobile.multiplatform")
32+
val mavenPublish = GradlePlugin(id = "org.gradle.maven-publish")
1633

17-
val detekt = PluginDesc(id = "io.gitlab.arturbosch.detekt", version = Versions.detekt)
34+
val detekt = GradlePlugin(id = "io.gitlab.arturbosch.detekt", version = detektVersion)
35+
val iosFramework = GradlePlugin(id = "dev.icerock.mobile.multiplatform.ios-framework")
1836
}
1937

2038
object Libs {
2139
object Android {
22-
val kotlinStdLib = AndroidLibrary(
23-
name = "org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlin}"
24-
)
25-
val appCompat = AndroidLibrary(
26-
name = "androidx.appcompat:appcompat:${Versions.Libs.Android.appCompat}"
27-
)
28-
val socketIo = AndroidLibrary(
29-
name = "io.socket:socket.io-client:${Versions.Libs.Android.socketIo}"
30-
)
40+
const val appCompat = "androidx.appcompat:appcompat:$androidAppCompatVersion"
41+
42+
const val socketIo = "io.socket:socket.io-client:$androidSocketIoVersion"
3143
}
3244

3345
object MultiPlatform {
34-
val kotlinStdLib = MultiPlatformLibrary(
35-
android = Android.kotlinStdLib.name,
36-
common = "org.jetbrains.kotlin:kotlin-stdlib-common:${Versions.kotlin}"
37-
)
38-
val serialization = MultiPlatformLibrary(
39-
android = "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Versions.Libs.MultiPlatform.serialization}",
40-
common = "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:${Versions.Libs.MultiPlatform.serialization}",
41-
ios = "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:${Versions.Libs.MultiPlatform.serialization}"
42-
)
43-
val mokoSocketIo = MultiPlatformLibrary(
44-
common = "dev.icerock.moko:socket-io:${Versions.Libs.MultiPlatform.mokoSocketIo}",
45-
iosX64 = "dev.icerock.moko:socket-io-iosx64:${Versions.Libs.MultiPlatform.mokoSocketIo}",
46-
iosArm64 = "dev.icerock.moko:socket-io-iosarm64:${Versions.Libs.MultiPlatform.mokoSocketIo}"
47-
)
46+
47+
const val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinxSerializationVersion"
48+
const val mokoSocketIo = "dev.icerock.moko:socket-io:$mokoSocketIoVersion"
4849
}
4950

5051
object Jvm {
51-
const val detektFormatting = "io.gitlab.arturbosch.detekt:detekt-formatting:${Versions.detekt}"
52+
const val detektFormatting =
53+
"io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion"
5254
}
5355
}
5456
}

buildSrc/src/main/kotlin/PluginDesc.kt

Lines changed: 0 additions & 31 deletions
This file was deleted.

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 0 additions & 32 deletions
This file was deleted.

gradle.properties

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ org.gradle.configureondemand=false
33
org.gradle.parallel=true
44

55
kotlin.code.style=official
6+
kotlin.native.enableDependencyPropagation=false
7+
kotlin.mpp.enableGranularSourceSetsMetadata=true
8+
kotlin.mpp.enableCompatibilityMetadataVariant=true
69

710
android.useAndroidX=true
8-
android.enableJetifier=true
911

10-
kotlin.native.enableParallelExecutionCheck=false
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.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)