Fix gradle files to be future proof

This commit is contained in:
Edwin Jakobs
2020-02-26 19:29:22 +01:00
parent f534f47077
commit c55f32915d
21 changed files with 103 additions and 58 deletions

View File

@@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
classpath "com.netflix.nebula:nebula-kotlin-plugin:1.3.61"
classpath "com.netflix.nebula:nebula-publishing-plugin:17.0.5"
@@ -13,17 +12,7 @@ buildscript {
}
}
//allprojects {
// group 'org.openrndr.extra'
// version '0.0.30'
//}
//
//repositories {
// mavenLocal()
// mavenCentral()
//}
apply plugin: 'org.jetbrains.dokka'
project.ext {
openrndrVersion = "0.3.39"
@@ -34,6 +23,15 @@ project.ext {
gsonVersion = "2.8.6"
}
dokka {
moduleName = "$rootProject.name"
outputDirectory = "$buildDir/docs"
outputFormat = "html"
includes = ['Module.md']
sourceDirs = files(subprojects.collect { p -> new File(p.projectDir, "/src/main/kotlin") })
}
allprojects {
apply plugin: 'idea'
apply plugin: 'java'
@@ -43,17 +41,10 @@ allprojects {
apply plugin: 'nebula.release'
apply plugin: 'nebula.maven-publish'
apply plugin: 'nebula.nebula-bintray-publishing'
apply plugin: 'nebula.source-jar'
apply plugin: 'nebula.javadoc-jar'
apply plugin: 'nebula.nebula-bintray-publishing'
// selectively apply only the bintray plugin, snapshots are not published
// nebula-bintray needs to happened after nebula-release since version isn't lazy in the bintray extension
apply plugin: 'nebula.nebula-bintray-publishing'
apply plugin: 'nebula.source-jar'
group 'org.openrndr.extra'
repositories {
@@ -82,6 +73,17 @@ allprojects {
runtimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
javadoc {
options.addBooleanOption 'Xdoclint:none', true
}
contacts {
'edwin@openrndr.org' {
moniker 'Edwin Jakobs'
@@ -98,10 +100,10 @@ allprojects {
gppSign = false
syncToMavenCentral = false
licenses = ['BSD-2-Clause']
vcsUrl = 'https://github.com/openrndr/openrndr-panel.git'
vcsUrl = 'https://github.com/openrndr/orx.git'
websiteUrl = 'https://www.openrndr.org'
issueTrackerUrl = 'https://github.com/openrndr/openrndr-panel/issues'
labels = ['creative-coding', 'realtime-rendering', 'opengl', 'gui']
issueTrackerUrl = 'https://github.com/openrndr/orx/issues'
labels = ['creative-coding', 'realtime-rendering', 'opengl']
}

View File

@@ -1,3 +1,3 @@
dependencies {
compile project(":orx-parameters")
api project(":orx-parameters")
}

View File

@@ -1,3 +1,3 @@
dependencies {
compile project(":orx-parameters")
api project(":orx-parameters")
}

View File

@@ -1,6 +1,6 @@
dependencies {
compile project(":orx-parameters")
compile "org.openrndr.panel:openrndr-panel:$panelVersion"
compile "org.openrndr:openrndr-dialogs:$openrndrVersion"
compile "com.google.code.gson:gson:$gsonVersion"
api project(":orx-parameters")
api "org.openrndr.panel:openrndr-panel:$panelVersion"
implementation "org.openrndr:openrndr-dialogs:$openrndrVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
}

View File

@@ -1,3 +1,3 @@
dependencies {
compile project(":orx-fx")
implementation project(":orx-fx")
}

View File

@@ -1,3 +1,3 @@
dependencies {
compile project(":orx-fx")
implementation project(":orx-fx")
}

View File

@@ -5,9 +5,9 @@ else if (os.macOsX) { openrndrOs = "macos" }
else if (os.linux) { openrndrOs = "linux-x64" }
dependencies {
compile project(":orx-kinect-v1")
runtime project(":orx-kinect-v1-natives-$openrndrOs")
runtime "org.openrndr:openrndr-gl3:$openrndrVersion"
runtime "org.openrndr:openrndr-gl3-natives-$openrndrOs:$openrndrVersion"
runtime "ch.qos.logback:logback-classic:1.2.3"
implementation project(":orx-kinect-v1")
runtimeOnly project(":orx-kinect-v1-natives-$openrndrOs")
runtimeOnly "org.openrndr:openrndr-gl3:$openrndrVersion"
runtimeOnly "org.openrndr:openrndr-gl3-natives-$openrndrOs:$openrndrVersion"
runtimeOnly "ch.qos.logback:logback-classic:1.2.3"
}

View File

@@ -1,3 +1,3 @@
dependencies {
runtime "org.bytedeco:libfreenect:$libfreenectVersion:linux-arm64"
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:linux-arm64"
}

View File

@@ -1,3 +1,3 @@
dependencies {
runtime "org.bytedeco:libfreenect:$libfreenectVersion:linux-x86_64"
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:linux-x86_64"
}

View File

@@ -1,3 +1,3 @@
dependencies {
runtime "org.bytedeco:libfreenect:$libfreenectVersion:macosx-x86_64"
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:macosx-x86_64"
}

View File

@@ -1,3 +1,3 @@
dependencies {
runtime "org.bytedeco:libfreenect:$libfreenectVersion:windows-x86_64"
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:windows-x86_64"
}

View File

@@ -1,5 +1,5 @@
dependencies {
compile project(":orx-kinect-common")
compile "io.github.microutils:kotlin-logging:1.7.2"
compile "org.bytedeco:libfreenect:$libfreenectVersion"
api project(":orx-kinect-common")
implementation "io.github.microutils:kotlin-logging:1.7.2"
api "org.bytedeco:libfreenect:$libfreenectVersion"
}

View File

@@ -6,7 +6,7 @@ Live coding extension for OPENRNDR
make sure that you add the following to your list of dependencies (next to orx-olive)
```
compile "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.31"
implementation "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.31"
```
Then a simple live setup can created as follows:

View File

@@ -1,15 +1,15 @@
dependencies {
compile project(":orx-file-watcher")
implementation project(":orx-file-watcher")
// -- JSR 223, old style script loader
compile "org.jetbrains.kotlin:kotlin-scripting-jsr223:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-scripting-jsr223:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-scripting-jvm-host-embeddable:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-scripting-common:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-compiler:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-scripting-jvm-host-embeddable:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-scripting-common:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-compiler:$kotlinVersion"
// compile "org.jetbrains.kotlin:kotlin-script-util:$kotlinVersion"
// compile "org.jetbrains.kotlin:kotlin-main-kts:$kotlinVersion"
// compile "org.jetbrains.kotlin:kotlin-scripting-dependencies:$kotlinVersion"

View File

@@ -1,5 +1,5 @@
dependencies {
def withoutSlf4j = { exclude group: 'org.slf4j' }
compile "com.illposed.osc:javaosc-core:0.6", withoutSlf4j
implementation "com.illposed.osc:javaosc-core:0.6", withoutSlf4j
}

View File

@@ -1,5 +1,5 @@
dependencies {
compile "com.google.code.gson:gson:$gsonVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
implementation project(":orx-noise")
}

View File

@@ -1,3 +1,3 @@
dependencies {
compile project(":orx-fx")
implementation project(":orx-fx")
}

View File

@@ -120,4 +120,15 @@ internal class ConvolutionPyramid(width: Int, height: Int,
passthrough.padding = 0
return result
}
fun destroy() {
result.destroy()
(levelsIn+levelsOut).forEach {
it.colorBuffers.forEach { it.destroy() }
it.detachColorBuffers()
it.destroy()
}
}
}

View File

@@ -6,7 +6,7 @@ import org.openrndr.resourceUrl
internal class FillBoundary : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/fill-boundary.frag")))
internal class FillCombine : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/fill-combine.frag")))
class PoissonFiller(width: Int, height: Int, type: ColorType = ColorType.FLOAT32) {
class PoissonFiller(val width: Int, val height: Int, type: ColorType = ColorType.FLOAT32) {
private val pyramid = ConvolutionPyramid(width, height, 0, type = type)
private val preproc = colorBuffer(width, height, type = type)
private val combined = colorBuffer(width, height, type = type)
@@ -29,4 +29,36 @@ class PoissonFiller(width: Int, height: Int, type: ColorType = ColorType.FLOAT32
fillCombine.apply(arrayOf(result, input), arrayOf(combined))
return combined
}
fun destroy() {
preproc.destroy()
combined.destroy()
}
}
class PoissonFill : Filter() {
private var filler: PoissonFiller? = null
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>) {
if (target.isNotEmpty()) {
filler?.let {
if (it.width != target[0].width || it.height != target[0].height) {
it.destroy()
filler = null
}
}
if (filler == null) {
filler = PoissonFiller(target[0].width, target[0].height)
}
filler?.let {
val result = it.process(source[0])
result.copyTo(target[0])
}
}
}
}

View File

@@ -1,3 +1,3 @@
dependencies {
compile "com.google.code.gson:gson:$gsonVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
}

View File

@@ -1,4 +1,4 @@
dependencies {
compile project(":orx-noise")
compile project(":orx-fx")
implementation project(":orx-noise")
implementation project(":orx-fx")
}