Convert orx-shader-phrases and orx-noise to MPP

This commit is contained in:
Edwin Jakobs
2021-06-24 13:31:27 +02:00
parent 6a45db4491
commit 1cf5c825d6
69 changed files with 813 additions and 741 deletions

View File

@@ -2,16 +2,37 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
classpath "com.netflix.nebula:nebula-release-plugin:15.1.0"
classpath "com.github.ben-manes:gradle-versions-plugin:0.28.0"
classpath "com.netflix.nebula:nebula-release-plugin:15.3.1"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.5.0'
// remember to update all the versions here when upgrading kotlin version
id 'org.jetbrains.kotlin.jvm' version '1.5.10' apply false
id 'org.jetbrains.kotlin.multiplatform' version '1.5.10' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.10' apply false
}
def multiplatformModules = [
"orx-noise",
"orx-shader-phrases"
]
project.ext {
kotlinApiVersion = '1.4'
kotlinLanguageVersion = '1.4'
kotlinVersion = '1.5.10'
kotlinLoggingVersion = '2.0.8'
kotlinxSerializationVersion = '1.1.0'
spekVersion = '2.0.15'
kluentVersion = '1.65'
jsoupVersion = '1.13.1'
kotestVersion = '4.4.3'
junitJupiterVersion = '5.7.1'
}
def openrndrUseSnapshot = true
@@ -22,7 +43,9 @@ ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
project.ext {
openrndrVersion = openrndrUseSnapshot? "0.5.1-SNAPSHOT" : "0.4.0"
kotlinVersion = "1.5.0"
jvmTarget = "1.8"
kotlinVersion = "1.5.10"
kotlinApiVersion = "1.4"
spekVersion = "2.0.15"
libfreenectVersion = "0.5.7-1.5.5"
librealsense2Version = "2.40.0-1.5.5"
@@ -32,6 +55,19 @@ project.ext {
mklDnnVersion = "0.21.5-1.5.5"
}
allprojects {
group 'org.openrndr'
repositories {
mavenCentral()
if (openrndrUseSnapshot) {
mavenLocal()
}
maven {
url = "https://maven.openrndr.org"
}
}
}
switch (org.gradle.internal.os.OperatingSystem.current()) {
case org.gradle.internal.os.OperatingSystem.WINDOWS:
project.ext.openrndrOS = "windows"
@@ -52,61 +88,61 @@ dokka {
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"
}
}
}
//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 {
doFirst {
@@ -250,76 +286,63 @@ task collectScreenshots {
}
}
configure(allprojects.findAll { it.name != "openrndr-demos" }) {
apply plugin: 'nebula.release'
configure(allprojects.findAll { !multiplatformModules.contains(it.name) }) {
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'signing'
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
maven(MavenPublication) {
from components.java
groupId = "org.openrndr.extra"
artifactId = "$project.name"
description = "$project.name"
pom {
name = "$project.name"
description = "$project.name"
url = 'http://openrndr.org'
developers {
developer {
id = 'edwinjakobs'
name = 'Edwin Jakobs'
email = 'edwin@openrndr.org'
}
}
license {
licenses {
license {
name = 'BSD-2-Clause'
url = 'https://github.com/openrndr/openrndr/blob/master/LICENSE'
distribution = 'repo'
}
}
}
scm {
connection = "scm:git:git@github.com:openrndr/openrndr.git"
developerConnection = "scm:git:ssh://github.com/openrndr/openrndr.git"
url = "https://github.com/openrndr/openrndr"
}
}
}
}
repositories {
maven {
credentials {
username findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")
password findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")
}
if (!isReleaseVersion) {
url "https://s01.oss.sonatype.org/content/repositories/snapshots"
} else {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
}
}
}
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
sign publishing.publications.mavenJava
}
}
configure(subprojects) {
dependencies {
// Note: kotlin-logging and kotlinx-coroutines-core are loaded
// too early and their versions cannot be parametrized
implementation 'io.github.microutils:kotlin-logging:2.0.6'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "org.openrndr:openrndr-application:$openrndrVersion"
implementation "org.openrndr:openrndr-math:$openrndrVersion"
testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spekVersion"
testImplementation "org.amshove.kluent:kluent:$kluentVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spekVersion"
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
}
test {
useJUnitPlatform {
includeEngines 'spek2'
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
javadoc {
options.addBooleanOption 'Xdoclint:none', true
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all {
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi"]
}
}
configure(allprojects.findAll { it.name != "openrndr-demos" }) {
apply plugin: 'maven-publish'
apply plugin: 'nebula.release'
}