mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Also fixes the google compile-testing library to 0.23.0 (the latest available at time of writing) instead of a wildcard Jackson versions were inconsistent across projects; most were on 2.19.2, but the fields subproject was on 2.15.2. All projects are now on 2.19.2 for consistency
68 lines
1.7 KiB
Groovy
68 lines
1.7 KiB
Groovy
import org.gradle.internal.os.OperatingSystem
|
|
|
|
if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxsystemcore')) {
|
|
return;
|
|
}
|
|
|
|
apply plugin: 'cpp'
|
|
apply plugin: 'java'
|
|
apply plugin: 'visual-studio'
|
|
apply plugin: 'org.wpilib.NativeUtils'
|
|
|
|
if (OperatingSystem.current().isWindows()) {
|
|
apply plugin: 'windows-resources'
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.bundles.jackson
|
|
}
|
|
|
|
ext {
|
|
nativeName = 'fields'
|
|
baseId = nativeName
|
|
groupId = 'org.wpilib.fields'
|
|
devMain = "org.wpilib.fields.DevMain"
|
|
}
|
|
|
|
apply from: "${rootDir}/shared/resources.gradle"
|
|
apply from: "${rootDir}/shared/config.gradle"
|
|
apply from: "${rootDir}/shared/java/javacommon.gradle"
|
|
|
|
def generateTask = createGenerateResourcesTask('main', 'FIELDS', 'wpi::fields', project)
|
|
|
|
project(':').libraryBuild.dependsOn build
|
|
tasks.withType(CppCompile) {
|
|
dependsOn generateTask
|
|
}
|
|
|
|
sourceSets.main.resources {
|
|
srcDirs 'src/main/native/resources'
|
|
}
|
|
|
|
model {
|
|
components {
|
|
"${nativeName}"(NativeLibrarySpec) {
|
|
baseName = 'fields'
|
|
sources {
|
|
cpp {
|
|
source {
|
|
srcDirs 'src/main/native/cpp', "$buildDir/generated/main/cpp"
|
|
include '**/*.cpp'
|
|
}
|
|
exportedHeaders {
|
|
srcDirs 'src/main/native/include'
|
|
}
|
|
}
|
|
if (OperatingSystem.current().isWindows()) {
|
|
rc.source {
|
|
srcDirs 'src/main/native/win'
|
|
include '*.rc'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
apply from: 'publish.gradle'
|