Reimplement collectScreenshots
This commit is contained in:
46
.github/workflows/generate-screenshots.yml
vendored
Normal file
46
.github/workflows/generate-screenshots.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Generate screenshots
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 16
|
||||||
|
- uses: openrndr/setup-opengl@v1.1
|
||||||
|
- name: Test glxinfo
|
||||||
|
run: |
|
||||||
|
echo $LD_LIBRARY_PATH
|
||||||
|
export GALLIUM_DRIVER=swr
|
||||||
|
xvfb-run glxinfo
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gradle-
|
||||||
|
|
||||||
|
- name: Collect screenshots
|
||||||
|
run: xvfb-run ./gradlew collectScreenshots
|
||||||
|
- name: Build main readme
|
||||||
|
run: xvfb-run ./gradlew buildMainReadme
|
||||||
|
- name: Prepare media branch
|
||||||
|
run: |
|
||||||
|
git config --global user.email "actions@openrndr.org"
|
||||||
|
git config --global user.name "OPENRNDR Actions"
|
||||||
|
git reset HEAD -- .
|
||||||
|
(git add README.md && git commit -m "add auto-generated README" && git push origin master) || true
|
||||||
|
(git add [a-z-]*/README.md && git commit -m "add demos to README.md" && git push origin master) || true
|
||||||
|
git checkout --orphan media
|
||||||
|
git reset HEAD -- .
|
||||||
|
git add [a-z-]*/images/*.png
|
||||||
|
git commit -m "add auto-generated media"
|
||||||
|
git push -f origin media
|
||||||
142
build.gradle
142
build.gradle
@@ -12,8 +12,8 @@ buildscript {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// remember to update all the versions here when upgrading kotlin version
|
// remember to update all the versions here when upgrading kotlin version
|
||||||
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
|
id 'org.jetbrains.kotlin.jvm' apply false
|
||||||
id 'org.jetbrains.kotlin.multiplatform' version '1.5.30' apply false
|
id 'org.jetbrains.kotlin.multiplatform' apply false
|
||||||
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.30' apply false
|
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.30' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +32,6 @@ def multiplatformModules = [
|
|||||||
"orx-shader-phrases",
|
"orx-shader-phrases",
|
||||||
"orx-shapes",
|
"orx-shapes",
|
||||||
"orx-quadtree",
|
"orx-quadtree",
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
project.ext {
|
project.ext {
|
||||||
@@ -101,62 +100,6 @@ dokka {
|
|||||||
sourceDirs = files(subprojects.collect { p -> new File(p.projectDir, "/src/main/kotlin") })
|
sourceDirs = files(subprojects.collect { p -> new File(p.projectDir, "/src/main/kotlin") })
|
||||||
}
|
}
|
||||||
|
|
||||||
//allprojects {
|
|
||||||
// apply plugin: 'idea'
|
|
||||||
// apply plugin: 'java'
|
|
||||||
// apply plugin: 'kotlin'
|
|
||||||
// apply plugin: 'nebula.release'
|
|
||||||
//
|
|
||||||
// apply plugin: "com.github.ben-manes.versions"
|
|
||||||
//
|
|
||||||
// group 'org.openrndr.extra'
|
|
||||||
//
|
|
||||||
// repositories {
|
|
||||||
// if (openrndrUseSnapshot) {
|
|
||||||
// mavenLocal()
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// mavenCentral()
|
|
||||||
// jcenter()
|
|
||||||
// maven {
|
|
||||||
// url "https://dl.bintray.com/spekframework/spek"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// dependencies {
|
|
||||||
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
|
||||||
// implementation 'io.github.microutils:kotlin-logging-jvm:2.0.6'
|
|
||||||
// implementation "org.openrndr:openrndr-application:$openrndrVersion"
|
|
||||||
// implementation "org.openrndr:openrndr-shape:$openrndrVersion"
|
|
||||||
// implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.4.3'
|
|
||||||
// testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spekVersion"
|
|
||||||
// testImplementation "org.amshove.kluent:kluent:1.65"
|
|
||||||
// testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
|
|
||||||
// testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spekVersion"
|
|
||||||
// testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
|
|
||||||
// runtimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// java {
|
|
||||||
// sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
// targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
// }
|
|
||||||
// javadoc {
|
|
||||||
// options.addBooleanOption 'Xdoclint:none', true
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// test {
|
|
||||||
// useJUnitPlatform {
|
|
||||||
// includeEngines 'spek2'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|
||||||
// kotlinOptions {
|
|
||||||
// jvmTarget = "1.8"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
task buildMainReadme {
|
task buildMainReadme {
|
||||||
doFirst {
|
doFirst {
|
||||||
def subProjects = project.subprojects
|
def subProjects = project.subprojects
|
||||||
@@ -238,80 +181,9 @@ task buildMainReadme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task collectScreenshots {
|
|
||||||
doFirst {
|
|
||||||
def demoProjects = project.subprojects.findAll { it.sourceSets.hasProperty("demo") }
|
|
||||||
for (sub in demoProjects) {
|
|
||||||
if (sub.name == "openrndr-demos")
|
|
||||||
continue
|
|
||||||
if (sub.name == "orx-rabbit-control")
|
|
||||||
continue
|
|
||||||
if (sub.name == "orx-runway")
|
|
||||||
continue
|
|
||||||
if (sub.name == "orx-chataigne")
|
|
||||||
continue
|
|
||||||
if (sub.name == "orx-video-profiles")
|
|
||||||
continue
|
|
||||||
if (sub.name == "orx-realsense2")
|
|
||||||
continue
|
|
||||||
def set = sub.sourceSets.demo
|
|
||||||
def ucl = new URLClassLoader(set.runtimeClasspath.collect { it.toURI().toURL() } as URL[])
|
|
||||||
|
|
||||||
def runDemos = []
|
|
||||||
|
|
||||||
for (x in set.output) {
|
|
||||||
if (x.exists()) {
|
|
||||||
for (y in x.listFiles()) {
|
|
||||||
def name = y.name
|
|
||||||
if (!name.contains('$') && name.contains(".class")) {
|
|
||||||
def klassName = y.name.replace(".class", "")
|
|
||||||
def klass = ucl.loadClass(klassName)
|
|
||||||
try {
|
|
||||||
def mainMethod = klass.getMethod("main")
|
|
||||||
println "Collecting screenshot for ${klassName}"
|
|
||||||
javaexec {
|
|
||||||
classpath += set.runtimeClasspath
|
|
||||||
classpath += set.compileClasspath
|
|
||||||
def className = y.name.replace(".class", "")
|
|
||||||
main = className
|
|
||||||
jvmArgs += "-DtakeScreenshot=true"
|
|
||||||
jvmArgs += "-DscreenshotPath=${sub.name}/images/${className}.png"
|
|
||||||
jvmArgs += "-Dorg.openrndr.exceptions=JVM"
|
|
||||||
}
|
|
||||||
runDemos.add(klassName)
|
|
||||||
} catch (e) {
|
|
||||||
e.printStackTrace()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runDemos = runDemos.sort()
|
|
||||||
def readme = sub.file("README.md")
|
|
||||||
if (readme.exists()) {
|
|
||||||
def lines = readme.readLines()
|
|
||||||
def screenshotsLine = lines.findIndexOf { it == "<!-- __demos__ -->" }
|
|
||||||
if (screenshotsLine != -1) {
|
|
||||||
lines = lines.subList(0, screenshotsLine)
|
|
||||||
}
|
|
||||||
lines.add("<!-- __demos__ -->")
|
|
||||||
lines.add("## Demos")
|
|
||||||
for (demo in runDemos) {
|
|
||||||
lines.add("### ${demo[0..-3]}")
|
|
||||||
lines.add("[source code](src/demo/kotlin/${demo[0..-3]}.kt)")
|
|
||||||
lines.add("")
|
|
||||||
lines.add("")
|
|
||||||
lines.add("")
|
|
||||||
}
|
|
||||||
readme.delete()
|
|
||||||
readme.write(lines.join("\n"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
configure(allprojects.findAll { !multiplatformModules.contains(it.name) }) {
|
configure(allprojects.findAll { !multiplatformModules.contains(it.name) }) {
|
||||||
apply plugin: 'idea'
|
// apply plugin: 'idea'
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
@@ -360,8 +232,6 @@ configure(allprojects.findAll { !multiplatformModules.contains(it.name) }) {
|
|||||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all {
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all {
|
||||||
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi"]
|
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(allprojects.findAll { it.name != "openrndr-demos" }) {
|
configure(allprojects.findAll { it.name != "openrndr-demos" }) {
|
||||||
@@ -370,6 +240,6 @@ configure(allprojects.findAll { it.name != "openrndr-demos" }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
collectScreenshots.dependsOn {
|
//collectScreenshots.dependsOn {
|
||||||
project.subprojects.findAll { it.sourceSets.hasProperty("demo") }.collect { it.tasks.demoClasses }
|
// project.subprojects.findAll { it.sourceSets.hasProperty("demo") }.collect { it.tasks.demoClasses }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ plugins {
|
|||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30")
|
||||||
}
|
}
|
||||||
|
|||||||
90
buildSrc/src/main/kotlin/orx.collect-screenshots.gradle.kts
Normal file
90
buildSrc/src/main/kotlin/orx.collect-screenshots.gradle.kts
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmCompilation
|
||||||
|
import java.net.URLClassLoader
|
||||||
|
|
||||||
|
abstract class CollectScreenshotsTask @Inject constructor() : DefaultTask() {
|
||||||
|
@get:Incremental
|
||||||
|
@get:PathSensitive(PathSensitivity.NAME_ONLY)
|
||||||
|
@get:InputDirectory
|
||||||
|
abstract val inputDir: DirectoryProperty
|
||||||
|
|
||||||
|
@get:Input
|
||||||
|
abstract val runtimeDependencies: Property<FileCollection>
|
||||||
|
|
||||||
|
@get:OutputDirectory
|
||||||
|
abstract val outputDir: DirectoryProperty
|
||||||
|
|
||||||
|
@get:Input
|
||||||
|
abstract val ignore: ListProperty<String>
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
ignore.set(emptyList())
|
||||||
|
}
|
||||||
|
@TaskAction
|
||||||
|
fun execute(inputChanges: InputChanges) {
|
||||||
|
inputChanges.getFileChanges(inputDir).forEach { change ->
|
||||||
|
if (change.fileType == FileType.DIRECTORY) return@forEach
|
||||||
|
if (change.file.extension == "class" && !(change.file.name.contains("$"))) {
|
||||||
|
val klassName = change.file.nameWithoutExtension
|
||||||
|
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}")
|
||||||
|
|
||||||
|
val mainMethod = klass.getMethod("main")
|
||||||
|
println(mainMethod)
|
||||||
|
project.javaexec {
|
||||||
|
this.classpath += project.files(inputDir.get().asFile)
|
||||||
|
this.classpath += runtimeDependencies.get()
|
||||||
|
this.mainClass.set(klassName)
|
||||||
|
this.workingDir(project.rootProject.projectDir)
|
||||||
|
jvmArgs("-DtakeScreenshot=true", "-DscreenshotPath=${outputDir.get().asFile}/$klassName.png")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// this is only executed if there are chances in the inputDir
|
||||||
|
val runDemos = outputDir.get().asFile.listFiles { file: File ->
|
||||||
|
file.extension == "png"
|
||||||
|
}.map { it.nameWithoutExtension }
|
||||||
|
val readme = File(project.projectDir, "README.md")
|
||||||
|
if (readme.exists()) {
|
||||||
|
var lines = readme.readLines().toMutableList()
|
||||||
|
val screenshotsLine = lines.indexOfFirst { it == "<!-- __demos__ -->" }
|
||||||
|
if (screenshotsLine != -1) {
|
||||||
|
lines = lines.subList(0, screenshotsLine)
|
||||||
|
}
|
||||||
|
lines.add("<!-- __demos__ -->")
|
||||||
|
lines.add("## Demos")
|
||||||
|
for (demo in runDemos) {
|
||||||
|
lines.add("### ${demo.dropLast(2)}")
|
||||||
|
lines.add("[source code](src/demo/kotlin/${demo.dropLast(2)}.kt)")
|
||||||
|
lines.add("")
|
||||||
|
lines.add("")
|
||||||
|
lines.add("")
|
||||||
|
}
|
||||||
|
readme.delete()
|
||||||
|
readme.writeText(lines.joinToString("\n"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object ScreenshotsHelper {
|
||||||
|
fun KotlinJvmCompilation.collectScreenshots(config: CollectScreenshotsTask.() -> Unit): CollectScreenshotsTask {
|
||||||
|
val task = this.project.tasks.register<CollectScreenshotsTask>("collectScreenshots").get()
|
||||||
|
task.outputDir.set(project.file(project.projectDir.toString() + "/images"))
|
||||||
|
task.inputDir.set(output.classesDirs.first())
|
||||||
|
task.runtimeDependencies.set(runtimeDependencyFiles)
|
||||||
|
task.config()
|
||||||
|
return task
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -79,16 +79,6 @@ Two color spaces are added: `ColorHSLUVa` and `ColorHPLUVa`, they are an impleme
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
### DemoHSLUV01
|
|
||||||
[source code](src/demo/kotlin/DemoHSLUV01.kt)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### DemoHSLUV02
|
|
||||||
[source code](src/demo/kotlin/DemoHSLUV02.kt)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### DemoHistogram01
|
### DemoHistogram01
|
||||||
[source code](src/demo/kotlin/DemoHistogram01.kt)
|
[source code](src/demo/kotlin/DemoHistogram01.kt)
|
||||||
|
|
||||||
@@ -104,6 +94,16 @@ Two color spaces are added: `ColorHSLUVa` and `ColorHPLUVa`, they are an impleme
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### DemoHSLUV01
|
||||||
|
[source code](src/demo/kotlin/DemoHSLUV01.kt)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### DemoHSLUV02
|
||||||
|
[source code](src/demo/kotlin/DemoHSLUV02.kt)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### DemoXSLUV01
|
### DemoXSLUV01
|
||||||
[source code](src/demo/kotlin/DemoXSLUV01.kt)
|
[source code](src/demo/kotlin/DemoXSLUV01.kt)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import Orx_embed_shaders_gradle.EmbedShadersTask
|
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
id("orx.embed-shaders")
|
id("orx.collect-screenshots")
|
||||||
}
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion: String by rootProject.extra
|
val kotlinxSerializationVersion: String by rootProject.extra
|
||||||
@@ -36,6 +36,7 @@ kotlin {
|
|||||||
runtimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
runtimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||||
implementation(compilations["main"]!!.output.allOutputs)
|
implementation(compilations["main"]!!.output.allOutputs)
|
||||||
}
|
}
|
||||||
|
collectScreenshots { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.all {
|
compilations.all {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
|
id("orx.collect-screenshots")
|
||||||
}
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion: String by rootProject.extra
|
val kotlinxSerializationVersion: String by rootProject.extra
|
||||||
@@ -31,6 +34,8 @@ kotlin {
|
|||||||
implementation(compilations["main"]!!.output.allOutputs)
|
implementation(compilations["main"]!!.output.allOutputs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
collectScreenshots {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.all {
|
compilations.all {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import Orx_embed_shaders_gradle.EmbedShadersTask
|
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
id("orx.embed-shaders")
|
id("orx.collect-screenshots")
|
||||||
}
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion: String by rootProject.extra
|
val kotlinxSerializationVersion: String by rootProject.extra
|
||||||
@@ -33,6 +33,8 @@ kotlin {
|
|||||||
implementation(compilations["main"]!!.output.allOutputs)
|
implementation(compilations["main"]!!.output.allOutputs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
collectScreenshots {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.all {
|
compilations.all {
|
||||||
|
|||||||
@@ -106,17 +106,7 @@ All distortion effects are opacity preserving
|
|||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### DemoFluidDistort01
|
### DemoFluidDistort01
|
||||||
[source code](src/demo/kotlin/DemoFluidDistort01.kt)
|
[source code](src/demo/kotlin/DemoFluidDistort01.kt)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### DemoLaserBlur01
|
|
||||||
[source code](src/demo/kotlin/DemoLaserBlur01.kt)
|
|
||||||
|
|
||||||

|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
|
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
|
||||||
import Orx_embed_shaders_gradle.EmbedShadersTask
|
import Orx_embed_shaders_gradle.EmbedShadersTask
|
||||||
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
id("orx.embed-shaders")
|
id("orx.embed-shaders")
|
||||||
|
id("orx.collect-screenshots")
|
||||||
}
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion: String by rootProject.extra
|
val kotlinxSerializationVersion: String by rootProject.extra
|
||||||
@@ -42,6 +45,10 @@ kotlin {
|
|||||||
implementation(compilations["main"]!!.output.allOutputs)
|
implementation(compilations["main"]!!.output.allOutputs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
collectScreenshots {
|
||||||
|
ignore.set(listOf("DemoBlur01"))
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.all {
|
compilations.all {
|
||||||
@@ -111,11 +118,4 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//tasks.getByName("compileKotlinJvm").dependsOn(embedShaders)
|
|
||||||
//tasks.getByName("compileKotlinJs").dependsOn(embedShaders)
|
|
||||||
//tasks.getByName("compileKotlinMetadata").dependsOn(embedShaders)
|
|
||||||
//tasks.getByName("jvmSourcesJar").dependsOn(embedShaders)
|
|
||||||
//tasks.getByName("sourcesJar").dependsOn(embedShaders)
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
package org.openrndr.extra.fx.demo
|
|
||||||
|
|
||||||
import org.openrndr.application
|
import org.openrndr.application
|
||||||
import org.openrndr.extra.fx.blend.*
|
import org.openrndr.extra.fx.blend.*
|
||||||
fun main() {
|
fun main() {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import Orx_embed_shaders_gradle.EmbedShadersTask
|
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
id("orx.embed-shaders")
|
id("orx.collect-screenshots")
|
||||||
}
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion: String by rootProject.extra
|
val kotlinxSerializationVersion: String by rootProject.extra
|
||||||
@@ -34,6 +34,9 @@ kotlin {
|
|||||||
implementation(compilations["main"]!!.output.allOutputs)
|
implementation(compilations["main"]!!.output.allOutputs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
collectScreenshots {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.all {
|
compilations.all {
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import Orx_embed_shaders_gradle.EmbedShadersTask
|
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
id("orx.embed-shaders")
|
id("orx.embed-shaders")
|
||||||
|
id("orx.collect-screenshots")
|
||||||
}
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion: String by rootProject.extra
|
val kotlinxSerializationVersion: String by rootProject.extra
|
||||||
@@ -32,6 +33,7 @@ kotlin {
|
|||||||
runtimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
runtimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||||
implementation(compilations["main"]!!.output.allOutputs)
|
implementation(compilations["main"]!!.output.allOutputs)
|
||||||
}
|
}
|
||||||
|
collectScreenshots { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,6 +65,7 @@ kotlin {
|
|||||||
implementation("io.github.microutils:kotlin-logging:$kotlinLoggingVersion")
|
implementation("io.github.microutils:kotlin-logging:$kotlinLoggingVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_VARIABLE")
|
@Suppress("UNUSED_VARIABLE")
|
||||||
val commonTest by getting {
|
val commonTest by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -24,6 +24,31 @@ Collection of 2D shape generators (polygon, star, rounded rectangle) and shape m
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### DemoBezierPatch05
|
||||||
|
[source code](src/demo/kotlin/DemoBezierPatch05.kt)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### DemoBezierPatchDrawer01
|
||||||
|
[source code](src/demo/kotlin/DemoBezierPatchDrawer01.kt)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### DemoBezierPatchDrawer02
|
||||||
|
[source code](src/demo/kotlin/DemoBezierPatchDrawer02.kt)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### DemoBezierPatchDrawer03
|
||||||
|
[source code](src/demo/kotlin/DemoBezierPatchDrawer03.kt)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### DemoBezierPatches01
|
||||||
|
[source code](src/demo/kotlin/DemoBezierPatches01.kt)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### DemoRectangleGrid
|
### DemoRectangleGrid
|
||||||
[source code](src/demo/kotlin/DemoRectangleGrid.kt)
|
[source code](src/demo/kotlin/DemoRectangleGrid.kt)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import Orx_embed_shaders_gradle.EmbedShadersTask
|
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
id("orx.embed-shaders")
|
id("orx.collect-screenshots")
|
||||||
}
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion: String by rootProject.extra
|
val kotlinxSerializationVersion: String by rootProject.extra
|
||||||
@@ -34,6 +33,9 @@ kotlin {
|
|||||||
implementation(compilations["main"]!!.output.allOutputs)
|
implementation(compilations["main"]!!.output.allOutputs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
collectScreenshots {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.all {
|
compilations.all {
|
||||||
|
|||||||
Reference in New Issue
Block a user