Reduce duplication in orx build scripts. (#240)

Co-authored-by: hamoid <abe@hamoid.com>
This commit is contained in:
Vechro
2022-06-19 09:06:16 +03:00
committed by GitHub
parent 88719292e9
commit 9f7a4899fa
74 changed files with 646 additions and 812 deletions

View File

@@ -1,3 +1,4 @@
// root build.gradle
buildscript {
repositories {
mavenCentral()
@@ -12,7 +13,6 @@ plugins {
// remember to update all the versions here when upgrading kotlin version
id 'org.jetbrains.kotlin.jvm' apply false
id 'org.jetbrains.kotlin.multiplatform' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.20' apply false
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}
@@ -39,44 +39,12 @@ def multiplatformModules = [
def doNotPublish = ["openrndr-demos"]
project.ext {
kotlinApiVersion = '1.6'
kotlinLanguageVersion = '1.6'
kotlinVersion = '1.6.20'
kotlinxCoroutinesVersion = '1.6.0'
kotlinLoggingVersion = '2.1.21'
kotlinxSerializationVersion = '1.3.2'
spekVersion = '2.0.15'
kluentVersion = '1.68'
jsoupVersion = '1.14.3'
kotestVersion = '5.2.1'
junitJupiterVersion = '5.8.2'
slf4jVersion = '1.7.36'
}
apply plugin: 'org.jetbrains.dokka'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
def openrndrUseSnapshot = isReleaseVersion
project.ext {
openrndrVersion = ((findProperty("OPENRNDR.version")?:System.getenv("OPENRNDR_VERSION")) ?.replace("v","")) ?: "0.5.1-SNAPSHOT"
jvmTarget = "1.8"
kotlinVersion = "1.6.20"
kotlinApiVersion = "1.6"
spekVersion = "2.0.15"
libfreenectVersion = "0.5.7-1.5.7"
librealsense2Version = "2.50.0-1.5.7"
gsonVersion = "2.9.0"
antlrVersion = "4.9.3"
tensorflowVersion = "0.4.0"
mklDnnVersion = "0.21.5-1.5.7"
}
allprojects {
group 'org.openrndr.extra'
repositories {
@@ -91,18 +59,6 @@ allprojects {
}
switch (org.gradle.internal.os.OperatingSystem.current()) {
case org.gradle.internal.os.OperatingSystem.WINDOWS:
project.ext.openrndrOS = "windows"
break
case org.gradle.internal.os.OperatingSystem.LINUX:
project.ext.openrndrOS = "linux-x64"
break
case org.gradle.internal.os.OperatingSystem.MAC_OS:
project.ext.openrndrOS = "macos"
break
}
dokka {
moduleName = "$rootProject.name"
outputDirectory = "$buildDir/docs"
@@ -192,6 +148,7 @@ task buildMainReadme {
}
}
// publishable && multiplatform
configure(allprojects.findAll { !doNotPublish.contains(it.name) && (multiplatformModules.contains(it.name)) }) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
@@ -258,6 +215,7 @@ configure(allprojects.findAll { !doNotPublish.contains(it.name) && (multiplatfor
}
// publishable && JVM only
configure(allprojects.findAll { !doNotPublish.contains(it.name) && !multiplatformModules.contains(it.name) }) {
// apply plugin: 'idea'
apply plugin: 'java'
@@ -328,18 +286,16 @@ configure(allprojects.findAll { !doNotPublish.contains(it.name) && !multiplatfor
}
dependencies {
implementation 'io.github.microutils:kotlin-logging:2.1.10'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion"
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"
implementation libs.kotlin.logging
implementation libs.kotlin.coroutines
implementation libs.kotlin.stdlib
implementation libs.openrndr.application
implementation libs.openrndr.math
testImplementation libs.spek.dsl
testImplementation libs.kluent
testImplementation libs.kotlin.test
testRuntimeOnly libs.spek.junit5
testRuntimeOnly libs.kotlin.reflect
}