2016-06-29 09:25:54 +00:00
|
|
|
apply plugin: 'java'
|
2016-06-30 05:47:37 +00:00
|
|
|
apply plugin: 'application'
|
|
|
|
|
2016-06-30 08:54:40 +00:00
|
|
|
mainClassName= 'de.fabianonline.telegram_backup.CommandLineRunner'
|
2016-06-30 05:47:37 +00:00
|
|
|
|
2016-07-05 05:54:35 +00:00
|
|
|
sourceCompatibility = 1.7
|
|
|
|
targetCompatibility = 1.7
|
|
|
|
|
2016-06-30 05:47:37 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
url "https://jitpack.io"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2016-07-14 17:43:41 +00:00
|
|
|
compile 'com.github.badoualy:kotlogram:497e5dd62d9bcb341f584164b04b4b537ce9d295'
|
2016-06-30 08:54:40 +00:00
|
|
|
compile 'org.xerial:sqlite-jdbc:3.8.11.2'
|
2016-07-07 04:40:00 +00:00
|
|
|
compile 'com.github.spullara.mustache.java:compiler:0.8.18'
|
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
|
|
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|