plugins { id 'java' } plugins { id 'application' } repositories { mavenCentral() } application { mainClass = 'ChairRB' applicationDefaultJvmArgs = ['-Djava.library.path=jnilib/target/release/', '-server'] } dependencies { implementation group: 'org.agrona', name: 'agrona', version: '1.9.0' } task cargoBuild(type:Exec){ workingDir 'jnilib' commandLine 'cargo', 'build', '--release' } run.dependsOn cargoBuild