From 5fe2d30f80ae9302d9c11727d0ca105d9c224034 Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Tue, 4 Apr 2023 20:50:41 +0200 Subject: [PATCH] Add collectScreenshots task to kotlin-jvm convention --- .../extra/convention/kotlin-jvm.gradle.kts | 8 ++++-- .../src/demo/kotlin/DemoAnimation02.kt | 25 ------------------- orx-jvm/orx-boofcv/build.gradle.kts | 7 ------ orx-jvm/orx-gui/build.gradle.kts | 5 ---- orx-jvm/orx-panel/build.gradle.kts | 6 ----- orx-jvm/orx-poisson-fill/build.gradle.kts | 7 ------ 6 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 openrndr-demos/src/demo/kotlin/DemoAnimation02.kt 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 f9c38731..118eb9f7 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 @@ -1,9 +1,9 @@ package org.openrndr.extra.convention +import ScreenshotsHelper.collectScreenshots import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -import java.net.URI val libs = the() @@ -33,7 +33,11 @@ group = "org.openrndr.extra" val main: SourceSet by sourceSets.getting @Suppress("UNUSED_VARIABLE") -val demo: SourceSet by sourceSets.creating +val demo: SourceSet by sourceSets.creating { + if (name != "openrndr-demos") { + collectScreenshots(project, this@creating) { } + } +} dependencies { implementation(libs.kotlin.stdlib) diff --git a/openrndr-demos/src/demo/kotlin/DemoAnimation02.kt b/openrndr-demos/src/demo/kotlin/DemoAnimation02.kt deleted file mode 100644 index 55ae183b..00000000 --- a/openrndr-demos/src/demo/kotlin/DemoAnimation02.kt +++ /dev/null @@ -1,25 +0,0 @@ -import org.openrndr.animatable.Animatable -import org.openrndr.animatable.easing.Easing -import org.openrndr.application -import org.openrndr.math.Vector2 -import org.openrndr.shape.contour - -fun main() = application { - program { - val a = object { - var x = 0.0 - } - - animate { - updateAnimation() - a::x.animate(1000.0, 5000, Easing.CubicInOut) - a::x.complete() - a::x.animate(0.0, 5000, Easing.CubicInOut) - - } - extend { - drawer.circle(a.x, height/2.0, 40.0) - } - - } -} \ No newline at end of file diff --git a/orx-jvm/orx-boofcv/build.gradle.kts b/orx-jvm/orx-boofcv/build.gradle.kts index 8441decd..c572c3c9 100644 --- a/orx-jvm/orx-boofcv/build.gradle.kts +++ b/orx-jvm/orx-boofcv/build.gradle.kts @@ -1,14 +1,7 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-jvm` } -sourceSets { - val demo by getting - collectScreenshots(project, demo) { } -} - dependencies { implementation(libs.openrndr.application) implementation(libs.openrndr.math) diff --git a/orx-jvm/orx-gui/build.gradle.kts b/orx-jvm/orx-gui/build.gradle.kts index ef2bbb85..e818fdc1 100644 --- a/orx-jvm/orx-gui/build.gradle.kts +++ b/orx-jvm/orx-gui/build.gradle.kts @@ -4,11 +4,6 @@ plugins { org.openrndr.extra.convention.`kotlin-jvm` } -sourceSets { - val demo by getting - collectScreenshots(project, demo) { } -} - dependencies { api(project(":orx-parameters")) api(project(":orx-jvm:orx-panel")) diff --git a/orx-jvm/orx-panel/build.gradle.kts b/orx-jvm/orx-panel/build.gradle.kts index df7a35c0..685adba7 100644 --- a/orx-jvm/orx-panel/build.gradle.kts +++ b/orx-jvm/orx-panel/build.gradle.kts @@ -1,4 +1,3 @@ -import ScreenshotsHelper.collectScreenshots import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { @@ -15,11 +14,6 @@ tasks.test { } } -sourceSets { - val demo by getting - collectScreenshots(project, demo) { } -} - dependencies { implementation(libs.openrndr.application) implementation(libs.openrndr.math) diff --git a/orx-jvm/orx-poisson-fill/build.gradle.kts b/orx-jvm/orx-poisson-fill/build.gradle.kts index 5f7edf5a..1697d7a2 100644 --- a/orx-jvm/orx-poisson-fill/build.gradle.kts +++ b/orx-jvm/orx-poisson-fill/build.gradle.kts @@ -1,14 +1,7 @@ -import ScreenshotsHelper.collectScreenshots - plugins { org.openrndr.extra.convention.`kotlin-jvm` } -sourceSets { - val demo by getting - collectScreenshots(project, demo) { } -} - dependencies { implementation(libs.openrndr.application) implementation(libs.openrndr.math)