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

Move to Kotlin 1.9.23, refactor Gradle file and source set directories #110

Merged
merged 5 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--ignore-engines true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ commonMain {
License
=======

Copyright 2022 Touchlab, Inc.
Copyright 2024 Touchlab, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
8 changes: 0 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,4 @@ val VERSION_NAME: String by project
allprojects {
group = GROUP
version = VERSION_NAME
}

allprojects {
repositories {
mavenCentral()
google()
maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
}
}
7 changes: 7 additions & 0 deletions convention-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}

dependencies {
implementation(libs.kotlin.gradlePlugin)
}
10 changes: 10 additions & 0 deletions convention-plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dependencyResolutionManagement {
repositories {
gradlePluginPortal()
}
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
56 changes: 56 additions & 0 deletions convention-plugins/src/main/kotlin/kmp-setup.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension

plugins {
kotlin("multiplatform")
}

kotlin {
jvm()
js {
nodejs()
browser()
}
@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class)
wasmJs {
browser()
nodejs()
}
macosX64()
iosArm64()
iosX64()
watchosArm32()
watchosArm64()
watchosX64()
watchosDeviceArm64()
tvosArm64()
tvosX64()

macosArm64()
iosSimulatorArm64()
watchosSimulatorArm64()
tvosSimulatorArm64()

mingwX64()
linuxX64()
linuxArm64()

androidNativeArm32()
androidNativeArm64()
androidNativeX86()
androidNativeX64()

@Suppress("OPT_IN_USAGE")
applyDefaultHierarchyTemplate {
common {
group("jsAndWasmJs") {
withJs()
withWasm()
}
}
}
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}
140 changes: 6 additions & 134 deletions deprecated/stately-collections/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
* limitations under the License.
*/

apply plugin: 'org.jetbrains.kotlin.multiplatform'
plugins {
id 'org.jetbrains.kotlin.multiplatform'
id 'kmp-setup'
id 'com.vanniktech.maven.publish'
}

group = GROUP
version = VERSION_NAME
Expand All @@ -23,39 +27,6 @@ configurations {
compileClasspath
}
kotlin {
targetHierarchy.default {}
jvm()
js {
nodejs()
browser()
}
wasm {
browser()
binaries.executable()
}
macosX64()
iosArm64()
iosX64()
watchosArm32()
watchosArm64()
watchosX64()
watchosDeviceArm64()
tvosArm64()
tvosX64()
mingwX64()
linuxX64()
linuxArm64()

macosArm64()
iosSimulatorArm64()
watchosSimulatorArm64()
tvosSimulatorArm64()

androidNativeArm32()
androidNativeArm64()
androidNativeX86()
androidNativeX64()

sourceSets {
commonMain {
dependencies {
Expand All @@ -70,104 +41,5 @@ kotlin {
implementation libs.testHelp
}
}

create("jsWasmMain") {
dependsOn commonMain
}

create("jsWasmTest") {
dependsOn commonTest
}

jsMain {
dependsOn jsWasmMain
}
jsTest {
dependsOn jsWasmTest
}

wasmMain {
dependsOn jsWasmMain
}
wasmTest {
dependsOn jsWasmTest
}

nativeCommonMain {
dependsOn commonMain
}
nativeCommonTest {
dependsOn commonTest
}

macosX64Main {
dependsOn nativeCommonMain
}
iosArm64Main {
dependsOn nativeCommonMain
}
iosX64Main {
dependsOn nativeCommonMain
}
watchosArm32Main {
dependsOn nativeCommonMain
}
watchosArm64Main {
dependsOn nativeCommonMain
}
watchosX64Main {
dependsOn nativeCommonMain
}
watchosDeviceArm64Main {
dependsOn nativeCommonMain
}
tvosArm64Main {
dependsOn nativeCommonMain
}
tvosX64Main {
dependsOn nativeCommonMain
}

macosArm64Main {
dependsOn nativeCommonMain
}
iosSimulatorArm64Main {
dependsOn nativeCommonMain
}
watchosSimulatorArm64Main {
dependsOn nativeCommonMain
}
tvosSimulatorArm64Main {
dependsOn nativeCommonMain
}

mingwX64Main {
dependsOn nativeCommonMain
}

linuxX64Main {
dependsOn nativeCommonMain
}
linuxArm64Main {
dependsOn nativeCommonMain
}

androidNativeArm32Main {
dependsOn nativeCommonMain
}

androidNativeArm64Main {
dependsOn nativeCommonMain
}

androidNativeX86Main {
dependsOn nativeCommonMain
}

androidNativeX64Main {
dependsOn nativeCommonMain
}
}
}

apply plugin:"com.vanniktech.maven.publish"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package co.touchlab.stately.collections

import co.touchlab.stately.concurrency.Lock
import kotlin.native.concurrent.AtomicInt
import kotlin.native.concurrent.AtomicReference
import kotlin.concurrent.AtomicInt
import kotlin.concurrent.AtomicReference
import kotlin.native.concurrent.freeze

class CopyOnWriteList<T>(elements: Collection<T>) : MutableList<T> {
Expand Down
Loading
Loading