Fixed building on Windows environment

This commit is contained in:
Shauli Bracha 2019-03-27 09:40:41 +02:00
parent 8a37dae36a
commit 88bf716663
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import org.gradle.internal.os.OperatingSystem
apply plugin: 'java-library'
dependencies {
@ -13,6 +14,9 @@ task dexInJar(type: Jar) {
doFirst {
exec {
workingDir jar.destinationDir
if (OperatingSystem.current().isWindows())
executable "dx.bat"
else
executable "dx"
args "--dex", "--output", "classes.dex", "${jar.archiveName}"
}

View File

@ -1,3 +1,4 @@
import org.gradle.internal.os.OperatingSystem
apply plugin: 'java'
description = "A utility for doing compile or runtime code generation targeting Android's Dalvik VM"
@ -18,6 +19,9 @@ task dexInJar(type: Jar) {
doFirst {
exec {
workingDir jar.destinationDir
if (OperatingSystem.current().isWindows())
executable "dx.bat"
else
executable "dx"
args "--dex", "--output", "classes.dex", "${jar.archiveName}"
}