diff --git a/hal/build.gradle b/hal/build.gradle index b27f622b8b..48aa2552cd 100644 --- a/hal/build.gradle +++ b/hal/build.gradle @@ -73,47 +73,30 @@ model { } } components { - halAthena(NativeLibrarySpec) { - baseName = 'wpiHal' - sources { - cpp { - source { - srcDirs = [ 'src/main/native/shared', 'src/main/native/athena' ] - includes = ["**/*.cpp"] - } - exportedHeaders { - srcDirs = ["src/main/native/include"] - } - } - } - binaries.all { binary-> - if (binary.targetPlatform.architecture.name != 'athena') { - binary.buildable = false - } - } - } - halSim(NativeLibrarySpec) { - baseName = 'wpiHal' - sources { - cpp { - source { - srcDirs = [ 'src/main/native/shared', 'src/main/native/sim' ] - includes = ["**/*.cpp"] - } - exportedHeaders { - srcDirs = ["src/main/native/include"] - } - } - } - } - if (project.hasProperty('buildHalStaticDeps')) { - halSimStaticDeps(NativeLibrarySpec) { + if (!project.hasProperty('skipAthena')) { + halAthena(NativeLibrarySpec) { baseName = 'wpiHal' - binaries { - withType(StaticLibraryBinarySpec) { - buildable = false + sources { + cpp { + source { + srcDirs = [ 'src/main/native/shared', 'src/main/native/athena' ] + includes = ["**/*.cpp"] + } + exportedHeaders { + srcDirs = ["src/main/native/include"] + } } } + binaries.all { binary-> + if (binary.targetPlatform.architecture.name != 'athena') { + binary.buildable = false + } + } + } + } + if (!project.hasProperty('onlyAthena')) { + halSim(NativeLibrarySpec) { + baseName = 'wpiHal' sources { cpp { source { @@ -126,6 +109,27 @@ model { } } } + if (project.hasProperty('buildHalStaticDeps')) { + halSimStaticDeps(NativeLibrarySpec) { + baseName = 'wpiHal' + binaries { + withType(StaticLibraryBinarySpec) { + buildable = false + } + } + sources { + cpp { + source { + srcDirs = [ 'src/main/native/shared', 'src/main/native/sim' ] + includes = ["**/*.cpp"] + } + exportedHeaders { + srcDirs = ["src/main/native/include"] + } + } + } + } + } } // The TestingBase library is a workaround for an issue with the GoogleTest plugin. // The plugin by default will rebuild the entire test source set, which increases diff --git a/wpilibc/build.gradle b/wpilibc/build.gradle index 00e74475f0..10340afcd4 100644 --- a/wpilibc/build.gradle +++ b/wpilibc/build.gradle @@ -131,7 +131,9 @@ model { // The plugin by default will rebuild the entire test source set, which increases // build time. By testing an empty library, and then just linking the already built component // into the test, we save the extra build - wpilibcTestingBase(NativeLibrarySpec) { } + if (!project.hasProperty('onlyAthena')) { + wpilibcTestingBase(NativeLibrarySpec) { } + } // By default, a development executable will be generated. This is to help the case of // testing specific functionality of the library. if (!project.hasProperty('skipDevExe')) { @@ -154,10 +156,12 @@ model { } } testSuites { - wpilibcTestingBaseTest { - sources { - cpp.source.srcDir 'src/test/native/cpp' - cpp.exportedHeaders.srcDir 'src/test/native/include' + if (!project.hasProperty('onlyAthena')) { + wpilibcTestingBaseTest { + sources { + cpp.source.srcDir 'src/test/native/cpp' + cpp.exportedHeaders.srcDir 'src/test/native/include' + } } } }