mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
70 lines
1.8 KiB
Groovy
70 lines
1.8 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: 'edu.wpi.first.NativeUtils'
|
|
|
|
if (OperatingSystem.current().isWindows()) {
|
|
apply plugin: 'windows-resources'
|
|
}
|
|
|
|
dependencies {
|
|
implementation "com.fasterxml.jackson.core:jackson-annotations:2.15.2"
|
|
implementation "com.fasterxml.jackson.core:jackson-core:2.15.2"
|
|
implementation "com.fasterxml.jackson.core:jackson-databind:2.15.2"
|
|
}
|
|
|
|
ext {
|
|
nativeName = 'fields'
|
|
baseId = nativeName
|
|
groupId = 'edu.wpi.first.fields'
|
|
devMain = "edu.wpi.first.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'
|