aboutsummaryrefslogtreecommitdiff
path: root/find_java/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'find_java/build.gradle')
-rw-r--r--find_java/build.gradle47
1 files changed, 47 insertions, 0 deletions
diff --git a/find_java/build.gradle b/find_java/build.gradle
new file mode 100644
index 000000000..b359e0a17
--- /dev/null
+++ b/find_java/build.gradle
@@ -0,0 +1,47 @@
+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("windows32FindJavaExecutable") } ) {
+ into 'lib'
+ name 'find_java32.exe'
+ builtBy 'windows32FindJavaExecutable'
+ notice 'NOTICE'
+ }
+ item( { getExeName("windows64FindJavaExecutable") } ) {
+ into 'lib'
+ name 'find_java64.exe'
+ builtBy 'windows64FindJavaExecutable'
+ notice 'NOTICE'
+ }
+ item('find_java.bat') {
+ into 'lib'
+ notice 'NOTICE'
+ }
+ }
+}
+
+def getExeName(String name) {
+ // binaries will return a set of binaries
+ def binaries = executables.findJava.binaries.matching { it.name == name }
+ // calling .exeFile on the set returns an array with the result from each item in the set...
+ return binaries.executableFile.get(0)
+}
+