Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ToolchainPlugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
// For some utility classes. We don't actually apply DeployUtils to the FRCToolchain,
// but we do in GradleRIO
api 'edu.wpi.first:DeployUtils:2025.2.0'
api 'de.undercouch:gradle-download-task:4.0.1'
api 'de.undercouch:gradle-download-task:5.6.0'

testImplementation('org.spockframework:spock-core:2.0-M4-groovy-3.0') {
exclude group: 'org.codehaus.groovy'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.ExecutionException;

public class DefaultToolchainInstaller extends AbstractToolchainInstaller {

Expand Down Expand Up @@ -39,9 +40,14 @@ public void install(Project project) {
action.src(source);
action.dest(dst);
action.overwrite(false);
action.execute();
action.retries(1);
action.execute().get();
} catch (IOException e) {
throw new GradleException("Could not download toolchain", e);
} catch (InterruptedException e) {
throw new GradleException("Could not download toolchain, interrupted", e);
} catch (ExecutionException e) {
throw new GradleException("Could not download toolchain, failed", e);
}

if (action.isUpToDate()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.io.File;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

import org.gradle.api.GradleException;
Expand Down Expand Up @@ -69,9 +71,9 @@ private String toolchainRemoteFile() {
public URL toolchainDownloadUrl() {
String file = toolchainRemoteFile();
try {
return new URL("https://github.com/wpilibsuite/opensdk/releases/download/" + tcExt.getToolchainTag().get()
+ "/" + file);
} catch (MalformedURLException e) {
return new URI("https://github.com/wpilibsuite/opensdk/releases/download/" + tcExt.getToolchainTag().get()
+ "/" + file).toURL();
} catch (MalformedURLException | URISyntaxException e) {
throw new RuntimeException(e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ java {

allprojects {
group = "edu.wpi.first"
version = "2025.12.3"
version = "2026.0.0"

if (project.hasProperty('publishVersion')) {
version = project.publishVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.util.concurrent.ExecutionException;

import org.gradle.api.DefaultTask;
import org.gradle.api.file.Directory;
Expand Down Expand Up @@ -39,10 +40,12 @@ public void update() {

/**
* Installs the JSON file
* @throws java.io.IOException throws on ioexception
* @throws ExecutionException if completed exceptionally
* @throws InterruptedException if cancelled
* @throws IOException if the download fails
*/
@TaskAction
public void install() throws IOException {
public void install() throws IOException, InterruptedException, ExecutionException {
if (update) {
Gson gson = new GsonBuilder().create();
Object property = getProject().findProperty(WPIVendorDepsExtension.NATIVEUTILS_VENDOR_FOLDER_PROPERTY);
Expand Down Expand Up @@ -167,10 +170,13 @@ private void copyLocal(String filename, Path dest) {
/**
* Download a vendor JSON file from a URL
* @param dest the destination file
* @throws ExecutionException if completed exceptionally
* @throws InterruptedException if cancelled
* @throws IOException if the download fails
*/
private void downloadRemote(Path dest) throws IOException {
private void downloadRemote(Path dest) throws IOException, InterruptedException, ExecutionException {
downloadAction.src(url);
downloadAction.dest(dest.toFile());
downloadAction.execute();
downloadAction.execute().get();
}
}
2 changes: 1 addition & 1 deletion testing/cpp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import edu.wpi.first.nativeutils.vendordeps.WPIVendorDepsPlugin

plugins {
id "cpp"
id "edu.wpi.first.NativeUtils" version "2025.12.3"
id "edu.wpi.first.NativeUtils" version "2026.0.0"
}

nativeUtils.addWpiNativeUtils()
Expand Down
Loading