2019-07-06 21:24:09 +00:00
|
|
|
plugins {
|
|
|
|
id 'org.jetbrains.kotlin.jvm' version '1.3.41'
|
|
|
|
}
|
|
|
|
|
2017-11-16 20:46:06 +00:00
|
|
|
def getVersion() {
|
|
|
|
// Dynamically read version from CMake file
|
|
|
|
String text = new File('../../appInfo.cmake').getText('UTF-8')
|
|
|
|
String major = (text =~ /appVersionMajor\s+(\d+)/)[0][1]
|
|
|
|
String minor = (text =~ /appVersionMinor\s+(\d+)/)[0][1]
|
|
|
|
String patch = (text =~ /appVersionPatch\s+(\d+)/)[0][1]
|
|
|
|
String suffix = (text =~ /appVersionSuffix\s+"(.*?)"/)[0][1]
|
|
|
|
String result = "${major}.${minor}.${patch}${suffix}"
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
|
2017-11-14 19:41:42 +00:00
|
|
|
group 'com.rhubarb_lip_sync'
|
2017-11-16 20:46:06 +00:00
|
|
|
version = getVersion()
|
2017-11-14 19:41:42 +00:00
|
|
|
|
|
|
|
repositories {
|
2017-11-14 20:21:05 +00:00
|
|
|
mavenCentral()
|
|
|
|
jcenter()
|
2017-11-14 19:41:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-07-06 21:24:09 +00:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
|
|
|
implementation 'com.beust:klaxon:5.0.1'
|
|
|
|
implementation 'org.apache.commons:commons-lang3:3.9'
|
|
|
|
implementation 'no.tornado:tornadofx:1.7.19'
|
2017-11-14 19:41:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
compileKotlin {
|
2017-11-14 20:21:05 +00:00
|
|
|
kotlinOptions.jvmTarget = '1.8'
|
2017-11-14 19:41:42 +00:00
|
|
|
}
|
|
|
|
compileTestKotlin {
|
2017-11-14 20:21:05 +00:00
|
|
|
kotlinOptions.jvmTarget = '1.8'
|
2018-01-24 19:10:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': 'com.rhubarb_lip_sync.rhubarb_for_spine.MainKt'
|
|
|
|
}
|
|
|
|
|
|
|
|
// This line of code recursively collects and copies all of a project's files
|
|
|
|
// and adds them to the JAR itself. One can extend this task, to skip certain
|
|
|
|
// files or particular types at will
|
|
|
|
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
2017-11-14 19:41:42 +00:00
|
|
|
}
|