Skip to content

Commit

Permalink
Merge pull request #16 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.3.0
  • Loading branch information
Alex009 authored Jun 26, 2021
2 parents ef9e539 + b4f7af4 commit 72c4205
Show file tree
Hide file tree
Showing 21 changed files with 140 additions and 192 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ jobs:
- name: Cocoapods install
run: (cd sample/ios-app && pod install)
- name: Check library
run: ./gradlew build publishToMavenLocal
run: ./gradlew build publishToMavenLocal
- name: Install pods
run: cd sample/ios-app && pod install
- name: build ios sample
run: cd sample/ios-app && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug -sdk iphonesimulator -arch x86_64 build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
with:
commitish: ${{ github.ref }}
tag_name: release/${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: "Will be filled later"
draft: true
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![moko-socket-io](https://user-images.githubusercontent.com/5010169/80988267-712b7e80-8e5d-11ea-955e-c788a567c64e.png)
[![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)
[![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://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=socket-io)

# Mobile Kotlin socket io
This is a Kotlin MultiPlatform library that provides real-time, event-based communication for iOS and Android.
Expand All @@ -19,19 +19,9 @@ This is a Kotlin MultiPlatform library that provides real-time, event-based comm
- **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);

## Requirements
- Gradle version 6.0+
- Gradle version 6.8+
- Android API 16+
- iOS version 9.0+

## Versions
### Bintray
- kotlin 1.3.72
- 0.1.0
- kotlin 1.4.10
- 0.2.0
### mavenCentral
- kotlin 1.4.31
- 0.2.1
- iOS version 11.0+

## Installation
root build.gradle
Expand All @@ -46,8 +36,8 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:socket-io:0.2.1")
commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC")
commonMainApi("dev.icerock.moko:socket-io:0.3.0")
commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.1")
}
cocoaPods {
Expand All @@ -59,7 +49,7 @@ cocoaPods {

Podfile
```ruby
pod 'mokoSocketIo', :git => 'https://github.com/icerockdev/moko-socket-io.git', :tag => 'release/0.2.1'
pod 'mokoSocketIo', :git => 'https://github.com/icerockdev/moko-socket-io.git', :tag => 'release/0.3.0'
```

## Usage
Expand Down
36 changes: 17 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,42 @@
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
plugin(Deps.Plugins.detekt) apply false
}

allprojects {
buildscript {
repositories {
mavenCentral()
google()

jcenter {
content {
includeGroup("org.jetbrains.trove4j")
includeGroup("org.jetbrains.kotlinx")
}
}
gradlePluginPortal()
}
dependencies {
classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.15.0")
classpath("dev.icerock:mobile-multiplatform:0.12.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20")
classpath("com.android.tools.build:gradle:4.2.1")
}
}

apply(plugin = Deps.Plugins.detekt.id)
allprojects {
apply(plugin = "io.gitlab.arturbosch.detekt")

configure<io.gitlab.arturbosch.detekt.extensions.DetektExtension> {
input.setFrom("src/commonMain/kotlin", "src/androidMain/kotlin", "src/iosMain/kotlin")
input.setFrom("src/commonMain/kotlin", "src/androidMain/kotlin", "src/iosMain/kotlin", "src/commonJvm/kotlin")
}

dependencies {
"detektPlugins"(Deps.Libs.Jvm.detektFormatting)
"detektPlugins"(rootProject.libs.detektFormatting)
}

plugins.withId(Deps.Plugins.androidLibrary.id) {
plugins.withId("com.android.library") {
configure<com.android.build.gradle.LibraryExtension> {
compileSdkVersion(Deps.Android.compileSdk)
compileSdkVersion(libs.versions.compileSdk.get().toInt())

defaultConfig {
minSdkVersion(Deps.Android.minSdk)
targetSdkVersion(Deps.Android.targetSdk)
minSdkVersion(libs.versions.minSdk.get().toInt())
targetSdkVersion(libs.versions.targetSdk.get().toInt())
}
}
}

}

tasks.register("clean", Delete::class).configure {
Expand Down
20 changes: 0 additions & 20 deletions buildSrc/build.gradle.kts

This file was deleted.

57 changes: 0 additions & 57 deletions buildSrc/src/main/kotlin/Deps.kt

This file was deleted.

2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ kotlin.native.enableDependencyPropagation=false
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.enableCompatibilityMetadataVariant=true

mobile.multiplatform.podsProject=sample/ios-app/Pods/Pods.xcodeproj

android.useAndroidX=true
17 changes: 17 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[versions]
detektVersion = "1.15.0"
androidAppCompatVersion = "1.2.0"
androidSocketIoVersion = "1.0.0"
kotlinxSerializationVersion = "1.2.1"
mokoSocketIoVersion = "0.3.0"
compileSdk = "28"
targetSdk = "28"
minSdk = "16"

[libraries]
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" }
socketIo = { module = "io.socket:socket.io-client", version.ref = "androidSocketIoVersion" }
serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationVersion" }
mokoSocketIo = { module = "dev.icerock.moko:socket-io", version.ref = "mokoSocketIoVersion" }
detektFormatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detektVersion" }

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
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.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion mokoSocketIo.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'mokoSocketIo'
spec.version = '0.2.0'
spec.version = '0.3.0'
spec.homepage = 'https://github.com/icerockdev/moko-socket-io'
spec.source = { :git => "https://github.com/icerockdev/moko-socket-io.git", :tag => "release/#{spec.version}" }
spec.authors = 'IceRock Development'
Expand Down
14 changes: 7 additions & 7 deletions sample/android-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
*/

plugins {
plugin(Deps.Plugins.androidApplication)
plugin(Deps.Plugins.kotlinAndroid)
id("com.android.application")
id("kotlin-android")
}

android {
compileSdkVersion(Deps.Android.compileSdk)
compileSdkVersion(libs.versions.compileSdk.get().toInt())

dexOptions {
javaMaxHeapSize = "2g"
}

defaultConfig {
minSdkVersion(Deps.Android.minSdk)
targetSdkVersion(Deps.Android.targetSdk)
minSdkVersion(libs.versions.minSdk.get().toInt())
targetSdkVersion(libs.versions.targetSdk.get().toInt())

applicationId = "dev.icerock.moko.samples.socketio"

Expand Down Expand Up @@ -45,7 +45,7 @@ android {

dependencies {

implementation(Deps.Libs.Android.appCompat)
implementation(libs.appCompat)

implementation(project("${parent!!.path}:mpp-library"))
implementation(projects.sample.mppLibrary)
}
12 changes: 0 additions & 12 deletions sample/build.gradle.kts

This file was deleted.

6 changes: 3 additions & 3 deletions sample/ios-app/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- mokoSocketIo (0.2.0):
- mokoSocketIo (0.3.0):
- Socket.IO-Client-Swift (~> 15.2.0)
- MultiPlatformLibrary (0.2.0)
- Socket.IO-Client-Swift (15.2.0):
Expand All @@ -22,11 +22,11 @@ EXTERNAL SOURCES:
:path: "../mpp-library"

SPEC CHECKSUMS:
mokoSocketIo: c164157c29ff1fb64dac3b98c7e46f5af84f3568
mokoSocketIo: 6797ac07932163d18d3e3199b9510ee6dc332855
MultiPlatformLibrary: 4486066052a483da309067ef9dab1731ca41d66f
Socket.IO-Client-Swift: 1e3e3a1f09f3312a167f0d781eb2f383d477357c
Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0

PODFILE CHECKSUM: f881c83f3f3582ddcc6b0f6d9bb6323f43a7082a

COCOAPODS: 1.9.3
COCOAPODS: 1.10.0
6 changes: 4 additions & 2 deletions sample/ios-app/TestProj.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@
CURRENT_PROJECT_VERSION = 0;
DEFINES_MODULE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
SWIFT_VERSION = 4.0;
};
name = Debug;
Expand All @@ -262,6 +263,7 @@
CURRENT_PROJECT_VERSION = 0;
DEFINES_MODULE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
SWIFT_VERSION = 4.0;
};
name = Release;
Expand All @@ -275,7 +277,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = RF9T8S9829;
INFOPLIST_FILE = src/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "dev.icerock.moko.sample.resources-test";
PRODUCT_BUNDLE_IDENTIFIER = "dev.icerock.moko.sample.socket-io-test";
PRODUCT_NAME = mokoSampleResources;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
Expand All @@ -293,7 +295,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = RF9T8S9829;
INFOPLIST_FILE = src/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "dev.icerock.moko.sample.resources-test";
PRODUCT_BUNDLE_IDENTIFIER = "dev.icerock.moko.sample.socket-io-test";
PRODUCT_NAME = mokoSampleResources;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit 72c4205

Please sign in to comment.