Skip to content

Commit

Permalink
Initial changes to gradle files for 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
willtoth committed Jan 23, 2020
1 parent 9011e5e commit 151486c
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 391 deletions.
3 changes: 2 additions & 1 deletion Source/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"string_view": "cpp",
"vl53l0x_platform.h": "c",
"xxatomic": "cpp",
"vl53l0x_platform_log.h": "c"
"vl53l0x_platform_log.h": "c",
"i2c.h": "c"
},
"java.configuration.updateBuildConfiguration": "automatic"
}
60 changes: 35 additions & 25 deletions Source/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
plugins {
id 'cpp'
id 'java'
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '2.2'
id 'edu.wpi.first.NativeUtils' version '2.1.2'
id 'edu.wpi.first.GradleJni' version '0.3.1'
id 'edu.wpi.first.GradleVsCode' version '0.7.1'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2'
id 'edu.wpi.first.NativeUtils' version '2020.5.2'
id 'edu.wpi.first.GradleJni' version '0.10.1'
id 'edu.wpi.first.GradleVsCode' version '0.10.0'
}

allprojects {
repositories {
mavenCentral()
}
if (project.hasProperty('releaseMode')) {
wpilibRepositories.addAllReleaseRepositories(it)
} else {
wpilibRepositories.addAllDevelopmentRepositories(it)
}
}

apply from: 'config.gradle'
Expand All @@ -15,29 +26,21 @@ ext.sharedConfigs = [DistanceSensor: []]

apply from: 'dependencies.gradle'

model {
nativeUtils {
exportsConfigs {
DistanceSensor(ExportsConfig) {
x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
'_CT??_R0?AVbad_cast',
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
'_TI5?AVfailure']
x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
'_CT??_R0?AVbad_cast',
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
'_TI5?AVfailure']
DistanceSensor {
}
DistanceSensorDriver(ExportsConfig) {
x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
'_CT??_R0?AVbad_cast',
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
'_TI5?AVfailure']
x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
'_CT??_R0?AVbad_cast',
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
'_TI5?AVfailure']
DistanceSensorDriver {
}
}
privateExportsConfigs {
//DistanceSensorDriver {
//exportsFile = project.file("src/main/driver/symbols.txt")
//}
}
}

model {
components {
DistanceSensor(NativeLibrarySpec) {
sources {
Expand All @@ -54,11 +57,13 @@ model {
binaries.all {
lib library: "DistanceSensorDriver", linkage: 'shared'
}

nativeUtils.useRequiredLibrary(it, "wpilib_shared")
}
DistanceSensorDriver(JniNativeLibrarySpec) {
enableCheckTask true
javaCompileTasks << compileJava
jniCrossCompileOptions << JniCrossCompileOptions('athena')
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.roborio)
sources {
cpp {
source {
Expand All @@ -70,12 +75,17 @@ model {
}
}
}
nativeUtils.useRequiredLibrary(it, "wpilib_shared")
}
}
}

javadoc {
options.addBooleanOption('-no-module-directories', true)
}

apply from: 'publish.gradle'

wrapper {
gradleVersion = '5.0'
gradleVersion = '6.0'
}
Loading

0 comments on commit 151486c

Please sign in to comment.