Skip to content

Instantly share code, notes, and snippets.

@cretz
Created April 10, 2018 21:11
Show Gist options
  • Save cretz/fb21718d2456fe5d581c9d536c011d99 to your computer and use it in GitHub Desktop.
Save cretz/fb21718d2456fe5d581c9d536c011d99 to your computer and use it in GitHub Desktop.
Gradle Build for Sandbox ADBA

Below is a build.gradle file that can be placed adjacent to the src directory when downloading the ADBA source. When assemble is executed via Gradle it will build the Java 9 module that can be used. I am currently using this for my Postgres ADBA work on PgNio.

apply plugin: 'java'
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceSets {
main.java.srcDirs = ['src/jdk.incubator.adba/share/classes']
}
ext.moduleName = 'jdk.incubator.adba'
compileJava {
inputs.property('moduleName', moduleName)
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
]
classpath = files()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment