mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
ErrorProne fixes some Java 9 issues, vscode cpp fixes a bug and updates for lazy tasks, jni updates for lazy tasks
97 lines
2.2 KiB
Groovy
97 lines
2.2 KiB
Groovy
plugins {
|
|
id 'net.ltgt.errorprone' version '0.0.15'
|
|
id 'base'
|
|
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '2.1'
|
|
id 'edu.wpi.first.NativeUtils' version '1.7.1'
|
|
id 'edu.wpi.first.GradleJni' version '0.3.0'
|
|
id 'edu.wpi.first.GradleVsCode' version '0.4.1'
|
|
id 'idea'
|
|
id 'com.gradle.build-scan' version '1.15.1'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
buildScan {
|
|
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
|
|
termsOfServiceAgree = 'yes'
|
|
|
|
publishAlways()
|
|
}
|
|
|
|
ext.licenseFile = files("$rootDir/LICENSE.txt", "$rootDir/ThirdPartyNotices.txt")
|
|
|
|
// Ensure that the WPILibVersioningPlugin is setup by setting the release type, if releaseType wasn't
|
|
// already specified on the command line
|
|
if (!hasProperty('releaseType')) {
|
|
WPILibVersion {
|
|
releaseType = 'dev'
|
|
}
|
|
}
|
|
|
|
def pubVersion
|
|
if (project.hasProperty("publishVersion")) {
|
|
pubVersion = project.publishVersion
|
|
} else {
|
|
pubVersion = WPILibVersion.version
|
|
}
|
|
|
|
def outputsFolder = file("$buildDir/allOutputs")
|
|
|
|
def versionFile = file("$outputsFolder/version.txt")
|
|
|
|
task outputVersions() {
|
|
description = 'Prints the versions of wpilib to a file for use by the downstream packaging project'
|
|
group = 'Build'
|
|
outputs.files(versionFile)
|
|
|
|
doFirst {
|
|
buildDir.mkdir()
|
|
outputsFolder.mkdir()
|
|
}
|
|
|
|
doLast {
|
|
versionFile.write pubVersion
|
|
}
|
|
}
|
|
|
|
task libraryBuild() {}
|
|
|
|
build.dependsOn outputVersions
|
|
|
|
task copyAllOutputs(type: Copy) {
|
|
destinationDir outputsFolder
|
|
}
|
|
|
|
build.dependsOn copyAllOutputs
|
|
copyAllOutputs.dependsOn outputVersions
|
|
|
|
ext.addTaskToCopyAllOutputs = { task ->
|
|
copyAllOutputs.dependsOn task
|
|
copyAllOutputs.inputs.file task.archivePath
|
|
copyAllOutputs.from task.archivePath
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'idea'
|
|
|
|
apply from: "${rootDir}/shared/java/javastyle.gradle"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
// Disables doclint in java 8.
|
|
if (JavaVersion.current().isJava8Compatible()) {
|
|
tasks.withType(Javadoc) {
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
}
|
|
}
|
|
|
|
wrapper {
|
|
gradleVersion = '4.9'
|
|
}
|