Skip to content

Commit e3ae1a0

Browse files
Update Samples dependencies (#199)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alexander Sysoev <[email protected]>
1 parent 8e05796 commit e3ae1a0

33 files changed

+298
-220
lines changed

samples/ktor-all-platforms-app/composeApp/build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*/
44

55
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
6+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
7+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
68

79
plugins {
810
alias(libs.plugins.kotlinMultiplatform)
@@ -14,10 +16,9 @@ plugins {
1416

1517
kotlin {
1618
androidTarget {
17-
compilations.all {
18-
kotlinOptions {
19-
jvmTarget = "1.8"
20-
}
19+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
20+
compilerOptions {
21+
jvmTarget = JvmTarget.JVM_1_8
2122
}
2223
}
2324

@@ -33,7 +34,7 @@ kotlin {
3334
isStatic = true
3435
}
3536
}
36-
37+
3738
sourceSets {
3839
val desktopMain by getting
3940

samples/ktor-all-platforms-app/gradle/libs.versions.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
[versions]
22
kotlin = "2.0.10"
33

4-
agp = "8.2.0"
4+
agp = "8.6.1"
55
android-compileSdk = "34"
66
android-minSdk = "24"
77
android-targetSdk = "34"
8-
androidx-activityCompose = "1.8.2"
9-
androidx-appcompat = "1.6.1"
8+
androidx-activityCompose = "1.9.2"
9+
androidx-appcompat = "1.7.0"
1010
androidx-constraintlayout = "2.1.4"
11-
androidx-core-ktx = "1.12.0"
12-
androidx-espresso-core = "3.5.1"
13-
androidx-material = "1.11.0"
14-
androidx-test-junit = "1.1.5"
15-
compose = "1.6.8"
11+
androidx-core-ktx = "1.13.1"
12+
androidx-espresso-core = "3.6.1"
13+
androidx-material = "1.12.0"
14+
androidx-test-junit = "1.2.1"
15+
compose = "1.7.2"
1616
compose-plugin = "1.6.11"
1717
junit = "4.13.2"
18-
ktor = "2.3.11"
19-
logback = "1.5.6"
20-
kotlinx-serialization-json = "1.6.3"
21-
kotlinx-coroutines-core = "1.8.1"
18+
ktor = "2.3.12"
19+
logback = "1.5.8"
20+
kotlinx-serialization-json = "1.7.1"
21+
kotlinx-coroutines-core = "1.9.0"
2222
kotlinx-rpc = "0.2.4"
2323

2424
[libraries]
Binary file not shown.

samples/ktor-all-platforms-app/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
#
2-
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3-
#
4-
51
distributionBase=GRADLE_USER_HOME
62
distributionPath=wrapper/dists
7-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
84
networkTimeout=10000
95
validateDistributionUrl=true
106
zipStoreBase=GRADLE_USER_HOME

samples/ktor-all-platforms-app/gradlew

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
#!/bin/sh
22

33
#
4-
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
4+
# Copyright © 2015-2021 the original authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
# SPDX-License-Identifier: Apache-2.0
519
#
620

721
##############################################################################
@@ -43,7 +57,7 @@
4357
# Darwin, MinGW, and NonStop.
4458
#
4559
# (3) This script is generated from the Groovy template
46-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
4761
# within the Gradle project.
4862
#
4963
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -71,7 +85,9 @@ done
7185
# This is normally unused
7286
# shellcheck disable=SC2034
7387
APP_BASE_NAME=${0##*/}
74-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
88+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
7591

7692
# Use the maximum available, or set MAX_FD != -1 to use that value.
7793
MAX_FD=maximum
@@ -132,15 +148,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
132148
case $MAX_FD in #(
133149
max*)
134150
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
135-
# shellcheck disable=SC3045
151+
# shellcheck disable=SC2039,SC3045
136152
MAX_FD=$( ulimit -H -n ) ||
137153
warn "Could not query maximum file descriptor limit"
138154
esac
139155
case $MAX_FD in #(
140156
'' | soft) :;; #(
141157
*)
142158
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
143-
# shellcheck disable=SC3045
159+
# shellcheck disable=SC2039,SC3045
144160
ulimit -n "$MAX_FD" ||
145161
warn "Could not set maximum file descriptor limit to $MAX_FD"
146162
esac
@@ -189,11 +205,11 @@ fi
189205
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
190206
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
191207

192-
# Collect all arguments for the java command;
193-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
194-
# shell script including quotes and variable substitutions, so put them in
195-
# double quotes to make sure that they get re-expanded; and
196-
# * put everything else in single quotes, so that it's not re-expanded.
208+
# Collect all arguments for the java command:
209+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210+
# and any embedded shellness will be escaped.
211+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212+
# treated as '${Hostname}' itself on the command line.
197213

198214
set -- \
199215
"-Dorg.gradle.appname=$APP_BASE_NAME" \

samples/ktor-all-platforms-app/gradlew.bat

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5759

5860
if exist "%JAVA_EXE%" goto execute
5961

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

samples/ktor-all-platforms-app/settings.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5+
@file:Suppress("UnstableApiUsage")
6+
57
rootProject.name = "ktor-all-platforms-app"
68
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
79

@@ -24,4 +26,4 @@ dependencyResolutionManagement {
2426

2527
include(":composeApp")
2628
include(":server")
27-
include(":shared")
29+
include(":shared")

samples/ktor-all-platforms-app/shared/build.gradle.kts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
6+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
7+
58
plugins {
69
alias(libs.plugins.kotlinMultiplatform)
710
alias(libs.plugins.androidLibrary)
@@ -11,13 +14,12 @@ plugins {
1114

1215
kotlin {
1316
androidTarget {
14-
compilations.all {
15-
kotlinOptions {
16-
jvmTarget = "1.8"
17-
}
17+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
18+
compilerOptions {
19+
jvmTarget = JvmTarget.JVM_1_8
1820
}
1921
}
20-
22+
2123
iosX64()
2224
iosArm64()
2325
iosSimulatorArm64()

samples/ktor-android-app/app/build.gradle.kts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ android {
1414
namespace = "kotlinx.rpc.sample"
1515
compileSdk = 34
1616

17-
packagingOptions {
17+
packaging {
1818
resources {
19-
exclude("META-INF/INDEX.LIST")
20-
exclude("META-INF/io.netty.versions.properties")
19+
excludes.add("META-INF/INDEX.LIST")
20+
excludes.add("META-INF/io.netty.versions.properties")
2121
}
2222
}
2323

@@ -64,7 +64,7 @@ android {
6464
}
6565

6666
dependencies {
67-
implementation(project(":common"))
67+
implementation(projects.common)
6868
testImplementation(libs.kotlinx.rpc.krpc.client)
6969
testImplementation(libs.kotlinx.rpc.krpc.server)
7070
implementation(libs.kotlinx.rpc.krpc.serialization.json)
@@ -85,7 +85,7 @@ dependencies {
8585

8686
implementation(libs.kotlinx.serialization.json)
8787

88-
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
88+
implementation(platform(libs.compose.bom))
8989
implementation(libs.compose.ui)
9090
implementation(libs.compose.ui.graphics)
9191
implementation(libs.compose.ui.tooling.preview)
@@ -98,8 +98,8 @@ dependencies {
9898

9999
implementation(libs.androidx.test.junit)
100100
testImplementation(libs.junit)
101-
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
101+
androidTestImplementation(platform(libs.compose.bom))
102102
androidTestImplementation(libs.compose.ui.test.junit4)
103103
debugImplementation(libs.compose.ui.tooling)
104104
debugImplementation(libs.compose.ui.test.manifest)
105-
}
105+
}

samples/ktor-android-app/gradle/libs.versions.toml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
[versions]
2-
agp = "8.1.3"
2+
agp = "8.6.1"
33
kotlin = "2.0.10"
4-
androidx-activityCompose = "1.8.2"
5-
androidx-appcompat = "1.6.1"
4+
androidx-activityCompose = "1.9.2"
5+
androidx-appcompat = "1.7.0"
66
androidx-constraintlayout = "2.1.4"
7-
androidx-core-ktx = "1.12.0"
8-
androidx-test-junit = "1.1.5"
9-
compose = "1.6.8"
7+
androidx-core-ktx = "1.13.1"
8+
androidx-test-junit = "1.2.1"
9+
compose = "1.7.2"
1010
compose-plugin = "1.5.14" # https://mvnrepository.com/artifact/androidx.compose.compiler/compiler
11-
material3 = "1.2.0"
11+
compose-bom = "2024.09.02"
12+
material3 = "1.3.0"
1213
junit = "4.13.2"
13-
ktor = "2.3.11"
14-
kotlinx-serialization-json = "1.6.1"
15-
kotlinx-coroutines-core = "1.8.1"
16-
logback = "1.5.6"
14+
ktor = "2.3.12"
15+
kotlinx-serialization-json = "1.7.3"
16+
kotlinx-coroutines-core = "1.9.0"
17+
logback = "1.5.8"
1718
kotlinx-rpc = "0.2.4"
1819

1920
[libraries]
@@ -33,6 +34,7 @@ androidx-constraintlayout = { group = "androidx.constraintlayout", name = "const
3334
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
3435

3536
# compose
37+
compose-bom = { module = "androidx.compose:compose-bom", version.ref = "compose-bom" }
3638
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
3739
compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics", version.ref = "compose" }
3840
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
@@ -79,4 +81,4 @@ kotlinPluginSerialization = { id = "org.jetbrains.kotlin.plugin.serialization",
7981
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
8082
kotlinx-rpc = { id = "org.jetbrains.kotlinx.rpc.plugin", version.ref = "kotlinx-rpc" }
8183
kotlinx-rpc-platform = { id = "org.jetbrains.kotlinx.rpc.platform", version.ref = "kotlinx-rpc" }
82-
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }
84+
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }

0 commit comments

Comments
 (0)