Skip to content

Commit 021b778

Browse files
authored
Move to Kotlin 1.9.23, refactor Gradle file and source set directories (#110)
1 parent 6f97449 commit 021b778

60 files changed

Lines changed: 823 additions & 2270 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ignore-engines true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ commonMain {
8282
License
8383
=======
8484

85-
Copyright 2022 Touchlab, Inc.
85+
Copyright 2024 Touchlab, Inc.
8686

8787
Licensed under the Apache License, Version 2.0 (the "License");
8888
you may not use this file except in compliance with the License.

build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,4 @@ val VERSION_NAME: String by project
2626
allprojects {
2727
group = GROUP
2828
version = VERSION_NAME
29-
}
30-
31-
allprojects {
32-
repositories {
33-
mavenCentral()
34-
google()
35-
maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
36-
}
3729
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
dependencies {
6+
implementation(libs.kotlin.gradlePlugin)
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dependencyResolutionManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
}
5+
versionCatalogs {
6+
create("libs") {
7+
from(files("../gradle/libs.versions.toml"))
8+
}
9+
}
10+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
2+
3+
plugins {
4+
kotlin("multiplatform")
5+
}
6+
7+
kotlin {
8+
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
9+
compilerOptions {
10+
freeCompilerArgs.add("-Xexpect-actual-classes")
11+
}
12+
jvm()
13+
js {
14+
nodejs {
15+
testTask {
16+
useMocha {
17+
// Override default timeout (needed for stress tests)
18+
timeout = "120s"
19+
}
20+
}
21+
}
22+
browser()
23+
}
24+
@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class)
25+
wasmJs {
26+
browser()
27+
nodejs()
28+
}
29+
macosX64()
30+
iosArm64()
31+
iosX64()
32+
watchosArm32()
33+
watchosArm64()
34+
watchosX64()
35+
watchosDeviceArm64()
36+
tvosArm64()
37+
tvosX64()
38+
39+
macosArm64()
40+
iosSimulatorArm64()
41+
watchosSimulatorArm64()
42+
tvosSimulatorArm64()
43+
44+
mingwX64()
45+
linuxX64()
46+
linuxArm64()
47+
48+
androidNativeArm32()
49+
androidNativeArm64()
50+
androidNativeX86()
51+
androidNativeX64()
52+
53+
@Suppress("OPT_IN_USAGE")
54+
applyDefaultHierarchyTemplate {
55+
common {
56+
group("jsAndWasmJs") {
57+
withJs()
58+
withWasm()
59+
}
60+
}
61+
}
62+
}
63+
64+
rootProject.the<NodeJsRootExtension>().apply {
65+
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
66+
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
67+
}

deprecated/stately-collections/build.gradle

Lines changed: 6 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
apply plugin: 'org.jetbrains.kotlin.multiplatform'
17+
plugins {
18+
id 'org.jetbrains.kotlin.multiplatform'
19+
id 'kmp-setup'
20+
id 'com.vanniktech.maven.publish'
21+
}
1822

1923
group = GROUP
2024
version = VERSION_NAME
@@ -23,39 +27,6 @@ configurations {
2327
compileClasspath
2428
}
2529
kotlin {
26-
targetHierarchy.default {}
27-
jvm()
28-
js {
29-
nodejs()
30-
browser()
31-
}
32-
wasm {
33-
browser()
34-
binaries.executable()
35-
}
36-
macosX64()
37-
iosArm64()
38-
iosX64()
39-
watchosArm32()
40-
watchosArm64()
41-
watchosX64()
42-
watchosDeviceArm64()
43-
tvosArm64()
44-
tvosX64()
45-
mingwX64()
46-
linuxX64()
47-
linuxArm64()
48-
49-
macosArm64()
50-
iosSimulatorArm64()
51-
watchosSimulatorArm64()
52-
tvosSimulatorArm64()
53-
54-
androidNativeArm32()
55-
androidNativeArm64()
56-
androidNativeX86()
57-
androidNativeX64()
58-
5930
sourceSets {
6031
commonMain {
6132
dependencies {
@@ -70,104 +41,5 @@ kotlin {
7041
implementation libs.testHelp
7142
}
7243
}
73-
74-
create("jsWasmMain") {
75-
dependsOn commonMain
76-
}
77-
78-
create("jsWasmTest") {
79-
dependsOn commonTest
80-
}
81-
82-
jsMain {
83-
dependsOn jsWasmMain
84-
}
85-
jsTest {
86-
dependsOn jsWasmTest
87-
}
88-
89-
wasmMain {
90-
dependsOn jsWasmMain
91-
}
92-
wasmTest {
93-
dependsOn jsWasmTest
94-
}
95-
96-
nativeCommonMain {
97-
dependsOn commonMain
98-
}
99-
nativeCommonTest {
100-
dependsOn commonTest
101-
}
102-
103-
macosX64Main {
104-
dependsOn nativeCommonMain
105-
}
106-
iosArm64Main {
107-
dependsOn nativeCommonMain
108-
}
109-
iosX64Main {
110-
dependsOn nativeCommonMain
111-
}
112-
watchosArm32Main {
113-
dependsOn nativeCommonMain
114-
}
115-
watchosArm64Main {
116-
dependsOn nativeCommonMain
117-
}
118-
watchosX64Main {
119-
dependsOn nativeCommonMain
120-
}
121-
watchosDeviceArm64Main {
122-
dependsOn nativeCommonMain
123-
}
124-
tvosArm64Main {
125-
dependsOn nativeCommonMain
126-
}
127-
tvosX64Main {
128-
dependsOn nativeCommonMain
129-
}
130-
131-
macosArm64Main {
132-
dependsOn nativeCommonMain
133-
}
134-
iosSimulatorArm64Main {
135-
dependsOn nativeCommonMain
136-
}
137-
watchosSimulatorArm64Main {
138-
dependsOn nativeCommonMain
139-
}
140-
tvosSimulatorArm64Main {
141-
dependsOn nativeCommonMain
142-
}
143-
144-
mingwX64Main {
145-
dependsOn nativeCommonMain
146-
}
147-
148-
linuxX64Main {
149-
dependsOn nativeCommonMain
150-
}
151-
linuxArm64Main {
152-
dependsOn nativeCommonMain
153-
}
154-
155-
androidNativeArm32Main {
156-
dependsOn nativeCommonMain
157-
}
158-
159-
androidNativeArm64Main {
160-
dependsOn nativeCommonMain
161-
}
162-
163-
androidNativeX86Main {
164-
dependsOn nativeCommonMain
165-
}
166-
167-
androidNativeX64Main {
168-
dependsOn nativeCommonMain
169-
}
17044
}
171-
}
172-
173-
apply plugin:"com.vanniktech.maven.publish"
45+
}

deprecated/stately-collections/src/jsWasmMain/kotlin/co/touchlab/stately/collections/Functions.kt renamed to deprecated/stately-collections/src/jsAndWasmJsMain/kotlin/co/touchlab/stately/collections/Functions.kt

File renamed without changes.

deprecated/stately-collections/src/jsWasmTest/kotlin/co/touchlab/stately/collections/JsIgnore.kt renamed to deprecated/stately-collections/src/jsAndWasmJsTest/kotlin/co/touchlab/stately/collections/JsIgnore.kt

File renamed without changes.

deprecated/stately-collections/src/nativeCommonMain/kotlin/co/touchlab/stately/collections/CopyOnWriteList.kt renamed to deprecated/stately-collections/src/nativeMain/kotlin/co/touchlab/stately/collections/CopyOnWriteList.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
package co.touchlab.stately.collections
1818

1919
import co.touchlab.stately.concurrency.Lock
20-
import kotlin.native.concurrent.AtomicInt
21-
import kotlin.native.concurrent.AtomicReference
20+
import kotlin.concurrent.AtomicInt
21+
import kotlin.concurrent.AtomicReference
2222
import kotlin.native.concurrent.freeze
2323

2424
class CopyOnWriteList<T>(elements: Collection<T>) : MutableList<T> {

0 commit comments

Comments
 (0)