kopia lustrzana https://github.com/bertrik/ttnhabbridge
46 wiersze
1.3 KiB
Groovy
46 wiersze
1.3 KiB
Groovy
apply plugin: "application"
|
|
|
|
mainClassName = 'nl.sikken.bertrik.TtnHabBridge'
|
|
|
|
dependencies {
|
|
compile project(':cayenne')
|
|
|
|
compile libraries.slf4jlog4j
|
|
|
|
compile libraries.mqtt_client
|
|
compile libraries.jackson
|
|
compile libraries.retrofit
|
|
|
|
testCompile libraries.retrofit_mock
|
|
}
|
|
|
|
//Add configuration folder to classpath:
|
|
startScripts {
|
|
classpath += files('../cfg')
|
|
doLast {
|
|
def windowsScriptFile = file getWindowsScript()
|
|
def unixScriptFile = file getUnixScript()
|
|
|
|
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib\\cfg', '%APP_HOME%\\cfg')
|
|
unixScriptFile.text = unixScriptFile.text.replace('$APP_HOME/lib/cfg', '$APP_HOME/cfg')
|
|
}
|
|
}
|
|
|
|
// fix scripts executable bit and line endings
|
|
import org.apache.tools.ant.filters.FixCrLfFilter
|
|
|
|
distributions {
|
|
main {
|
|
contents {
|
|
filesMatching("**/*.sh") {
|
|
mode = 0755
|
|
filter(FixCrLfFilter,
|
|
eol: FixCrLfFilter.CrLf.newInstance('lf'),
|
|
tab: FixCrLfFilter.AddAsisRemove.newInstance('asis'),
|
|
eof: FixCrLfFilter.AddAsisRemove.newInstance('remove'),
|
|
fixlast: true)
|
|
}
|
|
}
|
|
}
|
|
}
|