blob: 123e89d4dbdad346bd5578a4c90f46c74caafbda [file] [log] [blame]
Austin Schuh75263e32022-02-22 18:05:32 -08001import org.gradle.internal.os.OperatingSystem
2
James Kuszmaulcf324122023-01-14 14:07:17 -08003if (!project.hasProperty('onlylinuxathena')) {
Austin Schuh75263e32022-02-22 18:05:32 -08004
5 apply plugin: 'cpp'
6 apply plugin: 'c'
7 apply plugin: 'java'
8 apply plugin: 'google-test-test-suite'
9 apply plugin: 'visual-studio'
10 apply plugin: 'edu.wpi.first.NativeUtils'
11
12 if (OperatingSystem.current().isWindows()) {
13 apply plugin: 'windows-resources'
14 }
15
James Kuszmaulcf324122023-01-14 14:07:17 -080016 dependencies {
17 implementation "com.fasterxml.jackson.core:jackson-annotations:2.12.4"
18 implementation "com.fasterxml.jackson.core:jackson-core:2.12.4"
19 implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4"
20 }
21
Austin Schuh75263e32022-02-22 18:05:32 -080022 ext {
23 nativeName = 'fieldImages'
24 baseId = nativeName
25 groupId = 'edu.wpi.first.fieldImages'
26 devMain = "edu.wpi.first.fieldImages.DevMain"
27 }
28
29 apply from: "${rootDir}/shared/resources.gradle"
30 apply from: "${rootDir}/shared/config.gradle"
31 apply from: "${rootDir}/shared/java/javacommon.gradle"
32
33 def generateTask = createGenerateResourcesTask('main', 'FIELDS', 'fields', project)
34
35 project(':').libraryBuild.dependsOn build
36 tasks.withType(CppCompile) {
37 dependsOn generateTask
38 }
39
40 sourceSets {
41 main {
42 resources {
43 srcDirs 'src/main/native/resources'
44 }
45 }
46 }
47
48 model {
49 components {
50 "${nativeName}"(NativeLibrarySpec) {
51 baseName = 'fieldImages'
52 sources {
53 cpp {
54 source {
55 srcDirs "$buildDir/generated/main/cpp"
56 include '**/*.cpp'
57 }
58 exportedHeaders {
59 srcDirs 'src/main/native/include'
60 }
61 }
62 if (OperatingSystem.current().isWindows()) {
63 rc {
64 source {
65 srcDirs 'src/main/native/win'
66 include '*.rc'
67 }
68 }
69 }
70 }
71 }
72 }
73 }
74
75 apply from: 'publish.gradle'
76}