104 lines
2.9 KiB
Groovy
104 lines
2.9 KiB
Groovy
plugins {
|
|
id 'org.jetbrains.kotlin.jvm' version "$kotlinJvmVersion"
|
|
id 'org.openjfx.javafxplugin' version "$javaFxPluginVersion"
|
|
id 'org.springframework.boot' version "$springBootVersion"
|
|
id 'io.spring.dependency-management' version "$springDependencyManagementVersion"
|
|
id 'idea'
|
|
}
|
|
|
|
group 'com.bartlomiejpluta.base'
|
|
version 'unspecified'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
|
}
|
|
|
|
sourceSets {
|
|
main.kotlin.srcDirs += 'src/main/kotlin'
|
|
}
|
|
|
|
javafx {
|
|
version = javaFxVersion
|
|
modules = ['javafx.controls', 'javafx.graphics']
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.jvmTarget = "17"
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.jvmTarget = "17"
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(":api")
|
|
implementation project(":proto")
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
|
|
|
// CLI arg parser
|
|
implementation "com.xenomachina:kotlin-argparser:${kotlinArgParserVersion}"
|
|
|
|
// JSON Proto
|
|
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
|
|
|
|
// GUI
|
|
implementation "no.tornado:tornadofx:${tornadoFxVersion}"
|
|
implementation platform("org.kordamp.ikonli:ikonli-bom:${ikonliVersion}")
|
|
implementation 'org.kordamp.ikonli:ikonli-javafx'
|
|
implementation 'org.kordamp.ikonli:ikonli-fontawesome-pack'
|
|
|
|
// Spring
|
|
implementation 'org.springframework.boot:spring-boot-starter'
|
|
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
|
|
implementation "org.slf4j:jul-to-slf4j:${slf4jVersion}"
|
|
|
|
// Code
|
|
implementation "org.fxmisc.richtext:richtextfx:${richtextfxVersion}"
|
|
implementation "org.codehaus.janino:janino:${janinoVersion}"
|
|
implementation "org.codehaus.janino:commons-compiler:${janinoVersion}"
|
|
implementation "com.squareup:javapoet:${javaPoetVersion}"
|
|
|
|
// Database
|
|
implementation "com.h2database:h2:${h2Version}"
|
|
implementation "com.zaxxer:HikariCP:${hikariVersion}"
|
|
}
|
|
|
|
task provideGameEngine(type: Copy) {
|
|
dependsOn(":engine:build")
|
|
|
|
from project(':engine').file('build/libs/engine.jar')
|
|
into file("build/resources/main/engine")
|
|
}
|
|
|
|
task provideAPIWithDependences(type: Copy) {
|
|
dependsOn(":api:build")
|
|
|
|
from project(':api').file('build/libs')
|
|
from project(':api').configurations.runtimeClasspath
|
|
into file("build/resources/main/dependencies")
|
|
}
|
|
|
|
task provideAPISources(type: Copy) {
|
|
from project(':api').file('src/main/java')
|
|
into file('build/resources/main/api')
|
|
|
|
doLast {
|
|
def apiDir = file('build/resources/main/api')
|
|
def apiIndex = file('build/resources/main/api.idx')
|
|
def buffer = new StringBuilder()
|
|
|
|
fileTree(apiDir).matching { include "**/*.java" }.each {
|
|
buffer.append(apiDir.relativePath(it)).append("\n")
|
|
}
|
|
|
|
apiIndex.write(buffer.toString())
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
dependsOn(provideGameEngine)
|
|
dependsOn(provideAPIWithDependences)
|
|
dependsOn(provideAPISources)
|
|
} |