Use buildSrc to deduplicate build logic (#262)
This commit is contained in:
@@ -1,27 +1,33 @@
|
||||
import ScreenshotsHelper.collectScreenshots
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
org.openrndr.extra.convention.`kotlin-jvm`
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn")
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform {
|
||||
includeEngines("spek2")
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
val main by getting { }
|
||||
val demo by creating {
|
||||
java {
|
||||
srcDir("src/demo/kotlin")
|
||||
compileClasspath += main.getCompileClasspath()
|
||||
runtimeClasspath += main.getRuntimeClasspath()
|
||||
}
|
||||
}
|
||||
val demo by getting
|
||||
collectScreenshots(project, demo) { }
|
||||
}
|
||||
|
||||
val demoImplementation by configurations.getting {}
|
||||
|
||||
val demoRuntimeOnly by configurations.getting {}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.openrndr.application)
|
||||
implementation(libs.openrndr.math)
|
||||
implementation(libs.kotlin.coroutines)
|
||||
implementation(libs.kotlin.reflect)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
testImplementation(libs.spek.dsl)
|
||||
testRuntimeOnly(libs.spek.junit5)
|
||||
testRuntimeOnly(libs.kotlin.reflect)
|
||||
demoImplementation(libs.openrndr.dialogs)
|
||||
demoImplementation(libs.gson)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.core)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user