Skip to content

Commit

Permalink
Update gradle to 8.1 and project year to 2024alpha (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
sciencewhiz authored Aug 21, 2023
1 parent 6099cfd commit 7c3bccb
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 27 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 @@ -21,7 +21,7 @@ wpilibcore.help.title: 打开 WPILib 帮助
wpilibcore.openCommandPalette.title: 打开 WPILib 的命令面板
wpilibcore.refreshCppProperties.title: 更新 Gradle C++ 属性
wpilibcore.selectCppToolchain.title: 选择当前的 C++ 工具链
wpilibcore.importGradle2020Project.title: 将 Gradle 2020/2021/2022 项目迁移到 VSCode
wpilibcore.importGradle2020Project.title: 将 Gradle 2020-2023 项目迁移到 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 @@ -24,7 +24,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/2022 Gradle project",
"wpilibcore.importGradle2020Project.title": "Import a WPILib 2020-2023 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": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": true,
"currentLanguage": "cpp",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2023",
"projectYear": "2024alpha",
"teamNumber": -1
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=permwrapper/dists
19 changes: 12 additions & 7 deletions vscode-wpilib/resources/gradle/shared/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -143,12 +140,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions vscode-wpilib/resources/gradle/shared/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

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 = '2023'
String frcYear = '2024'
File frcHome
if (OperatingSystem.current().isWindows()) {
String publicFolder = System.getenv('PUBLIC')
Expand Down
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/2022 Project Import</title>
<title>WPILib 2020-2023 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/2022 Project Importer</h1>
<h1>Welcome to WPILib 2020-2023 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() !== '2023') {
const importPersistantState = new PersistentFolderState('wpilib.2023persist', false, w.uri.fsPath);
if (prefs.getProjectYear() !== '2024alpha') {
const importPersistantState = new PersistentFolderState('wpilib.2024Alphapersist', 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 2023?'), {
'This project is not compatible with this version of the extension. Would you like to import this project into 2024?'), {
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 '2023';
return '2024';
}
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 onLoad?: () => Promise<void>;

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

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

0 comments on commit 7c3bccb

Please sign in to comment.