From 4bfa172d9eee0b50768815d7b6fc61fc8907023d Mon Sep 17 00:00:00 2001 From: Zach Harel Date: Mon, 3 Aug 2026 10:36:32 -0400 Subject: [PATCH] feat: add support for NextFTC v2 in Gradle configuration and library selection --- index.ts | 4 +++- src/gradle.ts | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index aafd406..86f1aa4 100644 --- a/index.ts +++ b/index.ts @@ -27,7 +27,7 @@ const defaultDirectory = process.cwd(); const validDirectory = /^[\w -]+$/; type Template = "empty" | "pedro"; -type Library = "sloth" | "kotlin"; +type Library = "sloth" | "kotlin" | "nextftc"; const inputs = await group( { @@ -64,6 +64,7 @@ const inputs = await group( options: [ { value: "kotlin", label: "Kotlin" }, { value: "sloth", label: "Sloth" }, + { value: "nextftc", label: "NextFTC v2" }, ], required: false, }), @@ -111,6 +112,7 @@ steps.push( inputs.template == "pedro", inputs.libraries.includes("sloth"), inputs.libraries.includes("kotlin"), + inputs.libraries.includes("nextftc"), ); await writeFile(file, newGradle, "utf-8"); return "Wrote Gradle files"; diff --git a/src/gradle.ts b/src/gradle.ts index 8b17e10..9927b0d 100644 --- a/src/gradle.ts +++ b/src/gradle.ts @@ -32,6 +32,7 @@ export function createGradle( pedro: boolean, sloth: boolean, kotlin: boolean, + nextftc: boolean, ): string { const version = getVersion(oldGradle); @@ -47,6 +48,12 @@ export function createGradle( sloth && block("dairy", ["implementation(Sloth)"]), pedro && block("pedro", ["implementation(ftc)", "implementation(telemetry)"]), + nextftc && + block("next.v2", [ + "implementation(control)", + "implementation(hardware)", + "implementation(robot)", + ]), ]); return `${plugins}\n\n${ftc}`;