Skip to content

Commit 3995371

Browse files
Merge pull request #39 from amanshuraikwar/update-kotlin-1_6
Update kotlin 1 6
2 parents 5057d01 + 78fdcc5 commit 3995371

21 files changed

Lines changed: 83 additions & 107 deletions

File tree

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
buildscript {
2+
val kotlinVersion: String by project
3+
24
repositories {
35
gradlePluginPortal()
46
google()
57
mavenCentral()
68
}
79
dependencies {
8-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31")
10+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
911
classpath("com.android.tools.build:gradle:7.2.0-alpha06")
10-
classpath("org.jetbrains.kotlin:kotlin-serialization:1.5.31")
12+
classpath("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
1113
}
1214
}
1315

@@ -18,6 +20,8 @@ allprojects {
1820
}
1921
}
2022

21-
//tasks.register("clean", Delete::class) {
22-
// delete(rootProject.buildDir)
23-
//}
23+
// On Apple Silicon we need Node.js 16.0.0
24+
// https://youtrack.jetbrains.com/issue/KT-49109
25+
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin::class) {
26+
rootProject.the(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension::class).nodeVersion = "16.0.0"
27+
}

project-files/Portfolio/buildSrc/src/main/java/io/github/amanshuraikwar/nxtbuz/buildSrc/dependencies.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
package io.github.amanshuraikwar.nxtbuz.buildSrc
44

55
object Libs {
6-
const val androidGradlePlugin = "com.android.tools.build:gradle:7.0.0-beta04"
76
const val threeTenAbp = "com.jakewharton.threetenabp:threetenabp:1.2.4"
87

98
const val multiplatformSettings = "com.russhwolf:multiplatform-settings:0.8.1"
@@ -13,7 +12,9 @@ object Libs {
1312
const val coilCompose = "io.coil-kt:coil-compose:1.3.1"
1413

1514
object Ktor {
16-
private const val version = "1.6.1"
15+
private const val version = "2.0.0-beta-1"
16+
const val json = "io.ktor:ktor-serialization-kotlinx-json:$version"
17+
const val contentNegotiation = "io.ktor:ktor-client-content-negotiation:$version"
1718
const val clientCore = "io.ktor:ktor-client-core:$version"
1819
const val clientJson = "io.ktor:ktor-client-json:$version"
1920
const val clientLogging = "io.ktor:ktor-client-logging:$version"
@@ -27,8 +28,9 @@ object Libs {
2728
}
2829

2930
object Kotlinx {
30-
const val serializationCore = "org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.1"
31-
const val serializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.1"
31+
private const val version = "1.3.2"
32+
const val serializationCore = "org.jetbrains.kotlinx:kotlinx-serialization-core:$version"
33+
const val serializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:$version"
3234
}
3335

3436
object Google {
@@ -46,15 +48,15 @@ object Libs {
4648
}
4749

4850
object Kotlin {
49-
private const val version = "1.5.31"
51+
private const val version = "1.6.10"
5052
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
51-
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
5253
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
5354
}
5455

5556
object Coroutines {
56-
private const val version = "1.5.2-native-mt"
57+
private const val version = "1.6.0-native-mt"
5758
const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
59+
const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$version"
5860
const val android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version"
5961
}
6062

project-files/Portfolio/buildWebsite.kts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,18 @@ File(".") exec "mkdir build/tests/shared/android-jvm"
6565
println("Copying contents from shared/build/reports/tests/testDebugUnitTest/ to build/tests/shared/android-jvm/...")
6666
File(".") exec "cp -R shared/build/reports/tests/testDebugUnitTest/ build/tests/shared/android-jvm/"
6767

68-
println("Running tests in :shared for Js Browser...")
69-
File(".") exec "./gradlew :shared:cleanJsBrowserTest :shared:jsBrowserTest --stacktrace"
70-
println("Creating directory build/tests/shared/js-browser...")
71-
File(".") exec "mkdir build/tests/shared/js-browser"
72-
println("Copying contents from shared/build/reports/tests/jsBrowserTest/ to build/tests/shared/js-browser/...")
73-
File(".") exec "cp -R shared/build/reports/tests/jsBrowserTest/ build/tests/shared/js-browser/"
68+
try {
69+
println("Running tests in :shared for Js Browser...")
70+
File(".") exec "./gradlew :shared:cleanJsBrowserTest :shared:jsBrowserTest --stacktrace"
71+
println("Creating directory build/tests/shared/js-browser...")
72+
File(".") exec "mkdir build/tests/shared/js-browser"
73+
println("Copying contents from shared/build/reports/tests/jsBrowserTest/ to build/tests/shared/js-browser/...")
74+
File(".") exec "cp -R shared/build/reports/tests/jsBrowserTest/ build/tests/shared/js-browser/"
75+
} catch (e: Exception) {
76+
// do nothing
77+
println("Something went wrong while running tests in :shared for Js Browser.")
78+
println(e)
79+
}
7480

7581
println("Deleting build/js...")
7682
File(".") exec "rm -rf build/js"
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
#Gradle
2-
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
2+
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" -XX:+UseParallelGC
33

44
#Kotlin
55
kotlin.code.style=official
66

77
#Android
8-
android.useAndroidX=true
8+
android.useAndroidX=true
9+
10+
# Kotlin/Native clients can override this through updating common.podspec
11+
kotlinVersion=1.6.10
12+
13+
kotlin.mpp.enableGranularSourceSetsMetadata=true
14+
kotlin.mpp.stability.nowarn=true
15+
16+
kotlin.native.binary.memoryModel=experimental
17+
kotlin.native.binary.freezing=disabled

project-files/Portfolio/iosApp/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
99
:path: "../shared"
1010

1111
SPEC CHECKSUMS:
12-
shared: 7e5bb3963fe6bd4de6f2c4da301b5f6251f84201
12+
shared: 7b4d6aa8aa7ada5f9dae3229e2524d316cb9f063
1313

1414
PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756
1515

project-files/Portfolio/iosApp/Pods/Local Podspecs/shared.podspec.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project-files/Portfolio/iosApp/Pods/Manifest.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project-files/Portfolio/iosApp/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project-files/Portfolio/shared/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ kotlin {
4444
implementation(clientJson)
4545
implementation(clientLogging)
4646
implementation(clientSerialization)
47+
implementation(contentNegotiation)
48+
implementation(json)
4749
}
4850

4951
with(Libs.Kotlinx) {
@@ -59,6 +61,7 @@ kotlin {
5961
implementation(kotlin("test"))
6062
implementation(Libs.Ktor.clientMock)
6163
implementation(Libs.multiplatformSettingsTest)
64+
implementation(Libs.Coroutines.test)
6265
}
6366
}
6467
val androidMain by getting {

project-files/Portfolio/shared/shared.podspec

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ Pod::Spec.new do |spec|
3535
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
3636
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
3737
-Pkotlin.native.cocoapods.archs="$ARCHS" \
38-
-Pkotlin.native.cocoapods.configuration=$CONFIGURATION \
39-
-Pkotlin.native.cocoapods.cflags="$OTHER_CFLAGS" \
40-
-Pkotlin.native.cocoapods.paths.headers="$HEADER_SEARCH_PATHS" \
41-
-Pkotlin.native.cocoapods.paths.frameworks="$FRAMEWORK_SEARCH_PATHS"
38+
-Pkotlin.native.cocoapods.configuration=$CONFIGURATION
4239
SCRIPT
4340
}
4441
]

0 commit comments

Comments
 (0)