mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
67 lines
1.8 KiB
Groovy
67 lines
1.8 KiB
Groovy
import org.gradle.internal.os.OperatingSystem
|
|
|
|
if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) {
|
|
|
|
apply plugin: 'cpp'
|
|
apply plugin: 'c'
|
|
apply plugin: 'java'
|
|
apply plugin: 'google-test-test-suite'
|
|
apply plugin: 'visual-studio'
|
|
apply plugin: 'edu.wpi.first.NativeUtils'
|
|
|
|
if (OperatingSystem.current().isWindows()) {
|
|
apply plugin: 'windows-resources'
|
|
}
|
|
|
|
ext {
|
|
nativeName = 'fieldImages'
|
|
}
|
|
|
|
apply from: "${rootDir}/shared/resources.gradle"
|
|
apply from: "${rootDir}/shared/config.gradle"
|
|
|
|
def generateTask = createGenerateResourcesTask('main', 'FIELDS', 'fields', project)
|
|
|
|
project(':').libraryBuild.dependsOn build
|
|
tasks.withType(CppCompile) {
|
|
dependsOn generateTask
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
resources {
|
|
srcDirs 'src/main/native/resources'
|
|
}
|
|
}
|
|
}
|
|
|
|
model {
|
|
components {
|
|
"${nativeName}"(NativeLibrarySpec) {
|
|
baseName = 'fieldImages'
|
|
sources {
|
|
cpp {
|
|
source {
|
|
srcDirs "$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'
|
|
}
|