Merge pull request #195 from Firefds/master

Fixed building on Windows environments
This commit is contained in:
solohsu 2019-03-27 16:12:58 +08:00 committed by GitHub
commit 02cc1496c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,7 +14,10 @@ task dexInJar(type: Jar) {
doFirst {
exec {
workingDir jar.destinationDir
executable "dx"
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,7 +19,10 @@ task dexInJar(type: Jar) {
doFirst {
exec {
workingDir jar.destinationDir
executable "dx"
if (OperatingSystem.current().isWindows())
executable "dx.bat"
else
executable "dx"
args "--dex", "--output", "classes.dex", "${jar.archiveName}"
}
}