Fixed single platform plugins
This commit is contained in:
parent
64eaabb443
commit
ae7d31bd30
@ -1,13 +1,13 @@
|
||||
package scientifik
|
||||
|
||||
import Scientifik
|
||||
import kotlinx.atomicfu.plugin.gradle.sourceSets
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.gradle.kotlin.dsl.maven
|
||||
import org.gradle.kotlin.dsl.repositories
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
||||
|
||||
open class ScientifikJSPlugin : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
@ -31,19 +31,14 @@ open class ScientifikJSPlugin : Plugin<Project> {
|
||||
target {
|
||||
browser()
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets["main"].apply {
|
||||
this as KotlinSourceSet
|
||||
languageSettings.apply {
|
||||
progressiveMode = true
|
||||
enableLanguageFeature("InlineClasses")
|
||||
useExperimentalAnnotation("ExperimentalUnsignedType")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
this as KotlinDependencyHandler
|
||||
api(kotlin("stdlib-jdk8"))
|
||||
if (extension.serialization) {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Scientifik.serializationVersion}")
|
||||
@ -55,7 +50,8 @@ open class ScientifikJSPlugin : Plugin<Project> {
|
||||
api("org.jetbrains.kotlinx:kotlinx-io-js:${Scientifik.ioVersion}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,10 @@
|
||||
package scientifik
|
||||
|
||||
import Scientifik
|
||||
import kotlinx.atomicfu.plugin.gradle.sourceSets
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
@ -32,17 +30,15 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
configure<KotlinJvmProjectExtension> {
|
||||
sourceSets["main"].apply {
|
||||
this as KotlinSourceSet
|
||||
languageSettings.apply {
|
||||
progressiveMode = true
|
||||
enableLanguageFeature("InlineClasses")
|
||||
useExperimentalAnnotation("ExperimentalUnsignedType")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
this as KotlinDependencyHandler
|
||||
api(kotlin("stdlib-jdk8"))
|
||||
if (extension.serialization) {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Scientifik.serializationVersion}")
|
||||
@ -54,6 +50,8 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
api("org.jetbrains.kotlinx:kotlinx-io-jvm:${Scientifik.ioVersion}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user