001/* 002 * MIT License 003 * 004 * Copyright (c) PhotonVision 005 * 006 * Permission is hereby granted, free of charge, to any person obtaining a copy 007 * of this software and associated documentation files (the "Software"), to deal 008 * in the Software without restriction, including without limitation the rights 009 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 010 * copies of the Software, and to permit persons to whom the Software is 011 * furnished to do so, subject to the following conditions: 012 * 013 * The above copyright notice and this permission notice shall be included in all 014 * copies or substantial portions of the Software. 015 * 016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 017 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 018 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 019 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 020 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 021 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 022 * SOFTWARE. 023 */ 024 025package org.photonvision; 026 027/* 028 * Autogenerated file! Do not manually edit this file. This version is regenerated 029 * any time the publish task is run, or when this file is deleted. 030 */ 031 032import java.util.regex.Matcher; 033import java.util.regex.Pattern; 034 035@SuppressWarnings("ALL") 036public final class PhotonVersion { 037 public static final String versionString = "dev-v2025.3.1-56-g7c68cfa0"; 038 public static final String buildDate = "2025-4-15 02:44:05"; 039 public static final boolean isRelease = !versionString.startsWith("dev"); 040 041 // Versions of dependant libraries 042 public static final String wpilibTargetVersion = "2025.3.2"; 043 public static final String opencvTargetVersion = "4.10.0"; 044 045 public static final boolean versionMatches(String other) { 046 String c = versionString; 047 Pattern p = Pattern.compile("v[0-9]+.[0-9]+.[0-9]+"); 048 Matcher m = p.matcher(c); 049 if (m.find()) { 050 c = m.group(0); 051 } else { 052 return false; 053 } 054 m = p.matcher(other); 055 if (m.find()) { 056 other = m.group(0); 057 } else { 058 return false; 059 } 060 return c.equals(other); 061 } 062}