diff options
author | Xavier Ducrohet <xav@google.com> | 2014-06-11 21:28:58 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@google.com> | 2014-06-11 21:37:37 -0700 |
commit | 53a6029a83a3b070f57dd5323f37f6fd18ca4633 (patch) | |
tree | 414d2b8d5123a7554154cb157d1b59bd37d71048 /find_java/build.gradle | |
parent | a6e9f7b2fc87932fdb0bf23c12b6ceb8c7d832eb (diff) | |
download | sdk-53a6029a83a3b070f57dd5323f37f6fd18ca4633.zip sdk-53a6029a83a3b070f57dd5323f37f6fd18ca4633.tar.gz sdk-53a6029a83a3b070f57dd5323f37f6fd18ca4633.tar.bz2 |
Compile find_java with Gradle.
Change-Id: I90ff236c35a857ebde82c3d63479709474aad204
Diffstat (limited to 'find_java/build.gradle')
-rw-r--r-- | find_java/build.gradle | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/find_java/build.gradle b/find_java/build.gradle new file mode 100644 index 0000000..12511fd --- /dev/null +++ b/find_java/build.gradle @@ -0,0 +1,35 @@ +apply plugin: 'cpp' +apply plugin: 'sdk-files' +apply plugin: 'windows-setup' + +executables { + findJava {} +} + +sources { + findJava { + cpp { + source { + srcDir "src/source" + include "**/*.cpp" + } + } + } +} + +sdk { + windows { + item( { getExeName("windows") } ) { + name 'find_java.exe' + builtBy 'findJavaExecutable' + } + } +} + +def getExeName(String platform) { + // binaries will return a set of binaries + def binaries = executables.findJava.binaries.matching { it.name == "findJavaExecutable" } + // calling .exeFile on the set returns an array with the result from each item in the set... + return binaries.executableFile.get(0) +} + |