2016-06-29 09:25:54 +00:00
|
|
|
apply plugin: 'java'
|
2016-06-30 05:47:37 +00:00
|
|
|
apply plugin: 'application'
|
|
|
|
|
2017-12-11 17:39:30 +00:00
|
|
|
mainClassName= 'de.fabianonline.telegram_backup.CommandLineRunnerKt'
|
2016-06-30 05:47:37 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2017-12-13 05:10:41 +00:00
|
|
|
jcenter()
|
2016-06-30 05:47:37 +00:00
|
|
|
maven {
|
|
|
|
url "https://jitpack.io"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-06 10:14:11 +00:00
|
|
|
buildscript {
|
|
|
|
ext.kotlin_version = '1.2.0'
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'kotlin'
|
2017-12-13 05:10:41 +00:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2017-12-06 10:14:11 +00:00
|
|
|
|
|
|
|
compileKotlin {
|
2017-12-13 05:10:41 +00:00
|
|
|
kotlinOptions.apiVersion = "1.2"
|
2017-12-06 10:14:11 +00:00
|
|
|
}
|
2017-12-13 05:10:41 +00:00
|
|
|
|
|
|
|
kapt {
|
|
|
|
generateStubs = true
|
|
|
|
}
|
2017-12-06 10:14:11 +00:00
|
|
|
|
2016-06-30 05:47:37 +00:00
|
|
|
dependencies {
|
2016-11-25 05:33:11 +00:00
|
|
|
compile('com.github.badoualy:kotlogram:666a81ef9d6707f117a3fecc2d21c91d51c7d075') {
|
2016-07-20 04:37:24 +00:00
|
|
|
exclude module: 'slf4j-simple'
|
|
|
|
}
|
2017-02-14 21:19:47 +00:00
|
|
|
compile 'org.xerial:sqlite-jdbc:3.16.1'
|
2016-07-07 04:40:00 +00:00
|
|
|
compile 'com.github.spullara.mustache.java:compiler:0.8.18'
|
2016-07-20 04:37:24 +00:00
|
|
|
compile 'org.slf4j:slf4j-api:1.7.21'
|
|
|
|
compile 'ch.qos.logback:logback-classic:1.1.7'
|
2016-08-29 05:01:32 +00:00
|
|
|
compile 'com.google.code.gson:gson:2.5'
|
|
|
|
|
2017-12-13 05:10:41 +00:00
|
|
|
compile 'io.requery:requery:1.4.1'
|
|
|
|
compile 'io.requery:requery-kotlin:1.4.1'
|
|
|
|
kapt 'io.requery:requery-processor:1.4.1'
|
|
|
|
|
2016-08-29 05:01:32 +00:00
|
|
|
testCompile 'junit:junit:4.12'
|
2016-06-30 05:47:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run {
|
|
|
|
standardInput = System.in
|
|
|
|
}
|
|
|
|
|
2016-07-13 04:06:26 +00:00
|
|
|
def getVersionName= { ->
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'describe', '--tags', '--dirty'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
2017-02-18 12:05:24 +00:00
|
|
|
def version = stdout.toString().trim()
|
|
|
|
logger.lifecycle("Version $version")
|
|
|
|
return version
|
2016-07-13 04:06:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ant.propertyfile(file: "$project.rootDir/build/resources/main/build.properties") {
|
|
|
|
entry(key: "version", value: getVersionName())
|
|
|
|
}
|
|
|
|
|
2016-06-30 05:47:37 +00:00
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes "Main-Class": "$mainClassName"
|
|
|
|
}
|
|
|
|
|
|
|
|
from {
|
|
|
|
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
|
|
|
|
}
|
2016-07-07 04:40:00 +00:00
|
|
|
|
|
|
|
includes [
|
|
|
|
"*.mustache"
|
|
|
|
]
|
2016-06-30 05:47:37 +00:00
|
|
|
}
|