diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1d732e61..c3389d653 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: path: ./orx - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1.0.4 + uses: gradle/wrapper-validation-action@v1.0.5 - name: Checkout OPENRNDR repository uses: actions/checkout@v3 @@ -33,10 +33,11 @@ jobs: - name: Test glxinfo run: | + sudo apt-get update sudo apt-get install -y mesa-utils xvfb xvfb-run glxinfo - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: temurin java-version: 17 diff --git a/.github/workflows/generate-screenshots.yml b/.github/workflows/generate-screenshots.yml index 921ce09da..fe4a12b12 100644 --- a/.github/workflows/generate-screenshots.yml +++ b/.github/workflows/generate-screenshots.yml @@ -17,7 +17,7 @@ jobs: path: ./orx - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1.0.4 + uses: gradle/wrapper-validation-action@v1.0.5 - name: Checkout OPENRNDR repository uses: actions/checkout@v3 @@ -29,10 +29,11 @@ jobs: - name: Test glxinfo run: | + sudo apt-get update sudo apt-get install -y mesa-utils xvfb xvfb-run glxinfo - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: temurin java-version: 17 diff --git a/.github/workflows/release-candidate-to-maven-central.yml b/.github/workflows/release-candidate-to-maven-central.yml index 741bd2f77..e502acb5b 100644 --- a/.github/workflows/release-candidate-to-maven-central.yml +++ b/.github/workflows/release-candidate-to-maven-central.yml @@ -13,7 +13,7 @@ jobs: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: temurin java-version: 17 diff --git a/.github/workflows/release-to-maven-central.yml b/.github/workflows/release-to-maven-central.yml index 27dfa8d04..203ef99b5 100644 --- a/.github/workflows/release-to-maven-central.yml +++ b/.github/workflows/release-to-maven-central.yml @@ -14,7 +14,7 @@ jobs: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: temurin java-version: 17 diff --git a/buildSrc/src/main/kotlin/CollectScreenShots.kt b/buildSrc/src/main/kotlin/CollectScreenShots.kt index 44b7f85d5..9e433dc26 100644 --- a/buildSrc/src/main/kotlin/CollectScreenShots.kt +++ b/buildSrc/src/main/kotlin/CollectScreenShots.kt @@ -7,17 +7,17 @@ import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* import org.gradle.kotlin.dsl.register +import org.gradle.process.ExecOperations import org.gradle.work.Incremental import org.gradle.work.InputChanges -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmCompilation import java.io.File import java.net.URLClassLoader import javax.inject.Inject abstract class CollectScreenshotsTask @Inject constructor() : DefaultTask() { - @get:Incremental - @get:PathSensitive(PathSensitivity.NAME_ONLY) @get:InputDirectory + @get:PathSensitive(PathSensitivity.NAME_ONLY) + @get:SkipWhenEmpty abstract val inputDir: DirectoryProperty @get:Input @@ -27,54 +27,55 @@ abstract class CollectScreenshotsTask @Inject constructor() : DefaultTask() { abstract val outputDir: DirectoryProperty @get:Input + @get:Optional abstract val ignore: ListProperty + @get:Inject + abstract val execOperations: ExecOperations - init { - ignore.set(emptyList()) - } @TaskAction fun execute(inputChanges: InputChanges) { val preloadClass = File(project.rootProject.projectDir, "buildSrc/build/classes/kotlin/preload") require(preloadClass.exists()) { "preload class not found: '${preloadClass.absolutePath}'" - } inputChanges.getFileChanges(inputDir).forEach { change -> - println(change) if (change.fileType == FileType.DIRECTORY) return@forEach if (change.file.extension == "class") { val klassName = change.file.nameWithoutExtension - if (klassName.dropLast(2) in ignore.get()) + if (klassName.dropLast(2) in ignore.get()) { return@forEach - - val cp = (runtimeDependencies.get().map { it.toURI().toURL() } + - inputDir.get().asFile.toURI().toURL() - ) - .toTypedArray() - - val ucl = URLClassLoader(cp) - val klass = ucl.loadClass(klassName) - println("Collecting screenshot for ${klassName} ${klass}") + } try { - val mainMethod = klass.getMethod("main") - project.javaexec { - this.classpath += project.files(inputDir.get().asFile, preloadClass) - this.classpath += runtimeDependencies.get() - this.mainClass.set(klassName) - this.workingDir(project.rootProject.projectDir) - jvmArgs("-DtakeScreenshot=true", "-DscreenshotPath=${outputDir.get().asFile}/$klassName.png", "-Dorg.openrndr.exceptions=JVM") - } + val cp = (runtimeDependencies.get().map { it.toURI().toURL() } + inputDir.get().asFile.toURI() + .toURL()).toTypedArray() + val ucl = URLClassLoader(cp) + val klass = ucl.loadClass(klassName) + klass.getMethod("main") } catch (e: NoSuchMethodException) { - // silently ignore + return@forEach + } + + println("Collecting screenshot for ${klassName}") + + execOperations.javaexec { + this.classpath += project.files(inputDir.get().asFile, preloadClass) + this.classpath += runtimeDependencies.get() + this.mainClass.set(klassName) + this.workingDir(project.rootProject.projectDir) + this.jvmArgs( + "-DtakeScreenshot=true", + "-DscreenshotPath=${outputDir.get().asFile}/$klassName.png", + "-Dorg.openrndr.exceptions=JVM" + ) } } } // this is only executed if there are changes in the inputDir val runDemos = outputDir.get().asFile.listFiles { file: File -> file.extension == "png" - }.map { it.nameWithoutExtension }.sorted() + }!!.map { it.nameWithoutExtension }.sorted() val readme = File(project.projectDir, "README.md") if (readme.exists()) { var lines = readme.readLines().toMutableList() @@ -84,10 +85,18 @@ abstract class CollectScreenshotsTask @Inject constructor() : DefaultTask() { } lines.add("") lines.add("## Demos") + + // Find out if current project is MPP + val demoModuleName = if (project.plugins.hasPlugin("org.jetbrains.kotlin.multiplatform")) { + "jvmDemo" + } else { + "demo" + } + for (demo in runDemos) { val projectPath = project.projectDir.relativeTo(project.rootDir) lines.add("### ${demo.dropLast(2)}") - lines.add("[source code](src/demo/kotlin/${demo.dropLast(2)}.kt)") + lines.add("[source code](src/${demoModuleName}/kotlin/${demo.dropLast(2)}.kt)") lines.add("") lines.add("![${demo}](https://raw.githubusercontent.com/openrndr/orx/media/$projectPath/images/${demo}.png)") lines.add("") @@ -99,18 +108,11 @@ abstract class CollectScreenshotsTask @Inject constructor() : DefaultTask() { } object ScreenshotsHelper { - fun KotlinJvmCompilation.collectScreenshots(config: CollectScreenshotsTask.() -> Unit): CollectScreenshotsTask { - val task = this.project.tasks.register("collectScreenshots").get() - task.outputDir.set(project.file(project.projectDir.toString() + "/images")) - task.inputDir.set(output.classesDirs.first()) - task.runtimeDependencies.set(runtimeDependencyFiles) - task.config() - task.dependsOn(this.compileKotlinTask) - return task - - } - - fun collectScreenshots(project: Project, sourceSet: SourceSet, config: CollectScreenshotsTask.() -> Unit): CollectScreenshotsTask { + fun collectScreenshots( + project: Project, + sourceSet: SourceSet, + config: CollectScreenshotsTask.() -> Unit + ): CollectScreenshotsTask { val task = project.tasks.register("collectScreenshots").get() task.outputDir.set(project.file(project.projectDir.toString() + "/images")) task.inputDir.set(File(project.buildDir, "classes/kotlin/${sourceSet.name}")) diff --git a/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-jvm.gradle.kts b/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-jvm.gradle.kts index 44332eea2..0876c2c86 100644 --- a/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-jvm.gradle.kts +++ b/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-jvm.gradle.kts @@ -17,10 +17,6 @@ plugins { repositories { mavenCentral() - maven { - // This is needed to resolve `com.github.ricardomatias:delaunator` - url = URI("https://maven.openrndr.org") - } mavenLocal() } @@ -39,6 +35,7 @@ dependencies { "demoImplementation"(libs.openrndr.application) "demoImplementation"(libs.openrndr.extensions) "demoRuntimeOnly"(libs.openrndr.gl3.core) + "demoRuntimeOnly"(libs.slf4j.simple) } kotlin { diff --git a/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts b/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts index a086c26da..1fd67b4b1 100644 --- a/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts +++ b/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts @@ -1,5 +1,6 @@ package org.openrndr.extra.convention +import CollectScreenshotsTask import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -16,10 +17,6 @@ plugins { repositories { mavenCentral() - maven { - // This is needed to resolve `com.github.ricardomatias:delaunator` - url = URI("https://maven.openrndr.org") - } mavenLocal() } @@ -34,13 +31,15 @@ kotlin { jvm { jvmToolchain(libs.versions.jvmTarget.get().toInt()) compilations { - val main by getting + val main by getting @Suppress("UNUSED_VARIABLE") val demo by creating { - defaultSourceSet { - dependencies { - implementation(main.output.allOutputs) - } + associateWith(main) + tasks.register("collectScreenshots") { + inputDir.set(output.classesDirs.singleFile) + runtimeDependencies.set(runtimeDependencyFiles) + outputDir.set(project.file(project.projectDir.toString() + "/images")) + dependsOn(compileKotlinTask) } } } @@ -84,6 +83,7 @@ kotlin { implementation(libs.openrndr.application) implementation(libs.openrndr.extensions) runtimeOnly(libs.openrndr.gl3.core) + runtimeOnly(libs.slf4j.simple) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e0549cf22..590b5a488 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -30,7 +30,6 @@ ktor = "2.0.3" jgit = "5.12.0.202106070339-r" javaosc = "0.8" javaparser = "3.15.21" -delaunator = "1.0.2" [libraries] kotlin-logging = { group = "io.github.microutils", name = "kotlin-logging", version.ref = "kotlinLogging" } @@ -77,7 +76,6 @@ javaparser-core = { group = "com.github.javaparser", name = "javaparser-core", v gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } antlr-core = { group = "org.antlr", name = "antlr4", version.ref = "antlr" } antlr-runtime = { group = "org.antlr", name = "antlr4-runtime", version.ref = "antlr" } -delaunator = { group = "com.github.ricardomatias", name = "delaunator", version.ref = "delaunator" } jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junitJupiter" } jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junitJupiter" } diff --git a/orx-camera/build.gradle.kts b/orx-camera/build.gradle.kts index ee3898f72..bd0df9ec3 100644 --- a/orx-camera/build.gradle.kts +++ b/orx-camera/build.gradle.kts @@ -1,19 +1,9 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } testRuns["test"].executionTask { useJUnitPlatform { includeEngines("spek2") diff --git a/orx-camera/src/demo/kotlin/DemoCamera2D01.kt b/orx-camera/src/jvmDemo/kotlin/DemoCamera2D01.kt similarity index 100% rename from orx-camera/src/demo/kotlin/DemoCamera2D01.kt rename to orx-camera/src/jvmDemo/kotlin/DemoCamera2D01.kt diff --git a/orx-camera/src/demo/kotlin/DemoOrbitalCamera01.kt b/orx-camera/src/jvmDemo/kotlin/DemoOrbitalCamera01.kt similarity index 100% rename from orx-camera/src/demo/kotlin/DemoOrbitalCamera01.kt rename to orx-camera/src/jvmDemo/kotlin/DemoOrbitalCamera01.kt diff --git a/orx-camera/src/demo/kotlin/DemoParametricOrbital01.kt b/orx-camera/src/jvmDemo/kotlin/DemoParametricOrbital01.kt similarity index 100% rename from orx-camera/src/demo/kotlin/DemoParametricOrbital01.kt rename to orx-camera/src/jvmDemo/kotlin/DemoParametricOrbital01.kt diff --git a/orx-color/build.gradle.kts b/orx-color/build.gradle.kts index 72554fd86..67beca549 100644 --- a/orx-color/build.gradle.kts +++ b/orx-color/build.gradle.kts @@ -1,5 +1,3 @@ -import ScreenshotsHelper.collectScreenshots - @Suppress("DSL_SCOPE_VIOLATION") plugins { org.openrndr.extra.convention.`kotlin-multiplatform` @@ -11,14 +9,6 @@ plugins { kotlin { jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } testRuns["test"].executionTask { useJUnitPlatform { includeEngines("spek2") diff --git a/orx-color/src/demo/kotlin/DemoColorPlane01.kt b/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoColorPlane01.kt rename to orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt diff --git a/orx-color/src/demo/kotlin/DemoColorPlane02.kt b/orx-color/src/jvmDemo/kotlin/DemoColorPlane02.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoColorPlane02.kt rename to orx-color/src/jvmDemo/kotlin/DemoColorPlane02.kt diff --git a/orx-color/src/demo/kotlin/DemoColorRange01.kt b/orx-color/src/jvmDemo/kotlin/DemoColorRange01.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoColorRange01.kt rename to orx-color/src/jvmDemo/kotlin/DemoColorRange01.kt diff --git a/orx-color/src/demo/kotlin/DemoColorRange02.kt b/orx-color/src/jvmDemo/kotlin/DemoColorRange02.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoColorRange02.kt rename to orx-color/src/jvmDemo/kotlin/DemoColorRange02.kt diff --git a/orx-color/src/demo/kotlin/DemoColorRange03.kt b/orx-color/src/jvmDemo/kotlin/DemoColorRange03.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoColorRange03.kt rename to orx-color/src/jvmDemo/kotlin/DemoColorRange03.kt diff --git a/orx-color/src/demo/kotlin/DemoColorRange04.kt b/orx-color/src/jvmDemo/kotlin/DemoColorRange04.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoColorRange04.kt rename to orx-color/src/jvmDemo/kotlin/DemoColorRange04.kt diff --git a/orx-color/src/demo/kotlin/DemoFettePalette01.kt b/orx-color/src/jvmDemo/kotlin/DemoFettePalette01.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoFettePalette01.kt rename to orx-color/src/jvmDemo/kotlin/DemoFettePalette01.kt diff --git a/orx-color/src/demo/kotlin/DemoFettePalette02.kt b/orx-color/src/jvmDemo/kotlin/DemoFettePalette02.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoFettePalette02.kt rename to orx-color/src/jvmDemo/kotlin/DemoFettePalette02.kt diff --git a/orx-color/src/demo/kotlin/DemoHSLUV01.kt b/orx-color/src/jvmDemo/kotlin/DemoHSLUV01.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoHSLUV01.kt rename to orx-color/src/jvmDemo/kotlin/DemoHSLUV01.kt diff --git a/orx-color/src/demo/kotlin/DemoHSLUV02.kt b/orx-color/src/jvmDemo/kotlin/DemoHSLUV02.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoHSLUV02.kt rename to orx-color/src/jvmDemo/kotlin/DemoHSLUV02.kt diff --git a/orx-color/src/demo/kotlin/DemoHistogram01.kt b/orx-color/src/jvmDemo/kotlin/DemoHistogram01.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoHistogram01.kt rename to orx-color/src/jvmDemo/kotlin/DemoHistogram01.kt diff --git a/orx-color/src/demo/kotlin/DemoHistogram02.kt b/orx-color/src/jvmDemo/kotlin/DemoHistogram02.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoHistogram02.kt rename to orx-color/src/jvmDemo/kotlin/DemoHistogram02.kt diff --git a/orx-color/src/demo/kotlin/DemoHistogram03.kt b/orx-color/src/jvmDemo/kotlin/DemoHistogram03.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoHistogram03.kt rename to orx-color/src/jvmDemo/kotlin/DemoHistogram03.kt diff --git a/orx-color/src/demo/kotlin/DemoOKHSV01.kt b/orx-color/src/jvmDemo/kotlin/DemoOKHSV01.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoOKHSV01.kt rename to orx-color/src/jvmDemo/kotlin/DemoOKHSV01.kt diff --git a/orx-color/src/demo/kotlin/DemoXSLUV01.kt b/orx-color/src/jvmDemo/kotlin/DemoXSLUV01.kt similarity index 100% rename from orx-color/src/demo/kotlin/DemoXSLUV01.kt rename to orx-color/src/jvmDemo/kotlin/DemoXSLUV01.kt diff --git a/orx-compositor/build.gradle.kts b/orx-compositor/build.gradle.kts index 73c3adc9b..fced9e306 100644 --- a/orx-compositor/build.gradle.kts +++ b/orx-compositor/build.gradle.kts @@ -1,21 +1,8 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - } - sourceSets { @Suppress("UNUSED_VARIABLE") val commonMain by getting { @@ -30,15 +17,6 @@ kotlin { } } - - @Suppress("UNUSED_VARIABLE") - val jvmTest by getting { - dependencies { - implementation(libs.spek.dsl) - implementation(libs.kluent) - } - } - @Suppress("UNUSED_VARIABLE") val jvmDemo by getting { dependencies { diff --git a/orx-compositor/src/demo/kotlin/DemoAside01.kt b/orx-compositor/src/jvmDemo/kotlin/DemoAside01.kt similarity index 100% rename from orx-compositor/src/demo/kotlin/DemoAside01.kt rename to orx-compositor/src/jvmDemo/kotlin/DemoAside01.kt diff --git a/orx-compositor/src/demo/kotlin/DemoCompositor01.kt b/orx-compositor/src/jvmDemo/kotlin/DemoCompositor01.kt similarity index 100% rename from orx-compositor/src/demo/kotlin/DemoCompositor01.kt rename to orx-compositor/src/jvmDemo/kotlin/DemoCompositor01.kt diff --git a/orx-compositor/src/demo/kotlin/DemoCompositor02.kt b/orx-compositor/src/jvmDemo/kotlin/DemoCompositor02.kt similarity index 100% rename from orx-compositor/src/demo/kotlin/DemoCompositor02.kt rename to orx-compositor/src/jvmDemo/kotlin/DemoCompositor02.kt diff --git a/orx-easing/build.gradle.kts b/orx-easing/build.gradle.kts index c16ca93ba..b104cf603 100644 --- a/orx-easing/build.gradle.kts +++ b/orx-easing/build.gradle.kts @@ -1,21 +1,8 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - } - sourceSets { @Suppress("UNUSED_VARIABLE") val commonMain by getting { diff --git a/orx-easing/src/demo/kotlin/DemoEasings01.kt b/orx-easing/src/jvmDemo/kotlin/DemoEasings01.kt similarity index 100% rename from orx-easing/src/demo/kotlin/DemoEasings01.kt rename to orx-easing/src/jvmDemo/kotlin/DemoEasings01.kt diff --git a/orx-fx/build.gradle.kts b/orx-fx/build.gradle.kts index 025a9e275..9a6894a77 100644 --- a/orx-fx/build.gradle.kts +++ b/orx-fx/build.gradle.kts @@ -1,5 +1,3 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } @@ -14,17 +12,6 @@ val embedShaders = tasks.register("embedShaders") { kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - } - sourceSets { val shaderKotlin by creating { this.kotlin.srcDir(embedShaders.outputDir) @@ -45,15 +32,6 @@ kotlin { dependsOn(shaderKotlin) } - - @Suppress("UNUSED_VARIABLE") - val jvmTest by getting { - dependencies { - implementation(libs.spek.dsl) - implementation(libs.kluent) - } - } - @Suppress("UNUSED_VARIABLE") val jvmDemo by getting { dependencies { diff --git a/orx-fx/src/demo/kotlin/DemoBlend01.kt b/orx-fx/src/jvmDemo/kotlin/DemoBlend01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoBlend01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoBlend01.kt diff --git a/orx-fx/src/demo/kotlin/DemoBlur01.kt b/orx-fx/src/jvmDemo/kotlin/DemoBlur01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoBlur01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoBlur01.kt diff --git a/orx-fx/src/demo/kotlin/DemoCannyEdgeDetector01.kt b/orx-fx/src/jvmDemo/kotlin/DemoCannyEdgeDetector01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoCannyEdgeDetector01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoCannyEdgeDetector01.kt diff --git a/orx-fx/src/demo/kotlin/DemoColorDuotone01.kt b/orx-fx/src/jvmDemo/kotlin/DemoColorDuotone01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoColorDuotone01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoColorDuotone01.kt diff --git a/orx-fx/src/demo/kotlin/DemoColorDuotoneGradient01.kt b/orx-fx/src/jvmDemo/kotlin/DemoColorDuotoneGradient01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoColorDuotoneGradient01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoColorDuotoneGradient01.kt diff --git a/orx-fx/src/demo/kotlin/DemoColorPosterize01.kt b/orx-fx/src/jvmDemo/kotlin/DemoColorPosterize01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoColorPosterize01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoColorPosterize01.kt diff --git a/orx-fx/src/demo/kotlin/DemoCompositeFilter01.kt b/orx-fx/src/jvmDemo/kotlin/DemoCompositeFilter01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoCompositeFilter01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoCompositeFilter01.kt diff --git a/orx-fx/src/demo/kotlin/DemoDirectionalBlur01.kt b/orx-fx/src/jvmDemo/kotlin/DemoDirectionalBlur01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoDirectionalBlur01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoDirectionalBlur01.kt diff --git a/orx-fx/src/demo/kotlin/DemoDistortLenses01.kt b/orx-fx/src/jvmDemo/kotlin/DemoDistortLenses01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoDistortLenses01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoDistortLenses01.kt diff --git a/orx-fx/src/demo/kotlin/DemoDitherLumaHalftone01.kt b/orx-fx/src/jvmDemo/kotlin/DemoDitherLumaHalftone01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoDitherLumaHalftone01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoDitherLumaHalftone01.kt diff --git a/orx-fx/src/demo/kotlin/DemoFluidDistort01.kt b/orx-fx/src/jvmDemo/kotlin/DemoFluidDistort01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoFluidDistort01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoFluidDistort01.kt diff --git a/orx-fx/src/demo/kotlin/DemoLaserBlur01.kt b/orx-fx/src/jvmDemo/kotlin/DemoLaserBlur01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoLaserBlur01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoLaserBlur01.kt diff --git a/orx-fx/src/demo/kotlin/DemoOkLab01.kt b/orx-fx/src/jvmDemo/kotlin/DemoOkLab01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoOkLab01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoOkLab01.kt diff --git a/orx-fx/src/demo/kotlin/DemoPost01.kt b/orx-fx/src/jvmDemo/kotlin/DemoPost01.kt similarity index 100% rename from orx-fx/src/demo/kotlin/DemoPost01.kt rename to orx-fx/src/jvmDemo/kotlin/DemoPost01.kt diff --git a/orx-image-fit/build.gradle.kts b/orx-image-fit/build.gradle.kts index 15076bd7b..ab2cecbd0 100644 --- a/orx-image-fit/build.gradle.kts +++ b/orx-image-fit/build.gradle.kts @@ -1,21 +1,8 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - } - sourceSets { @Suppress("UNUSED_VARIABLE") val commonMain by getting { diff --git a/orx-image-fit/src/demo/kotlin/DemoImageFit01.kt b/orx-image-fit/src/jvmDemo/kotlin/DemoImageFit01.kt similarity index 100% rename from orx-image-fit/src/demo/kotlin/DemoImageFit01.kt rename to orx-image-fit/src/jvmDemo/kotlin/DemoImageFit01.kt diff --git a/orx-jumpflood/build.gradle.kts b/orx-jumpflood/build.gradle.kts index 25b4aa5b2..16d5f9efa 100644 --- a/orx-jumpflood/build.gradle.kts +++ b/orx-jumpflood/build.gradle.kts @@ -1,5 +1,3 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } @@ -12,19 +10,7 @@ val embedShaders = tasks.register("embedShaders") { namePrefix.set("jf_") }.get() - kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - } - sourceSets { val shaderKotlin by creating { this.kotlin.srcDir(embedShaders.outputDir) @@ -44,15 +30,6 @@ kotlin { dependsOn(shaderKotlin) } - - @Suppress("UNUSED_VARIABLE") - val jvmTest by getting { - dependencies { - implementation(libs.spek.dsl) - implementation(libs.kluent) - } - } - @Suppress("UNUSED_VARIABLE") val jvmDemo by getting { dependencies { diff --git a/orx-jumpflood/src/demo/kotlin/DemoDirectionField01.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoDirectionField01.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoDirectionField01.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoDirectionField01.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoDistanceField01.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoDistanceField01.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoDistanceField01.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoDistanceField01.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoInnerGlow01.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoInnerGlow01.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoInnerGlow01.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoInnerGlow01.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoInnerGlow02.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoInnerGlow02.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoInnerGlow02.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoInnerGlow02.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF01.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF01.kt similarity index 82% rename from orx-jumpflood/src/demo/kotlin/DemoShapeSDF01.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF01.kt index 1284d39ab..3afd0270d 100644 --- a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF01.kt +++ b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF01.kt @@ -2,7 +2,6 @@ import org.openrndr.application import org.openrndr.draw.ColorFormat import org.openrndr.draw.ColorType import org.openrndr.draw.colorBuffer -import org.openrndr.extensions.SingleScreenshot import org.openrndr.extra.jumpfill.ShapeSDF import org.openrndr.svg.loadSVG @@ -16,7 +15,7 @@ fun main() { val sdf = ShapeSDF() val df = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32) - val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape } + val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape } sdf.setShapes(shapes) sdf.apply(emptyArray(), df) diff --git a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF02.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF02.kt similarity index 87% rename from orx-jumpflood/src/demo/kotlin/DemoShapeSDF02.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF02.kt index ab181b574..5ef709100 100644 --- a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF02.kt +++ b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF02.kt @@ -3,10 +3,10 @@ import org.openrndr.color.ColorRGBa import org.openrndr.draw.ColorFormat import org.openrndr.draw.ColorType import org.openrndr.draw.colorBuffer -import org.openrndr.extensions.SingleScreenshot import org.openrndr.extra.jumpfill.ShapeSDF import org.openrndr.extra.jumpfill.draw.SDFStrokeFill -import org.openrndr.extra.jumpfill.ops.* +import org.openrndr.extra.jumpfill.ops.SDFOnion +import org.openrndr.extra.jumpfill.ops.SDFSmoothIntersection import org.openrndr.math.Vector3 import org.openrndr.math.transforms.transform import org.openrndr.svg.loadSVG @@ -25,7 +25,7 @@ fun main() { val sdf1 = ShapeSDF() val df1 = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32) - val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape } + val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape } val union = SDFSmoothIntersection() val onion = SDFOnion() @@ -53,7 +53,7 @@ fun main() { onion.radius = 20.0 onion.apply(df0, df0) strokeFill.strokeWeight = 2.0 - strokeFill.apply(df0, df0); + strokeFill.apply(df0, df0) drawer.image(df0) } } diff --git a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF03.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF03.kt similarity index 86% rename from orx-jumpflood/src/demo/kotlin/DemoShapeSDF03.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF03.kt index 2d0b26f2a..a87221568 100644 --- a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF03.kt +++ b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF03.kt @@ -3,11 +3,10 @@ import org.openrndr.color.ColorRGBa import org.openrndr.draw.ColorFormat import org.openrndr.draw.ColorType import org.openrndr.draw.colorBuffer -import org.openrndr.extensions.SingleScreenshot import org.openrndr.extra.fx.distort.FluidDistort import org.openrndr.extra.jumpfill.ShapeSDF import org.openrndr.extra.jumpfill.draw.SDFStrokeFill -import org.openrndr.extra.jumpfill.ops.* +import org.openrndr.extra.jumpfill.ops.SDFSmoothDifference import org.openrndr.svg.loadSVG fun main() { @@ -27,7 +26,7 @@ fun main() { val uvmap = colorBuffer(width, height, type = ColorType.FLOAT16) - val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape } + val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape } val union = SDFSmoothDifference() sdf0.setShapes(shapes) @@ -47,7 +46,7 @@ fun main() { union.apply(arrayOf(df0, df1), df0) strokeFill.strokeWeight = 10.0 - strokeFill.apply(df0, df0); + strokeFill.apply(df0, df0) drawer.image(df0) } } diff --git a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF04.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF04.kt similarity index 88% rename from orx-jumpflood/src/demo/kotlin/DemoShapeSDF04.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF04.kt index bba349ae7..ef1fd044f 100644 --- a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF04.kt +++ b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF04.kt @@ -3,12 +3,11 @@ import org.openrndr.color.ColorRGBa import org.openrndr.draw.ColorFormat import org.openrndr.draw.ColorType import org.openrndr.draw.colorBuffer -import org.openrndr.extensions.SingleScreenshot import org.openrndr.extra.fx.distort.Perturb import org.openrndr.extra.gui.GUI import org.openrndr.extra.jumpfill.ShapeSDF import org.openrndr.extra.jumpfill.draw.SDFStrokeFill -import org.openrndr.extra.jumpfill.ops.* +import org.openrndr.extra.jumpfill.ops.SDFSmoothDifference import org.openrndr.shape.Circle import org.openrndr.svg.loadSVG @@ -31,7 +30,7 @@ fun main() { val uvmap = colorBuffer(width, height, type = ColorType.FLOAT16) val circleShapes = List(1) { Circle(width/2.0, height/2.0, 200.0).shape} - val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape } + val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape } sdf0.setShapes(circleShapes) sdf1.setShapes(shapes) @@ -54,7 +53,7 @@ fun main() { difference.apply(arrayOf(df0, df1), df0) strokeFill.strokeWeight = 10.0 - strokeFill.apply(df0, df0); + strokeFill.apply(df0, df0) drawer.image(df0) } } diff --git a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF05.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF05.kt similarity index 91% rename from orx-jumpflood/src/demo/kotlin/DemoShapeSDF05.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF05.kt index 86c048444..a5e0c1ab6 100644 --- a/orx-jumpflood/src/demo/kotlin/DemoShapeSDF05.kt +++ b/orx-jumpflood/src/jvmDemo/kotlin/DemoShapeSDF05.kt @@ -7,7 +7,7 @@ import org.openrndr.extra.fx.distort.Perturb import org.openrndr.extra.gui.GUI import org.openrndr.extra.jumpfill.ShapeSDF import org.openrndr.extra.jumpfill.draw.SDFStrokeFill -import org.openrndr.extra.jumpfill.ops.* +import org.openrndr.extra.jumpfill.ops.SDFSmoothDifference import org.openrndr.math.Vector2 import org.openrndr.shape.Circle import org.openrndr.svg.loadSVG @@ -35,7 +35,7 @@ fun main() { val uvmap2 = colorBuffer(width, height, type = ColorType.FLOAT16) val circleShapes = List(1) { Circle(width/2.0, height/2.0, 200.0).shape} - val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape } + val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape } sdf0.setShapes(circleShapes) sdf1.setShapes(shapes) @@ -67,7 +67,7 @@ fun main() { difference.apply(arrayOf(df0, df1), df0) - strokeFill.apply(df0, df0); + strokeFill.apply(df0, df0) drawer.image(df0) } } diff --git a/orx-jumpflood/src/demo/kotlin/DemoSkeleton01.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoSkeleton01.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoSkeleton01.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoSkeleton01.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoStraightSkeleton01.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoStraightSkeleton01.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoStraightSkeleton01.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoStraightSkeleton01.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoVoronoi01.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoVoronoi01.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoVoronoi01.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoVoronoi01.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoVoronoi02.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoVoronoi02.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoVoronoi02.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoVoronoi02.kt diff --git a/orx-jumpflood/src/demo/kotlin/DemoVoronoi03.kt b/orx-jumpflood/src/jvmDemo/kotlin/DemoVoronoi03.kt similarity index 100% rename from orx-jumpflood/src/demo/kotlin/DemoVoronoi03.kt rename to orx-jumpflood/src/jvmDemo/kotlin/DemoVoronoi03.kt diff --git a/orx-jumpflood/src/demo/resources/name.svg b/orx-jumpflood/src/jvmDemo/resources/name.svg similarity index 100% rename from orx-jumpflood/src/demo/resources/name.svg rename to orx-jumpflood/src/jvmDemo/resources/name.svg diff --git a/orx-no-clear/build.gradle.kts b/orx-no-clear/build.gradle.kts index b7ae21310..08db018e0 100644 --- a/orx-no-clear/build.gradle.kts +++ b/orx-no-clear/build.gradle.kts @@ -3,16 +3,6 @@ plugins { } kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - } - } - sourceSets { @Suppress("UNUSED_VARIABLE") val commonMain by getting { diff --git a/orx-no-clear/src/demo/kotlin/DemoNoClear.kt b/orx-no-clear/src/jvmDemo/kotlin/DemoNoClear.kt similarity index 98% rename from orx-no-clear/src/demo/kotlin/DemoNoClear.kt rename to orx-no-clear/src/jvmDemo/kotlin/DemoNoClear.kt index 5c1742a99..c2d4ea17d 100644 --- a/orx-no-clear/src/demo/kotlin/DemoNoClear.kt +++ b/orx-no-clear/src/jvmDemo/kotlin/DemoNoClear.kt @@ -2,7 +2,6 @@ import org.openrndr.application import org.openrndr.color.ColorHSLa import org.openrndr.color.rgb import org.openrndr.draw.isolated -import org.openrndr.extensions.SingleScreenshot import org.openrndr.extra.noclear.NoClear import org.openrndr.math.Polar import org.openrndr.shape.contour diff --git a/orx-noise/build.gradle.kts b/orx-noise/build.gradle.kts index 97fada4d3..b905e7d7e 100644 --- a/orx-noise/build.gradle.kts +++ b/orx-noise/build.gradle.kts @@ -1,5 +1,3 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } @@ -14,14 +12,6 @@ val embedShaders = tasks.register("embedShaders") { kotlin { jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } testRuns["test"].executionTask { useJUnitPlatform { includeEngines("spek2") diff --git a/orx-noise/src/demo/kotlin/DemoFunctionalComposition01.kt b/orx-noise/src/jvmDemo/kotlin/DemoFunctionalComposition01.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoFunctionalComposition01.kt rename to orx-noise/src/jvmDemo/kotlin/DemoFunctionalComposition01.kt diff --git a/orx-noise/src/demo/kotlin/DemoGradientPerturb2D.kt b/orx-noise/src/jvmDemo/kotlin/DemoGradientPerturb2D.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoGradientPerturb2D.kt rename to orx-noise/src/jvmDemo/kotlin/DemoGradientPerturb2D.kt diff --git a/orx-noise/src/demo/kotlin/DemoGradientPerturb3D.kt b/orx-noise/src/jvmDemo/kotlin/DemoGradientPerturb3D.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoGradientPerturb3D.kt rename to orx-noise/src/jvmDemo/kotlin/DemoGradientPerturb3D.kt diff --git a/orx-noise/src/demo/kotlin/DemoNoisesGLSL.kt b/orx-noise/src/jvmDemo/kotlin/DemoNoisesGLSL.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoNoisesGLSL.kt rename to orx-noise/src/jvmDemo/kotlin/DemoNoisesGLSL.kt diff --git a/orx-noise/src/demo/kotlin/DemoNoisesGLSLGui.kt b/orx-noise/src/jvmDemo/kotlin/DemoNoisesGLSLGui.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoNoisesGLSLGui.kt rename to orx-noise/src/jvmDemo/kotlin/DemoNoisesGLSLGui.kt diff --git a/orx-noise/src/demo/kotlin/DemoScatter01.kt b/orx-noise/src/jvmDemo/kotlin/DemoScatter01.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoScatter01.kt rename to orx-noise/src/jvmDemo/kotlin/DemoScatter01.kt diff --git a/orx-noise/src/demo/kotlin/DemoSimplex01.kt b/orx-noise/src/jvmDemo/kotlin/DemoSimplex01.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoSimplex01.kt rename to orx-noise/src/jvmDemo/kotlin/DemoSimplex01.kt diff --git a/orx-noise/src/demo/kotlin/DemoSimplexGLSL.kt b/orx-noise/src/jvmDemo/kotlin/DemoSimplexGLSL.kt similarity index 100% rename from orx-noise/src/demo/kotlin/DemoSimplexGLSL.kt rename to orx-noise/src/jvmDemo/kotlin/DemoSimplexGLSL.kt diff --git a/orx-quadtree/build.gradle.kts b/orx-quadtree/build.gradle.kts index 13023404b..5287db927 100644 --- a/orx-quadtree/build.gradle.kts +++ b/orx-quadtree/build.gradle.kts @@ -1,21 +1,8 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - } - sourceSets { @Suppress("UNUSED_VARIABLE") val commonMain by getting { diff --git a/orx-quadtree/src/demo/kotlin/DemoQuadTree01.kt b/orx-quadtree/src/jvmDemo/kotlin/DemoQuadTree01.kt similarity index 100% rename from orx-quadtree/src/demo/kotlin/DemoQuadTree01.kt rename to orx-quadtree/src/jvmDemo/kotlin/DemoQuadTree01.kt diff --git a/orx-quadtree/src/demo/kotlin/DemoQuadTree02.kt b/orx-quadtree/src/jvmDemo/kotlin/DemoQuadTree02.kt similarity index 100% rename from orx-quadtree/src/demo/kotlin/DemoQuadTree02.kt rename to orx-quadtree/src/jvmDemo/kotlin/DemoQuadTree02.kt diff --git a/orx-shade-styles/build.gradle.kts b/orx-shade-styles/build.gradle.kts index cf8b7b0a0..e03478fb8 100644 --- a/orx-shade-styles/build.gradle.kts +++ b/orx-shade-styles/build.gradle.kts @@ -1,21 +1,8 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - } - sourceSets { @Suppress("UNUSED_VARIABLE") val commonMain by getting { @@ -30,7 +17,6 @@ kotlin { } } - @Suppress("UNUSED_VARIABLE") val jvmDemo by getting { dependencies { diff --git a/orx-shade-styles/src/demo/kotlin/DemoAllGradients01.kt b/orx-shade-styles/src/jvmDemo/kotlin/DemoAllGradients01.kt similarity index 100% rename from orx-shade-styles/src/demo/kotlin/DemoAllGradients01.kt rename to orx-shade-styles/src/jvmDemo/kotlin/DemoAllGradients01.kt diff --git a/orx-shade-styles/src/demo/kotlin/DemoImageFit01.kt b/orx-shade-styles/src/jvmDemo/kotlin/DemoImageFit01.kt similarity index 100% rename from orx-shade-styles/src/demo/kotlin/DemoImageFit01.kt rename to orx-shade-styles/src/jvmDemo/kotlin/DemoImageFit01.kt diff --git a/orx-shade-styles/src/demo/kotlin/DemoLinearGradient.kt b/orx-shade-styles/src/jvmDemo/kotlin/DemoLinearGradient.kt similarity index 100% rename from orx-shade-styles/src/demo/kotlin/DemoLinearGradient.kt rename to orx-shade-styles/src/jvmDemo/kotlin/DemoLinearGradient.kt diff --git a/orx-shade-styles/src/demo/kotlin/DemoNPointGradient01.kt b/orx-shade-styles/src/jvmDemo/kotlin/DemoNPointGradient01.kt similarity index 100% rename from orx-shade-styles/src/demo/kotlin/DemoNPointGradient01.kt rename to orx-shade-styles/src/jvmDemo/kotlin/DemoNPointGradient01.kt diff --git a/orx-shade-styles/src/demo/kotlin/DemoNPointLinearGradient01.kt b/orx-shade-styles/src/jvmDemo/kotlin/DemoNPointLinearGradient01.kt similarity index 100% rename from orx-shade-styles/src/demo/kotlin/DemoNPointLinearGradient01.kt rename to orx-shade-styles/src/jvmDemo/kotlin/DemoNPointLinearGradient01.kt diff --git a/orx-shade-styles/src/demo/kotlin/DemoNPointRadialGradient01.kt b/orx-shade-styles/src/jvmDemo/kotlin/DemoNPointRadialGradient01.kt similarity index 100% rename from orx-shade-styles/src/demo/kotlin/DemoNPointRadialGradient01.kt rename to orx-shade-styles/src/jvmDemo/kotlin/DemoNPointRadialGradient01.kt diff --git a/orx-shade-styles/src/demo/kotlin/DemoRadialGradient01.kt b/orx-shade-styles/src/jvmDemo/kotlin/DemoRadialGradient01.kt similarity index 100% rename from orx-shade-styles/src/demo/kotlin/DemoRadialGradient01.kt rename to orx-shade-styles/src/jvmDemo/kotlin/DemoRadialGradient01.kt diff --git a/orx-shapes/build.gradle.kts b/orx-shapes/build.gradle.kts index 01a1aa24a..9f45200ab 100644 --- a/orx-shapes/build.gradle.kts +++ b/orx-shapes/build.gradle.kts @@ -1,19 +1,9 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } testRuns["test"].executionTask { useJUnitPlatform { includeEngines("spek2") @@ -42,7 +32,6 @@ kotlin { } } - @Suppress("UNUSED_VARIABLE") val jvmTest by getting { dependencies { diff --git a/orx-shapes/src/demo/kotlin/DemoAlphaShape.kt b/orx-shapes/src/jvmDemo/kotlin/DemoAlphaShape.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoAlphaShape.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoAlphaShape.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatch01.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch01.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatch01.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch01.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatch02.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch02.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatch02.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch02.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatch03.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch03.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatch03.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch03.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatch04.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch04.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatch04.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch04.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatch05.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch05.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatch05.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatch05.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatchDrawer01.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatchDrawer01.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatchDrawer01.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatchDrawer01.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatchDrawer02.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatchDrawer02.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatchDrawer02.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatchDrawer02.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatchDrawer03.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatchDrawer03.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatchDrawer03.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatchDrawer03.kt diff --git a/orx-shapes/src/demo/kotlin/DemoBezierPatches01.kt b/orx-shapes/src/jvmDemo/kotlin/DemoBezierPatches01.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoBezierPatches01.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoBezierPatches01.kt diff --git a/orx-shapes/src/demo/kotlin/DemoHobbyCurve01.kt b/orx-shapes/src/jvmDemo/kotlin/DemoHobbyCurve01.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoHobbyCurve01.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoHobbyCurve01.kt diff --git a/orx-shapes/src/demo/kotlin/DemoHobbyCurve02.kt b/orx-shapes/src/jvmDemo/kotlin/DemoHobbyCurve02.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoHobbyCurve02.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoHobbyCurve02.kt diff --git a/orx-shapes/src/demo/kotlin/DemoRectangleGrid01.kt b/orx-shapes/src/jvmDemo/kotlin/DemoRectangleGrid01.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoRectangleGrid01.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoRectangleGrid01.kt diff --git a/orx-shapes/src/demo/kotlin/DemoRectangleGrid02.kt b/orx-shapes/src/jvmDemo/kotlin/DemoRectangleGrid02.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoRectangleGrid02.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoRectangleGrid02.kt diff --git a/orx-shapes/src/demo/kotlin/DemoRegularPolygon.kt b/orx-shapes/src/jvmDemo/kotlin/DemoRegularPolygon.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoRegularPolygon.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoRegularPolygon.kt diff --git a/orx-shapes/src/demo/kotlin/DemoRegularStar01.kt b/orx-shapes/src/jvmDemo/kotlin/DemoRegularStar01.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoRegularStar01.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoRegularStar01.kt diff --git a/orx-shapes/src/demo/kotlin/DemoRegularStar02.kt b/orx-shapes/src/jvmDemo/kotlin/DemoRegularStar02.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoRegularStar02.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoRegularStar02.kt diff --git a/orx-shapes/src/demo/kotlin/DemoRoundedRectangle.kt b/orx-shapes/src/jvmDemo/kotlin/DemoRoundedRectangle.kt similarity index 100% rename from orx-shapes/src/demo/kotlin/DemoRoundedRectangle.kt rename to orx-shapes/src/jvmDemo/kotlin/DemoRoundedRectangle.kt diff --git a/orx-triangulation/build.gradle.kts b/orx-triangulation/build.gradle.kts index 02702077c..2e509c90e 100644 --- a/orx-triangulation/build.gradle.kts +++ b/orx-triangulation/build.gradle.kts @@ -1,32 +1,8 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { - jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } - compilations.all { - kotlinOptions.jvmTarget = libs.versions.jvmTarget.get() - kotlinOptions.apiVersion = libs.versions.kotlinApi.get() - } - testRuns["test"].executionTask.configure { - useJUnitPlatform() - } - } - js(IR) { - browser() - nodejs() - } - sourceSets { @Suppress("UNUSED_VARIABLE") val commonMain by getting { @@ -37,37 +13,12 @@ kotlin { } } - @Suppress("UNUSED_VARIABLE") - val jvmMain by getting { - } - @Suppress("UNUSED_VARIABLE") val jvmDemo by getting { dependencies { implementation(project(":orx-shapes")) - implementation(project(":orx-triangulation")) implementation(project(":orx-noise")) } } - - @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) - implementation(libs.spek.dsl) - implementation(libs.kluent) - } - } - - @Suppress("UNUSED_VARIABLE") - val jsTest by getting { - dependencies { - implementation(kotlin("test-js")) - } - } } } \ No newline at end of file diff --git a/orx-triangulation/src/demo/kotlin/DemoDelaunay01.kt b/orx-triangulation/src/jvmDemo/kotlin/DemoDelaunay01.kt similarity index 100% rename from orx-triangulation/src/demo/kotlin/DemoDelaunay01.kt rename to orx-triangulation/src/jvmDemo/kotlin/DemoDelaunay01.kt diff --git a/orx-triangulation/src/demo/kotlin/DemoDelaunay02.kt b/orx-triangulation/src/jvmDemo/kotlin/DemoDelaunay02.kt similarity index 100% rename from orx-triangulation/src/demo/kotlin/DemoDelaunay02.kt rename to orx-triangulation/src/jvmDemo/kotlin/DemoDelaunay02.kt diff --git a/orx-triangulation/src/demo/kotlin/DemoVoronoi01.kt b/orx-triangulation/src/jvmDemo/kotlin/DemoVoronoi01.kt similarity index 100% rename from orx-triangulation/src/demo/kotlin/DemoVoronoi01.kt rename to orx-triangulation/src/jvmDemo/kotlin/DemoVoronoi01.kt diff --git a/orx-triangulation/src/demo/kotlin/DemoVoronoi02.kt b/orx-triangulation/src/jvmDemo/kotlin/DemoVoronoi02.kt similarity index 100% rename from orx-triangulation/src/demo/kotlin/DemoVoronoi02.kt rename to orx-triangulation/src/jvmDemo/kotlin/DemoVoronoi02.kt diff --git a/orx-triangulation/src/demo/kotlin/DemoVoronoi03.kt b/orx-triangulation/src/jvmDemo/kotlin/DemoVoronoi03.kt similarity index 100% rename from orx-triangulation/src/demo/kotlin/DemoVoronoi03.kt rename to orx-triangulation/src/jvmDemo/kotlin/DemoVoronoi03.kt diff --git a/orx-view-box/build.gradle.kts b/orx-view-box/build.gradle.kts index 4ef6a00cb..516945ec2 100644 --- a/orx-view-box/build.gradle.kts +++ b/orx-view-box/build.gradle.kts @@ -1,19 +1,9 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-multiplatform` } kotlin { jvm { - @Suppress("UNUSED_VARIABLE") - val demo by compilations.getting { - // TODO: Move demos to /jvmDemo - defaultSourceSet { - kotlin.srcDir("src/demo/kotlin") - } - collectScreenshots { } - } testRuns["test"].executionTask { useJUnitPlatform { includeEngines("spek2") diff --git a/orx-view-box/src/demo/kotlin/DemoProxyProgram01.kt b/orx-view-box/src/jvmDemo/kotlin/DemoProxyProgram01.kt similarity index 100% rename from orx-view-box/src/demo/kotlin/DemoProxyProgram01.kt rename to orx-view-box/src/jvmDemo/kotlin/DemoProxyProgram01.kt diff --git a/orx-view-box/src/demo/kotlin/DemoViewBox01.kt b/orx-view-box/src/jvmDemo/kotlin/DemoViewBox01.kt similarity index 100% rename from orx-view-box/src/demo/kotlin/DemoViewBox01.kt rename to orx-view-box/src/jvmDemo/kotlin/DemoViewBox01.kt