2024-05-13 16:38:43 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
toolchain {
|
|
|
|
languageVersion.set(JavaLanguageVersion.of(rootProject.ext.jvmVersion))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation libs.bundles.slf4j
|
|
|
|
}
|
|
|
|
|
|
|
|
apply from: "$rootProject.projectDir/srcsets.gradle"
|
|
|
|
|
|
|
|
// We use a custom task to compile the C++ code into a shared library
|
|
|
|
// with a shellscript as gradle's c++ tasks are kind of insufferable
|
|
|
|
|
|
|
|
tasks.register('compileCpp', Exec) {
|
2024-05-16 12:47:10 +00:00
|
|
|
inputs.files('compile.sh', 'src/main/cpp/cpphelpers.cpp', 'src/main/public/cpphelpers.h')
|
2024-05-13 16:38:43 +00:00
|
|
|
outputs.file 'resources/libcpp.so'
|
|
|
|
commandLine 'sh', 'compile.sh'
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources.dependsOn('compileCpp')
|