Skip to content

Commit 48e235a

Browse files
committed
review fixes
1 parent 82198d3 commit 48e235a

File tree

27 files changed

+120
-138
lines changed

27 files changed

+120
-138
lines changed

.github/workflows/compilation-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: macOS-11
11+
runs-on: macOS-latest
1212

1313
steps:
1414
- uses: actions/checkout@v1
15-
- name: Set up JDK 11
15+
- name: Set up JDK 17
1616
uses: actions/setup-java@v1
1717
with:
18-
java-version: 11
18+
java-version: 17
1919
- name: Check plugin
2020
run: ./gradlew -p network-generator build publishToMavenLocal
2121
- name: Check runtime

.github/workflows/publish.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
publish:
1313
name: Publish library at mavenCentral
14-
runs-on: macOS-11
14+
runs-on: macOS-latest
1515
env:
1616
OSSRH_USER: ${{ secrets.OSSRH_USER }}
1717
OSSRH_KEY: ${{ secrets.OSSRH_KEY }}
@@ -21,14 +21,21 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v1
24-
- name: Set up JDK 11
24+
- name: Set up JDK 17
2525
uses: actions/setup-java@v1
2626
with:
27-
java-version: 11
28-
- name: Publish plugin
29-
run: ./gradlew -p network-generator publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PLUGIN_PORTAL_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PLUGIN_PORTAL_SECRET }}
27+
java-version: 17
28+
- name: Prebuild plugin
29+
run: ./gradlew -p network-generator publishToMavenLocal
30+
- name: Prebuild library
31+
run: ./gradlew publishToMavenLocal
3032
- name: Publish library
31-
run: ./gradlew publish
33+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
34+
- name: Publish plugin to maven central
35+
run: ./gradlew -p network-generator publishToSonatype closeAndReleaseSonatypeStagingRepository
36+
- name: Publish plugin to Gradle Plugin Portal
37+
run: ./gradlew -p network-generator publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PLUGIN_PORTAL_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PLUGIN_PORTAL_SECRET }}
38+
3239
release:
3340
name: Create release
3441
needs: publish

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.classpath
55
.vscode
66
.idea
7+
.kotlin
78
build
89
*.iml
910
Pods

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ buildscript {
3636
}
3737
3838
dependencies {
39-
classpath "dev.icerock.moko:network-generator:0.21.2"
39+
classpath "dev.icerock.moko:network-generator:0.22.0"
4040
}
4141
}
4242
@@ -53,10 +53,10 @@ project build.gradle
5353
apply plugin: "dev.icerock.mobile.multiplatform-network-generator"
5454
5555
dependencies {
56-
commonMainApi("dev.icerock.moko:network:0.21.2")
57-
commonMainApi("dev.icerock.moko:network-engine:0.21.2") // configured HttpClientEngine
58-
commonMainApi("dev.icerock.moko:network-bignum:0.21.2") // kbignum serializer
59-
commonMainApi("dev.icerock.moko:network-errors:0.21.2") // moko-errors integration
56+
commonMainApi("dev.icerock.moko:network:0.22.0")
57+
commonMainApi("dev.icerock.moko:network-engine:0.22.0") // configured HttpClientEngine
58+
commonMainApi("dev.icerock.moko:network-bignum:0.22.0") // kbignum serializer
59+
commonMainApi("dev.icerock.moko:network-errors:0.22.0") // moko-errors integration
6060
}
6161
```
6262

build.gradle.kts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
22
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
33
*/
4-
import org.gradle.api.internal.artifacts.DefaultModuleVersionSelector
54

65
buildscript {
76
repositories {
@@ -25,17 +24,6 @@ val mokoVersion = libs.versions.mokoNetworkVersion.get()
2524
allprojects {
2625
this.group = "dev.icerock.moko"
2726
this.version = mokoVersion
28-
29-
configurations.configureEach {
30-
resolutionStrategy {
31-
val coroutines: MinimalExternalModuleDependency = rootProject.libs.coroutines.get()
32-
val forcedCoroutines: ModuleVersionSelector = DefaultModuleVersionSelector.newSelector(
33-
coroutines.module,
34-
coroutines.versionConstraint.requiredVersion
35-
)
36-
force(forcedCoroutines)
37-
}
38-
}
3927
}
4028

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

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ mobile.multiplatform.iosTargetWarning=false
1414

1515
xcodeproj=./sample/ios-app
1616

17-
moko.android.targetSdk=35
18-
moko.android.compileSdk=35
17+
moko.android.targetSdk=34
18+
moko.android.compileSdk=34
1919
moko.android.minSdk=16
2020

2121
moko.publish.name=MOKO network

gradle/libs.versions.toml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mokoResourcesVersion = "0.24.4"
2020
mokoMvvmVersion = "0.16.0"
2121
mokoErrorsVersion = "0.7.0"
2222
mokoTestVersion = "0.6.1"
23-
mokoNetworkVersion = "0.21.2"
23+
mokoNetworkVersion = "0.22.0"
2424

2525
# tests
2626
espressoCoreVersion = "3.5.1"
@@ -30,15 +30,15 @@ androidxTestVersion = "1.5.0"
3030
robolectricVersion = "4.9"
3131

3232
# other
33-
ktorClientVersion = "3.0.0"
33+
ktorVersion = "3.0.0"
3434
kbignumVersion = "2.4.12"
3535
multidexVersion = "2.0.1"
3636

3737
[libraries]
3838
# android
3939
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" }
4040
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glideVersion" }
41-
lifecycleViewModel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewModelVersion" }
41+
lifecycleViewModel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewModelVersion" }
4242
multidex = { module = "androidx.multidex:multidex", version.ref = "multidexVersion" }
4343
coreKtx = { module = "androidx.core:core-ktx", version.ref = "coreKtxVersion" }
4444

@@ -47,22 +47,26 @@ kotlinSerialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-js
4747
coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutinesVersion" }
4848

4949
# ktor
50-
ktorClientOkHttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktorClientVersion" }
51-
ktorClient = { module = "io.ktor:ktor-client-core", version.ref = "ktorClientVersion" }
52-
ktorClientLogging = { module = "io.ktor:ktor-client-logging", version.ref = "ktorClientVersion" }
53-
ktorClientWebSocket = { module = "io.ktor:ktor-client-websockets", version.ref = "ktorClientVersion" }
54-
ktorClientMock = { module = "io.ktor:ktor-client-mock", version.ref = "ktorClientVersion" }
55-
ktorClientIos = { module = "io.ktor:ktor-client-ios", version.ref = "ktorClientVersion" }
50+
ktorClientOkHttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktorVersion" }
51+
ktorClient = { module = "io.ktor:ktor-client-core", version.ref = "ktorVersion" }
52+
ktorClientLogging = { module = "io.ktor:ktor-client-logging", version.ref = "ktorVersion" }
53+
ktorClientWebSocket = { module = "io.ktor:ktor-client-websockets", version.ref = "ktorVersion" }
54+
ktorClientMock = { module = "io.ktor:ktor-client-mock", version.ref = "ktorVersion" }
55+
ktorClientIos = { module = "io.ktor:ktor-client-ios", version.ref = "ktorVersion" }
56+
57+
ktorServerNetty = { module = "io.ktor:ktor-server-netty", version.ref = "ktorVersion" }
58+
ktorServerCore = { module = "io.ktor:ktor-server-core", version.ref = "ktorVersion" }
59+
ktorServerWebSockets = { module = "io.ktor:ktor-server-websockets", version.ref = "ktorVersion" }
5660

5761
# korlibs
58-
kbignum = { module = "com.soywiz.korlibs.kbignum:kbignum", version.ref = "kbignumVersion" }
62+
kbignum = { module = "com.soywiz.korlibs.kbignum:kbignum", version.ref = "kbignumVersion" }
5963

6064
# moko
61-
mokoMvvmDataBinding = { module = "dev.icerock.moko:mvvm-databinding", version.ref = "mokoMvvmVersion" }
65+
mokoMvvmDataBinding = { module = "dev.icerock.moko:mvvm-databinding", version.ref = "mokoMvvmVersion" }
6266
mokoResources = { module = "dev.icerock.moko:resources", version.ref = "mokoResourcesVersion" }
6367
mokoMvvmCore = { module = "dev.icerock.moko:mvvm-core", version.ref = "mokoMvvmVersion" }
6468
mokoMvvmLiveData = { module = "dev.icerock.moko:mvvm-livedata", version.ref = "mokoMvvmVersion" }
65-
mokoErrors = { module = "dev.icerock.moko:errors", version.ref = "mokoErrorsVersion" }
69+
mokoErrors = { module = "dev.icerock.moko:errors", version.ref = "mokoErrorsVersion" }
6670

6771
# tests
6872
espressoCore = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCoreVersion" }
@@ -72,16 +76,17 @@ robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectr
7276
testRunner = { module = "androidx.test:runner", version.ref = "testRunnerVersion" }
7377
testRules = { module = "androidx.test:rules", version.ref = "testRunnerVersion" }
7478
testExtJunit = { module = "androidx.test.ext:junit", version.ref = "testExtJunitVersion" }
75-
kotlinTestAnnotations = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlinVersion" }
76-
mokoTest = { module = "dev.icerock.moko:test-core", version.ref = "mokoTestVersion" }
79+
kotlinTest = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlinVersion" }
80+
mokoTest = { module = "dev.icerock.moko:test-core", version.ref = "mokoTestVersion" }
7781

7882
# jvm
7983
openApiGenerator = { module = "org.openapitools:openapi-generator-gradle-plugin", version.ref = "openApiGeneratorVersion" }
8084
guava = { module = "com.google.guava:guava", version.ref = "guavaVersion" }
85+
logback = { module = "ch.qos.logback:logback-classic", version = "1.5.21" }
8186

8287
# gradle plugins
8388
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinVersion" }
8489
kotlinSerializationGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlinVersion" }
85-
androidGradlePlugin = { module = "com.android.tools.build:gradle", version = "8.7.3" }
90+
androidGradlePlugin = { module = "com.android.tools.build:gradle", version = "8.5.2" }
8691
mokoResourcesGradlePlugin = { module = "dev.icerock.moko:resources-generator", version.ref = "mokoResourcesVersion" }
87-
mokoGradlePlugin = { module = "dev.icerock.moko:moko-gradle-plugin", version = "0.5.1" }
92+
mokoGradlePlugin = { module = "dev.icerock.moko:moko-gradle-plugin", version = "0.6.0" }

network-bignum/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ android {
1414
}
1515

1616
kotlin {
17-
jvmToolchain(17)
18-
1917
jvm()
2018
}
2119

2220
dependencies {
2321
commonMainImplementation(libs.kotlinSerialization)
2422
commonMainApi(libs.kbignum)
2523

26-
commonMainImplementation(project(":network"))
24+
commonMainImplementation(projects.network)
2725
}

network-engine/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ android {
1515
}
1616

1717
kotlin {
18-
jvmToolchain(17)
19-
2018
jvm()
2119

2220
sourceSets {
@@ -41,6 +39,6 @@ kotlin {
4139

4240
dependencies {
4341
commonMainImplementation(libs.coroutines)
44-
commonMainApi(project(":network"))
42+
commonMainApi(projects.network)
4543
iosMainApi(libs.ktorClientIos)
4644
}

network-errors/build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ android {
1414
namespace = "dev.icerock.moko.network.errors"
1515
}
1616

17-
kotlin {
18-
jvmToolchain(17)
19-
}
20-
2117
dependencies {
2218
commonMainImplementation(libs.kotlinSerialization)
2319

2420
commonMainApi(libs.mokoErrors)
2521
commonMainApi(libs.mokoResources)
2622

27-
commonMainImplementation(project(":network"))
23+
commonMainImplementation(projects.network)
24+
25+
// temporary workaround for
26+
// e: KLIB resolver: Could not find "dev.icerock.moko:parcelize
27+
// caused moko-errors
28+
iosMainApi("dev.icerock.moko:parcelize:0.9.0")
2829
}
2930

3031
multiplatformResources {

0 commit comments

Comments
 (0)