plugins { id 'java-library' } description = 'Master Password Algorithm Implementation' configurations { lib } dependencies { implementation group: 'com.lyndir.lhunath.opal', name: 'opal-system', version: '1.7-p2' api group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.5' api group: 'org.jetbrains', name: 'annotations', version: '13.0' api group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2' api group: 'com.google.code.findbugs', name: 'findbugs-annotations', version: '3.0.1' lib project( path: ':masterpassword-core', configuration: 'default' ) } processResources { dependsOn task( type: Sync, 'processResources-lib', { into new File( processResources.outputs.files.singleFile, "lib" ) dependsOn configurations.lib { files.each { libFile -> from( zipTree( libFile ) ) } } } ) } compileJava { doLast { ant.javah( class: 'com.lyndir.masterpassword.impl.MPAlgorithmV0', outputFile: new File( project( ':masterpassword-core' ).projectDir, 'src/mpw-jni.h' ), classpath: files( sourceSets.main.compileClasspath, sourceSets.main.output ).asPath ) } }