mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
* Bump to beta 2 * Reduce copy paste spam going forwards * Bump gradle * oops * fix gradlew * update gradle wrapper props * remove unused imports * Update node task * Fix shadowjar * fix more deps * ? * core works * revert changes to index * Formatting fixes * Update config.gradle * Fix PhotonLib gradle * fix tests and sim loading native libraries * re-enable macos build * fix? * Update build.gradle --------- Co-authored-by: Matt <matthew.morley.ca@gmail.com>
92 lines
2.7 KiB
Groovy
92 lines
2.7 KiB
Groovy
plugins {
|
|
id "com.diffplug.spotless" version "6.22.0"
|
|
id "edu.wpi.first.NativeUtils" version "2024.2.0" apply false
|
|
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
|
|
id "edu.wpi.first.GradleRIO" version "2024.1.1-beta-2"
|
|
id 'edu.wpi.first.WpilibTools' version '1.3.0'
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven { url = "https://maven.photonvision.org/repository/internal/" }
|
|
}
|
|
wpilibRepositories.addAllReleaseRepositories(it)
|
|
wpilibRepositories.addAllDevelopmentRepositories(it)
|
|
}
|
|
|
|
// Configure the version number.
|
|
apply from: "versioningHelper.gradle"
|
|
|
|
ext {
|
|
wpilibVersion = "2024.1.1-beta-2"
|
|
openCVversion = "4.8.0-1"
|
|
joglVersion = "2.4.0-rc-20200307"
|
|
javalinVersion = "5.6.2"
|
|
frcYear = "2024"
|
|
|
|
pubVersion = versionString
|
|
isDev = pubVersion.startsWith("dev")
|
|
|
|
// 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)
|
|
}
|
|
|
|
wpilibTools.deps.wpilibVersion = wpilibVersion
|
|
|
|
spotless {
|
|
java {
|
|
target fileTree('.') {
|
|
include '**/*.java'
|
|
exclude '**/build/**', '**/build-*/**', "photon-core\\src\\main\\java\\org\\photonvision\\PhotonVersion.java", "photon-lib\\src\\main\\java\\org\\photonvision\\PhotonVersion.java"
|
|
}
|
|
toggleOffOn()
|
|
googleJavaFormat()
|
|
indentWithTabs(2)
|
|
indentWithSpaces(4)
|
|
removeUnusedImports()
|
|
trimTrailingWhitespace()
|
|
endWithNewline()
|
|
}
|
|
groovyGradle {
|
|
target fileTree('.') {
|
|
include '**/*.gradle'
|
|
exclude '**/build/**', '**/build-*/**'
|
|
}
|
|
greclipse()
|
|
indentWithSpaces(4)
|
|
trimTrailingWhitespace()
|
|
endWithNewline()
|
|
}
|
|
format 'xml', {
|
|
target fileTree('.') {
|
|
include '**/*.xml'
|
|
exclude '**/build/**', '**/build-*/**', "**/.idea/**"
|
|
}
|
|
eclipseWtp('xml')
|
|
trimTrailingWhitespace()
|
|
indentWithSpaces(2)
|
|
endWithNewline()
|
|
}
|
|
format 'misc', {
|
|
target fileTree('.') {
|
|
include '**/*.md', '**/.gitignore'
|
|
exclude '**/build/**', '**/build-*/**'
|
|
}
|
|
trimTrailingWhitespace()
|
|
indentWithSpaces(2)
|
|
endWithNewline()
|
|
}
|
|
}
|
|
|
|
wrapper {
|
|
gradleVersion '8.4'
|
|
}
|