2023-11-07 21:10:05 +03:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
2021-11-13 13:30:39 +03:00
|
|
|
plugins {
|
2023-11-07 21:10:05 +03:00
|
|
|
kotlin("jvm") version "1.9.20" apply false
|
|
|
|
id("org.openjfx.javafxplugin") version "0.1.0" apply false
|
2021-11-13 13:30:39 +03:00
|
|
|
id("com.github.johnrengelman.shadow") version "7.1.0" apply false
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
apply(plugin = "org.jetbrains.kotlin.jvm")
|
|
|
|
|
|
|
|
group = "inr.numass"
|
|
|
|
version = "1.1.0"
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2021-11-14 16:46:32 +03:00
|
|
|
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
2021-11-13 13:30:39 +03:00
|
|
|
}
|
|
|
|
|
2023-11-07 21:10:05 +03:00
|
|
|
extensions.findByType<KotlinJvmProjectExtension>()?.jvmToolchain(16)
|
|
|
|
|
|
|
|
|
2021-11-13 13:30:39 +03:00
|
|
|
dependencies {
|
2023-11-07 21:10:05 +03:00
|
|
|
add("api", kotlin("reflect"))
|
|
|
|
add("api", "org.jetbrains:annotations:24.0.1")
|
|
|
|
add("testImplementation", "junit:junit:4.13.2")
|
2021-11-13 13:30:39 +03:00
|
|
|
|
|
|
|
//Spock dependencies. To be removed later
|
|
|
|
// https://mvnrepository.com/artifact/org.spockframework/spock-core
|
2023-11-07 21:10:05 +03:00
|
|
|
add("testImplementation", "org.spockframework:spock-core:2.3-groovy-4.0")
|
2021-11-13 13:30:39 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
2023-11-07 21:10:05 +03:00
|
|
|
|
|
|
|
withType<Jar> {
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
2021-11-13 13:30:39 +03:00
|
|
|
}
|
|
|
|
|
2023-11-07 21:10:05 +03:00
|
|
|
withType<JavaCompile> {
|
2021-11-13 13:30:39 +03:00
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
|
2023-11-07 21:10:05 +03:00
|
|
|
|
|
|
|
withType<KotlinCompile> {
|
2021-11-13 13:30:39 +03:00
|
|
|
kotlinOptions {
|
|
|
|
javaParameters = true
|
|
|
|
freeCompilerArgs = freeCompilerArgs + listOf(
|
2023-11-07 21:10:05 +03:00
|
|
|
"-Xjvm-default=all"
|
2021-11-13 13:30:39 +03:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-07 21:10:05 +03:00
|
|
|
withType<GroovyCompile>{
|
|
|
|
val compileKotlinTask = getByName<KotlinCompile>("compileKotlin")
|
|
|
|
dependsOn(compileKotlinTask)
|
|
|
|
afterEvaluate {
|
|
|
|
classpath += files(compileKotlinTask.destinationDirectory)
|
2021-11-13 13:30:39 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|