Search code examples
gradlegradle-eclipse

Gradle include native libaries in folder at specific path


I have an eclipse setup with the following directory structure

  • /native/Linux
  • /native/Windows
  • /native/Mac
  • /build.gradle

and some subdirectories in those folders.

I need build.gradle to copy the entire layout of /native to /org/sqlite/native in the jar

how do I configure that?


Solution

  • Here you can find a demo. Basically what you in the build.gradle script is the following piece of code:

    apply plugin: 'java'
    
    jar {
        from('native') {
            into('org/sqlite/native')
        }
    }