aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
authorIvan Dubrov <idubrov@guidewire.com>2014-04-25 16:08:45 -0700
committerIvan Dubrov <idubrov@guidewire.com>2014-04-25 16:16:42 -0700
commit25ec3e2061f4e304f13923702354b75bb77e7809 (patch)
treecbf428eb1e17adf71ca0b38f985e3d641d5a0ebb /build.gradle
parent112ea81c3236d4591cbbb44043bd8511024bf3b5 (diff)
downloaddcevm-25ec3e2061f4e304f13923702354b75bb77e7809.tar.gz
dcevm-25ec3e2061f4e304f13923702354b75bb77e7809.zip
Fixing native code compilation
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle10
1 files changed, 7 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index 62692747..dae673ea 100644
--- a/build.gradle
+++ b/build.gradle
@@ -128,8 +128,12 @@ project('agent') {
}
project('native') {
+ apply plugin: 'base'
task compile(type: Exec) {
- if (root.os != Os.WINDOWS) {
+ doFirst {
+ buildDir.mkdirs()
+ }
+ if (os != Os.WINDOWS) {
commandLine 'gcc'
args "-I${jre}/../include"
args "-I${jre}/../include/linux"
@@ -138,8 +142,8 @@ project('native') {
args '-o'
args 'build/libnatives.so'
} else {
- commandLine 'compile.cmd'
- environment ARCH: root.arch == Arch.X86 ? 'x86' : 'x64'
+ commandLine 'cmd', '/c', 'compile.cmd'
+ environment ARCH: arch == Arch.X86 ? 'x86' : 'x64'
environment JAVA_HOME: jre
}
}