Commit 61a2df6b authored by Drahomír Karchňák's avatar Drahomír Karchňák

#755 Gradle now downloads JRE and extracts it for desktop version.

parent 7bd1fbd9
......@@ -108,6 +108,26 @@ task releaseJar(type: Jar) {
}
}
task releaseExe(dependsOn: releaseJar) {
if(project.hasProperty('TABLEXIA_JRE_DOWNLOAD_MIRROR')) {
def jreFileName = '/jre.tar.gz'
//Download JRE
download(project.property('TABLEXIA_JRE_DOWNLOAD_MIRROR'), project.buildDir.absolutePath + jreFileName)
//Extract JRE to desktop/build/
Runtime.getRuntime().exec(
'tar -xf ' + project.buildDir.absolutePath + jreFileName +
' -C ' + project.buildDir.absolutePath
)
}
}
def download(String remoteUrl, String localUrl) {
new File("$localUrl").withOutputStream { out ->
new URL(remoteUrl).withInputStream { from -> out << from; }
}
}
task runITestBundle(dependsOn: iTestJar) {
doLast {
int testsCount = 0;
......@@ -160,11 +180,13 @@ debugJar.dependsOn classes
debugJar.dependsOn(':util:checksum:runChecksum')
releaseJar.dependsOn classes
releaseJar.dependsOn(':util:checksum:runChecksum')
releaseExe.dependsOn classes
releaseExe.dependsOn(':util:checksum:runChecksum')
iTestJar.dependsOn classes
iTestJar.dependsOn iTestClasses
iTestJar.dependsOn(':util:checksum:runChecksum')
assemble.dependsOn([debugJar, releaseJar, iTestJar])
assemble.dependsOn([debugJar, releaseJar, releaseExe, iTestJar])
jar.enabled = false
eclipse {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment