Remove project extension and replace library loading by extensions helpers.
This commit is contained in:
parent
8145386650
commit
c700515d3f
@ -46,16 +46,29 @@ internal fun Project.useDependency(vararg pairs: Pair<String, String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun Project.useSerialization(version: String = Scientifik.serializationVersion) = useDependency(
|
fun Project.useSerialization(version: String = Scientifik.serializationVersion) {
|
||||||
"commonMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$version",
|
plugins.apply("org.jetbrains.kotlin.plugin.serialization")
|
||||||
"jvmMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$version",
|
useDependency(
|
||||||
"jsMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$version",
|
"commonMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$version",
|
||||||
"nativeMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$version"
|
"jvmMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$version",
|
||||||
)
|
"jsMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$version",
|
||||||
|
"nativeMain" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$version"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
fun Project.useCoroutines(version: String = Scientifik.coroutinesVersion) = useDependency(
|
fun Project.useCoroutines(version: String = Scientifik.coroutinesVersion) = useDependency(
|
||||||
"commonMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$version",
|
"commonMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$version",
|
||||||
"jvmMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version",
|
"jvmMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version",
|
||||||
"jsMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$version",
|
"jsMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$version",
|
||||||
"nativeMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$version"
|
"nativeMain" to "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$version"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//fun Project.useAtomic(version: String = Scientifik.atomicfuVersion) {
|
||||||
|
// plugins.apply("kotlinx-atomicfu")
|
||||||
|
// useDependency(
|
||||||
|
// "commonMain" to "org.jetbrains.kotlinx:atomicfu-common:$version",
|
||||||
|
// "jvmMain" to "org.jetbrains.kotlinx:atomicfu:$version",
|
||||||
|
// "jsMain" to "org.jetbrains.kotlinx:atomicfu-js:$version",
|
||||||
|
// "nativeMain" to "org.jetbrains.kotlinx:atomicfu-native:$version"
|
||||||
|
// )
|
||||||
|
//}
|
||||||
|
Loading…
Reference in New Issue
Block a user