Browse Source

Use Kotlin 1.7.10 and target JVM 11

master
vechro 2 years ago
committed by Edwin Jakobs
parent
commit
fd6333e264
  1. 22
      build.gradle.kts
  2. 4
      settings.gradle.kts

22
build.gradle.kts

@ -1,8 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.jetbrains.kotlin.utils.addToStdlib.ifTrue import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "org.openrndr.template" group = "org.openrndr.template"
version = "0.4.0" version = "0.4.0"
@ -10,7 +9,7 @@ version = "0.4.0"
val applicationMainClass = "TemplateProgramKt" val applicationMainClass = "TemplateProgramKt"
/** ## additional ORX features to be added to this project */ /** ## additional ORX features to be added to this project */
val orxFeatures = setOf( val orxFeatures = setOf<String>(
// "orx-boofcv", // "orx-boofcv",
// "orx-camera", // "orx-camera",
// "orx-chataigne", // "orx-chataigne",
@ -58,8 +57,7 @@ val orxFeatures = setOf(
// "orx-timer", // "orx-timer",
// "orx-triangulation", // "orx-triangulation",
// "orx-video-profiles", // "orx-video-profiles",
null )
).filterNotNull()
/** ## additional ORML features to be added to this project */ /** ## additional ORML features to be added to this project */
val ormlFeatures = setOf<String>( val ormlFeatures = setOf<String>(
@ -71,7 +69,7 @@ val ormlFeatures = setOf<String>(
// "orml-ssd", // "orml-ssd",
// "orml-style-transfer", // "orml-style-transfer",
// "orml-super-resolution", // "orml-super-resolution",
// "orml-u2net" // "orml-u2net",
) )
/** ## additional OPENRNDR features to be added to this project */ /** ## additional OPENRNDR features to be added to this project */
@ -86,6 +84,7 @@ val applicationLogging = Logging.FULL
// ------------------------------------------------------------------------------------------------------------------ // // ------------------------------------------------------------------------------------------------------------------ //
@Suppress("DSL_SCOPE_VIOLATION")
plugins { plugins {
java java
alias(libs.plugins.kotlin.jvm) alias(libs.plugins.kotlin.jvm)
@ -126,11 +125,12 @@ dependencies {
// ------------------------------------------------------------------------------------------------------------------ // // ------------------------------------------------------------------------------------------------------------------ //
configure<JavaPluginConvention> { java {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
} }
tasks.withType<KotlinCompile> { tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "11"
} }
// ------------------------------------------------------------------------------------------------------------------ // // ------------------------------------------------------------------------------------------------------------------ //
@ -238,7 +238,9 @@ class Openrndr {
init { init {
repositories { repositories {
listOf(openrndrVersion, orxVersion, ormlVersion).any { it.contains("SNAPSHOT") }.ifTrue { mavenLocal() } if (listOf(openrndrVersion, orxVersion, ormlVersion).any { "SNAPSHOT" in it }) {
mavenLocal()
}
maven(url = "https://maven.openrndr.org") maven(url = "https://maven.openrndr.org")
} }
dependencies { dependencies {

4
settings.gradle.kts

@ -8,12 +8,12 @@ val ormlUseSnapshot = true
dependencyResolutionManagement { dependencyResolutionManagement {
versionCatalogs { versionCatalogs {
create("libs") { create("libs") {
version("kotlin", "1.6.21") version("kotlin", "1.7.10")
version("openrndr", if (openrndrUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.0") version("openrndr", if (openrndrUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.0")
version("orx", if (orxUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.0-1") version("orx", if (orxUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.0-1")
version("orml", if (ormlUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.0") version("orml", if (ormlUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.0")
plugin("kotlin-jvm", "org.jetbrains.kotlin.jvm").version("1.6.21") plugin("kotlin-jvm", "org.jetbrains.kotlin.jvm").versionRef("kotlin")
plugin("shadow", "com.github.johnrengelman.shadow").version("7.1.2") plugin("shadow", "com.github.johnrengelman.shadow").version("7.1.2")
plugin("runtime", "org.beryx.runtime").version("1.12.7") plugin("runtime", "org.beryx.runtime").version("1.12.7")

Loading…
Cancel
Save