Updated the definitions file to add overloaded functions, added

no-unused-private-field for Mac builds. Gradle also now works
with the classifier-based dependency system, rather than having
separate repos for every level.

Change-Id: I2eb87391181e91b5675e3e982e4d915be83e14ea
This commit is contained in:
Fredric Silberberg
2015-11-21 11:13:37 -05:00
parent c76e60324b
commit 26c27756af
6 changed files with 42 additions and 40 deletions

View File

@@ -15,6 +15,7 @@ sourceSets {
jar {
description = 'Generates NetworkTables jar, with the JNI shared libraries embedded'
baseName = 'ntcore'
classifier = "$buildPlatform${useExtension ? '-' + repo : ''}"
if (buildPlatform == 'arm') {
dependsOn { ntcoreSharedLibrary }
@@ -34,17 +35,22 @@ jar {
task networktablesJavaSource(type: Jar, dependsOn: classes) {
description = 'Generates the source jar for NetworkTables java'
group = 'WPILib'
classifier = 'source'
baseName = 'ntcore'
classifier = "sources${useExtension ? '-' + repo : ''}"
from sourceSets.main.allJava
}
task networktablesJavadoc(type: Jar, dependsOn: javadoc) {
description = 'Generates the javadoc jar for NetworkTables java'
group = 'WPILib'
classifier = 'javadoc'
baseName = 'ntcore'
classifier = "javadoc${useExtension ? '-' + repo : ''}"
from javadoc.destinationDir
}
build.dependsOn networktablesJavaSource
build.dependsOn networktablesJavadoc
/**
* Generates the JNI headers
*/
@@ -96,7 +102,9 @@ ext.setupJniIncludes = { binaries ->
def jdkLocation = org.gradle.internal.jvm.Jvm.current().javaHome
platformSpecificIncludeFlag("${jdkLocation}/include", cppCompiler)
if (targetPlatform.operatingSystem.linux) {
if (targetPlatform.operatingSystem.macOsX) {
platformSpecificIncludeFlag("${jdkLocation}/include/darwin", cppCompiler)
} else if (targetPlatform.operatingSystem.linux) {
platformSpecificIncludeFlag("${jdkLocation}/include/linux", cppCompiler)
} else if (targetPlatform.operatingSystem.windows) {
platformSpecificIncludeFlag("${jdkLocation}/include/win32", cppCompiler)