98 lines
3.1 KiB
Plaintext
98 lines
3.1 KiB
Plaintext
plugins {
|
|
kotlin("multiplatform")
|
|
kotlin("plugin.serialization")
|
|
}
|
|
|
|
val embedShaders = tasks.register<EmbedShadersTask>("embedShaders") {
|
|
inputDir.set(file("$projectDir/src/shaders/glsl"))
|
|
outputDir.set(file("$buildDir/generated/shaderKotlin"))
|
|
defaultPackage.set("org.openrndr.shaderphrases.phrases")
|
|
}.get()
|
|
|
|
kotlin {
|
|
jvm {
|
|
compilations {
|
|
val demo by creating {
|
|
defaultSourceSet {
|
|
kotlin.srcDir("src/demo")
|
|
dependencies {
|
|
implementation(project(":orx-camera"))
|
|
implementation(libs.openrndr.application)
|
|
implementation(libs.openrndr.extensions)
|
|
runtimeOnly(libs.openrndr.gl3)
|
|
runtimeOnly(libs.openrndr.gl3.natives)
|
|
implementation(compilations["main"]!!.output.allOutputs)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
compilations.all {
|
|
kotlinOptions.jvmTarget = libs.versions.jvmTarget.get()
|
|
kotlinOptions.apiVersion = libs.versions.kotlinApi.get()
|
|
}
|
|
testRuns["test"].executionTask.configure {
|
|
useJUnitPlatform()
|
|
}
|
|
}
|
|
js(IR) {
|
|
browser()
|
|
nodejs()
|
|
}
|
|
|
|
sourceSets {
|
|
val shaderKotlin by creating {
|
|
this.kotlin.srcDir(embedShaders.outputDir)
|
|
}
|
|
|
|
@Suppress("UNUSED_VARIABLE")
|
|
val commonMain by getting {
|
|
dependencies {
|
|
implementation(libs.kotlin.serialization.core)
|
|
implementation(libs.openrndr.application)
|
|
implementation(libs.openrndr.draw)
|
|
implementation(libs.kotlin.reflect)
|
|
implementation(libs.kotlin.logging)
|
|
api(shaderKotlin.kotlin)
|
|
}
|
|
}
|
|
commonMain.dependsOn(shaderKotlin)
|
|
@Suppress("UNUSED_VARIABLE")
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test-common"))
|
|
implementation(kotlin("test-annotations-common"))
|
|
implementation(libs.kotlin.serialization.json)
|
|
implementation(libs.kotest)
|
|
}
|
|
}
|
|
|
|
@Suppress("UNUSED_VARIABLE")
|
|
val jvmMain by getting
|
|
|
|
@Suppress("UNUSED_VARIABLE")
|
|
val jvmTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test-common"))
|
|
implementation(kotlin("test-annotations-common"))
|
|
implementation(kotlin("test-junit5"))
|
|
implementation(libs.kotlin.serialization.json)
|
|
runtimeOnly(libs.bundles.jupiter)
|
|
runtimeOnly(libs.slf4j.simple)
|
|
implementation(libs.spek.dsl)
|
|
implementation(libs.kluent)
|
|
}
|
|
}
|
|
|
|
@Suppress("UNUSED_VARIABLE")
|
|
val jsMain by getting
|
|
|
|
@Suppress("UNUSED_VARIABLE")
|
|
val jsTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test-js"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|