mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-10-05 21:22:39 +02:00
36 lines
862 B
Groovy
36 lines
862 B
Groovy
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(rootProject.ext.jvmVersion))
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.bundles.slf4j
|
|
implementation libs.fastutil
|
|
|
|
testImplementation libs.bundles.slf4j.test
|
|
testImplementation libs.bundles.junit
|
|
|
|
}
|
|
|
|
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) {
|
|
inputs.files('Makefile', 'src/sort.cc', 'src/unix.cc', 'src/uring.cc')
|
|
outputs.files('resources/libcpp.so', 'resources/liburing.so')
|
|
|
|
commandLine 'make', 'all'
|
|
}
|
|
tasks.register('cleanCpp', Exec) {
|
|
commandLine 'make', 'clean'
|
|
}
|
|
|
|
processResources.dependsOn('compileCpp')
|
|
clean.dependsOn('cleanCpp') |