Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#43): rsocket transport #44

Merged
merged 13 commits into from
Dec 19, 2023
Merged
2 changes: 1 addition & 1 deletion .github/workflows/publish-release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Build and Publish
env:
TIMEMATES_SDK_VERSION: ${{ github.ref }}
TIMEMATES_SDK_VERSION: ${{ github.ref_name }}
TIMEMATES_SSH_DEPLOY_PATH: ${{ secrets.TIMEMATES_SSH_DEPLOY_PATH }}
TIMEMATES_SSH_HOST: ${{ secrets.TIMEMATES_SSH_HOST }}
TIMEMATES_SSH_PASSWORD: ${{ secrets.TIMEMATES_SSH_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
distribution: 'corretto'
java-version: '17'
cache: 'gradle'
- run: ./gradlew test --no-daemon
- run: ./gradlew build --no-daemon
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ platform and integrate its features into your own applications.
To demonstrate the usage of the SDK, consider the following example:

```kotlin
val engineBuilder = DefaultGrpcEngineBuilder()
val engine = GrpcTimeMatesRequestsEngine(engineBuilder)
val engine = RSocketTimeMatesRequestsEngine(
coroutineScope = Dispatchers.IO,
)
val emailAuth = AccountLoginApi(engineBuilder).email
val email = EmailAddress.create("[email protected]").getOrElse { return }

Expand All @@ -24,12 +25,6 @@ val authorizationResult = emailAuth.authorize(email)
// until we complete our registration
.map { (isNewAccount, authorization) -> ... }
```
> **Note** <br>
> For android use [AndroidGrpcEngineBuilder](/grpc-engine/android/src/main/kotlin/io/timemates/android/grpc/AndroidGrpcEngineBuilder.kt)
>```kotlin
> val engineBuilder = AndroidGrpcEngineBuilder(applicationContext)
>```

In the provided code snippet, the SDK utilizes the Kotlin Result API extensively.

It's important to note that the SDK's value objects, such as `EmailAddress`
Expand Down Expand Up @@ -77,9 +72,7 @@ repositories {

dependencies {
implementation("io.timemates:sdk:$version")
implementation("io.timemates:grpc-engine:$version")
// for android
implementation("io.timemates:grpc-engine-android:$version")
implementation("io.timemates:rsocket-engine:$version")
}
```

Expand Down
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
kotlin = "1.8.21"
kotlin = "1.9.20-Beta"
kotlinx-coroutines = "1.6.4"
kotlinx-serialization = "1.4.1"
ktor = "2.0.1"
kafka = "3.3.1"
jupiter = "5.4.0"
exposed = "0.41.1"
kmongo = "4.8.0"
androidGradlePlugin = "8.2.0-alpha13"
androidGradlePlugin = "8.3.0-alpha05"
androidComposeVersion = "1.4.0-alpha02"
grpc = "1.3.0"
protobuf = "3.22.0"
Expand Down Expand Up @@ -66,6 +66,8 @@ grpc-android = { module = "io.grpc:grpc-android", version.require = "1.56.1" }
protobuf-kotlin = { module = "com.google.protobuf:protobuf-kotlin", version.ref = "protobuf" }
protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" }

rsocket-client = { module = "io.rsocket.kotlin:rsocket-ktor-client", version.require = "0.15.4" }

[plugins]
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
Expand Down
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-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-rc-2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
48 changes: 0 additions & 48 deletions grpc-engine/android/build.gradle.kts

This file was deleted.

This file was deleted.

72 changes: 0 additions & 72 deletions grpc-engine/build.gradle.kts

This file was deleted.

Loading