2021-01-14 21:45:26 -05:00
|
|
|
plugins {
|
2023-06-03 21:04:04 -04:00
|
|
|
id "com.diffplug.spotless" version "6.19.0"
|
2022-01-10 11:56:45 -08:00
|
|
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
2022-01-08 10:17:28 -08:00
|
|
|
id "com.github.node-gradle.node" version "3.1.1" apply false
|
2023-10-15 12:17:40 -04:00
|
|
|
id "edu.wpi.first.GradleJni" version "1.1.0"
|
|
|
|
|
id "edu.wpi.first.GradleVsCode" version "1.3.0"
|
|
|
|
|
id "edu.wpi.first.NativeUtils" version "2024.2.0" apply false
|
2021-01-18 22:12:57 -05:00
|
|
|
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
|
|
|
|
|
id "org.hidetake.ssh" version "2.10.1"
|
2023-10-15 12:17:40 -04:00
|
|
|
id 'edu.wpi.first.WpilibTools' version '1.1.0'
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
|
|
|
|
|
2022-12-16 17:05:23 -08:00
|
|
|
import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency;
|
|
|
|
|
|
2021-01-14 21:45:26 -05:00
|
|
|
allprojects {
|
|
|
|
|
repositories {
|
2022-10-31 08:32:49 -04:00
|
|
|
mavenCentral()
|
2022-12-27 10:47:20 -08:00
|
|
|
mavenLocal()
|
2021-01-18 22:12:57 -05:00
|
|
|
maven { url = "https://maven.photonvision.org/repository/internal/" }
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
2021-01-18 22:12:57 -05:00
|
|
|
wpilibRepositories.addAllReleaseRepositories(it)
|
|
|
|
|
wpilibRepositories.addAllDevelopmentRepositories(it)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Configure the version number.
|
|
|
|
|
apply from: "versioningHelper.gradle"
|
|
|
|
|
|
|
|
|
|
ext {
|
2023-10-15 12:17:40 -04:00
|
|
|
wpilibVersion = "2024.1.1-beta-1"
|
|
|
|
|
openCVversion = "4.8.0-1"
|
2021-01-18 22:12:57 -05:00
|
|
|
joglVersion = "2.4.0-rc-20200307"
|
2023-10-10 05:06:59 -04:00
|
|
|
javalinVersion = "5.6.2"
|
2023-10-15 12:17:40 -04:00
|
|
|
frcYear = "2024"
|
|
|
|
|
|
2021-01-18 22:12:57 -05:00
|
|
|
pubVersion = versionString
|
2021-02-23 15:07:43 -05:00
|
|
|
isDev = pubVersion.startsWith("dev")
|
2021-12-18 12:53:08 -05:00
|
|
|
|
2022-12-31 19:56:16 -08:00
|
|
|
// A list, for legacy reasons, with only the current platform contained
|
|
|
|
|
String nativeName = wpilibTools.platformMapper.currentPlatform.platformName;
|
|
|
|
|
if (nativeName == "linuxx64") nativeName = "linuxx86-64";
|
|
|
|
|
if (nativeName == "winx64") nativeName = "windowsx86-64";
|
|
|
|
|
if (nativeName == "macx64") nativeName = "osxx86-64";
|
|
|
|
|
if (nativeName == "macarm64") nativeName = "osxarm64";
|
|
|
|
|
jniPlatform = nativeName
|
|
|
|
|
println("Building for platform " + jniPlatform)
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
|
|
|
|
|
2022-12-16 17:05:23 -08:00
|
|
|
wpilibTools.deps.wpilibVersion = wpilibVersion
|
|
|
|
|
|
2021-01-14 21:45:26 -05:00
|
|
|
spotless {
|
|
|
|
|
java {
|
2022-01-08 10:17:28 -08:00
|
|
|
toggleOffOn()
|
2021-01-14 21:45:26 -05:00
|
|
|
googleJavaFormat()
|
|
|
|
|
indentWithTabs(2)
|
|
|
|
|
indentWithSpaces(4)
|
|
|
|
|
removeUnusedImports()
|
2022-01-08 10:17:28 -08:00
|
|
|
trimTrailingWhitespace()
|
|
|
|
|
endWithNewline()
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
|
|
|
|
java {
|
2021-01-18 22:12:57 -05:00
|
|
|
target "**/*.java"
|
|
|
|
|
targetExclude("photon-core/src/main/java/org/photonvision/PhotonVersion.java")
|
2021-10-18 22:31:18 -04:00
|
|
|
targetExclude("photon-lib/src/main/java/org/photonvision/PhotonVersion.java")
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
|
|
|
|
}
|
2023-10-15 12:17:40 -04:00
|
|
|
|
|
|
|
|
wrapper {
|
|
|
|
|
gradleVersion '8.3'
|
|
|
|
|
}
|