Home | History | Annotate | Download | only in find_java
      1 apply plugin: 'cpp'
      2 apply plugin: 'sdk-files'
      3 apply plugin: 'windows-setup'
      4 
      5 executables {
      6     findJava {}
      7 }
      8 
      9 sources {
     10     findJava {
     11         cpp {
     12             source {
     13                 srcDir "src/source"
     14                 include "**/*.cpp"
     15             }
     16         }
     17     }
     18 }
     19 
     20 sdk {
     21     windows {
     22         item( { getExeName("windows32FindJavaExecutable") } ) {
     23             into 'lib'
     24             name 'find_java32.exe'
     25             builtBy 'windows32FindJavaExecutable'
     26             notice 'NOTICE'
     27         }
     28         item( { getExeName("windows64FindJavaExecutable") } ) {
     29             into 'lib'
     30             name 'find_java64.exe'
     31             builtBy 'windows64FindJavaExecutable'
     32             notice 'NOTICE'
     33         }
     34         item('find_java.bat') {
     35             into 'lib'
     36             notice 'NOTICE'
     37         }
     38     }
     39 }
     40 
     41 def getExeName(String name) {
     42     // binaries will return a set of binaries
     43     def binaries = executables.findJava.binaries.matching { it.name == name }
     44     // calling .exeFile on the set returns an array with the result from each item in the set...
     45     return binaries.executableFile.get(0)
     46 }
     47 
     48