diff --git a/README.md b/README.md index 6f310d4444..a208a88d2c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,12 @@ To build just the Native or ARM version, you must access the approriate subproje ./gradlew :native:build # Builds just the native version of ntcore ``` +If you do not have the arm toolchain installed on your computer, you will run into build issues. To disable the arm platform entirely, run with the flag `-PskipArm`, and it will be entirely skipped. + +```bash +./gradlew build -PskipArm # Builds native, disables the arm project +``` + The native version of ntcore will run tests on build. The arm version will not, as the current platform likely does not allow running of an ARM binary. ## Testing diff --git a/build.gradle b/build.gradle index dc2b731ff4..7b2c045b48 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,8 @@ if (!hasProperty('repo')) { } } +ext.buildArm = !project.hasProperty('skipArm') + if (hasProperty('makeDesktop')) { println 'Making desktop classifier jar. NOTE: This desktop version should only be used for local testing.' + 'It will only support the current platform, and will override fetching the latest development version from' + @@ -161,19 +163,21 @@ def ntcoreZipTask = { project -> } } -project(':arm') { - apply plugin: 'cpp' +if (buildArm) { + project(':arm') { + apply plugin: 'cpp' - ext.buildPlatform = 'arm' - ext.isArm = true + ext.buildPlatform = 'arm' + ext.isArm = true - apply from: '../toolchains/arm.gradle' - if (includeJava) { - apply from: '../java/java.gradle' + apply from: '../toolchains/arm.gradle' + if (includeJava) { + apply from: '../java/java.gradle' + } + + setupModel(project, true) + ntcoreZipTask(project) } - - setupModel(project, true) - ntcoreZipTask(project) } project(':native') { diff --git a/publish.gradle b/publish.gradle index 0e84a0a442..1886ecad04 100644 --- a/publish.gradle +++ b/publish.gradle @@ -7,13 +7,14 @@ apply plugin: 'maven-publish' publishing { publications { def nat = project('native') - def arm = project('arm') if (!project.hasProperty('skipJava')) { java(MavenPublication) { artifact nat.jar - artifact arm.jar artifact nat.networktablesJavaSource artifact nat.networktablesJavadoc + if (project.buildArm) { + artifact project('arm').jar + } if (project.hasProperty('makeDesktop')) { artifact nat.jar, { @@ -28,8 +29,10 @@ publishing { } cpp(MavenPublication) { artifact nat.ntcoreZip - artifact arm.ntcoreZip artifact ntcoreSourceZip + if (project.buildArm) { + artifact project(':arm').ntcoreZip + } if (project.hasProperty('makeDesktop')) { artifact nat.ntcoreZip, { diff --git a/settings.gradle b/settings.gradle index b262f4ed0e..4f0101c9d4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,5 @@ -include 'arm', 'native', 'gmock' \ No newline at end of file +include 'native', 'gmock' + +if (!hasProperty('skipArm')) { + include 'arm' +}