A gradle plugin to build Niagara module in Kotlin
rootProject.name = "moduleName"
arrayOf("rt", "wb", "ux", "se").forEach { profile ->
val dir = File(rootDir, profile)
if (dir.isDirectory) {
include(profile)
project(dir).name = "${rootProject.name}-$profile"
}
}
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.4.21" apply false
kotlin("kapt") version "1.4.21" apply false
kotlin("plugin.serialization") version "1.4.21" apply false
id("com.restartech.nmodule") version "0.2.0" apply false
}
group = "Vendor"
version = "0.0.1"
description = "niagara module"
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "com.restartech.nmodule")
apply(plugin = "org.jetbrains.kotlin.kapt")
apply(plugin = "org.jetbrains.kotlin.plugin.serialization")
dependencies {
"implementation"(kotlin("stdlib-jdk8"))
"implementation"("Tridium:nre:4.0")
"kapt"("Tridium:nre:4.0")
"nmodule"("Tridium:baja:4.0")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
}