Skip to content

Commit

Permalink
Update to 2023 alpha (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse authored Oct 17, 2022
1 parent e6807c2 commit 3a60f80
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 30 deletions.
2 changes: 1 addition & 1 deletion vscode-wpilib/locale/zh-cn/package.i18n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ wpilibcore.help.title: 打开 WPILib 帮助
wpilibcore.openCommandPalette.title: 打开 WPILib 的命令面板
wpilibcore.refreshCppProperties.title: 更新 Gradle C++ 属性
wpilibcore.selectCppToolchain.title: 选择当前的 C++ 工具链
wpilibcore.importGradle2020Project.title: 将 Gradle 2020/2021 项目迁移到 VSCode
wpilibcore.importGradle2020Project.title: 将 Gradle 2020/2021/2022 项目迁移到 VSCode
wpilibcore.createNewProject.title: 创建一个新项目
wpilibcore.manageVendorLibs.title: 管理外部供应商库
wpilibcore.setJavaHome.title: 设置 Java 环境
Expand Down
2 changes: 1 addition & 1 deletion vscode-wpilib/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"wpilibcore.openCommandPalette.title": "Open WPILib Command Palette",
"wpilibcore.refreshCppProperties.title": "Refresh C++ Intellisense",
"wpilibcore.selectCppToolchain.title": "Select Current C++ Toolchain",
"wpilibcore.importGradle2020Project.title": "Import a WPILib 2020/2021 Gradle project",
"wpilibcore.importGradle2020Project.title": "Import a WPILib 2020/2021/2022 Gradle project",
"wpilibcore.createNewProject.title": "Create a new project",
"wpilibcore.manageVendorLibs.title": "Manage Vendor Libraries",
"wpilibcore.setJavaHome.title": "Set VS Code Java Home to FRC Home",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2022",
"projectYear": "2023Beta",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2022",
"projectYear": "2023Beta",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2022",
"projectYear": "2023Beta",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2022",
"projectYear": "2023Beta",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2022",
"projectYear": "2023Beta",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2022",
"projectYear": "2023Beta",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2022",
"projectYear": "2023Beta",
"teamNumber": -1
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=permwrapper/dists
16 changes: 11 additions & 5 deletions vscode-wpilib/resources/gradle/shared/gradlew
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions vscode-wpilib/resources/gradle/shared/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
2 changes: 1 addition & 1 deletion vscode-wpilib/resources/gradle/shared/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
String frcYear = '2022'
String frcYear = '2023'
File frcHome
if (OperatingSystem.current().isWindows()) {
String publicFolder = System.getenv('PUBLIC')
Expand Down
2 changes: 1 addition & 1 deletion vscode-wpilib/resources/gradle/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023.0.0-alpha-1
2023.1.1-alpha-1
4 changes: 2 additions & 2 deletions vscode-wpilib/resources/webviews/gradle2020import.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>

<head>
<title>WPILib 2020/2021 Project Import</title>
<title>WPILib 2020/2021/2022 Project Import</title>
<style>
.error {
color: red;
Expand All @@ -17,7 +17,7 @@
<body>
<img src="replaceresource/resources/wpilib.svg" width="100" />

<h1>Welcome to WPILib 2020/2021 Project Importer</h1>
<h1>Welcome to WPILib 2020/2021/2022 Project Importer</h1>

The import process copies your project source files from the current directory to a new directory and completely regenerates the gradle files. If you made non-standard updates to the build.gradle, you will need to make those changes again. For this reason, in place upgrades are not supported. It is also necessary to import vendor libraries again, since last year's vendor libraries must be updated to be compatible with this year's projects. See <a href="https://docs.wpilib.org/en/stable/docs/software/wpilib-overview/importing-gradle-project.html">Importing a Gradle Project</a> on frc-docs for more details.
<br/>
Expand Down
6 changes: 3 additions & 3 deletions vscode-wpilib/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ async function handleAfterTrusted(externalApi: ExternalAPI, context: vscode.Exte
continue;
}

if (prefs.getProjectYear() !== '2022') {
const importPersistantState = new PersistentFolderState('wpilib.2022persist', false, w.uri.fsPath);
if (prefs.getProjectYear() !== '2023Beta') {
const importPersistantState = new PersistentFolderState('wpilib.2023Betapersist', false, w.uri.fsPath);
if (importPersistantState.Value === false) {
const upgradeResult = await vscode.window.showInformationMessage(i18n('message',
'This project is not compatible with this version of the extension. Would you like to import this project into 2022?'), {
'This project is not compatible with this version of the extension. Would you like to import this project into 2023 Beta?'), {
modal: true,
}, 'Yes', 'No', 'No, Don\'t ask again');
if (upgradeResult === 'Yes') {
Expand Down
2 changes: 1 addition & 1 deletion vscode-wpilib/src/shared/utilitiesapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class UtilitiesAPI implements IUtilitiesAPI {
private wpilibHome: string | undefined;

public getFrcYear(): string {
return '2022';
return '2023';
}
public getWPILibHomeDir(): string {
if (this.wpilibHome) {
Expand Down
2 changes: 1 addition & 1 deletion vscode-wpilib/src/webviews/gradle2020import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Gradle2020Import extends WebViewBase {
private hasEnabledHandler: boolean = false;

private constructor(resourceRoot: string) {
super('wpilibgradle2020import', 'WPILib Gradle 2020/2021 Import', resourceRoot);
super('wpilibgradle2020import', 'WPILib Gradle 2020-2022 Import', resourceRoot);

this.disposables.push(vscode.commands.registerCommand('wpilibcore.importGradle2020Project', () => {
return this.startWebpage();
Expand Down

0 comments on commit 3a60f80

Please sign in to comment.