Skip to content

Commit 0072ec9

Browse files
committed
Update Download plugin version for parallel downloads
Allows parallel builds which is useful for installer, and installer version and native-utils version need to be API compatible for toolchain installation Update version to 2026.0.0 since downstream tools need to update the download plugin also
1 parent a82a2e3 commit 0072ec9

File tree

6 files changed

+25
-11
lines changed

6 files changed

+25
-11
lines changed

ToolchainPlugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies {
1818
// For some utility classes. We don't actually apply DeployUtils to the FRCToolchain,
1919
// but we do in GradleRIO
2020
api 'edu.wpi.first:DeployUtils:2025.2.0'
21-
api 'de.undercouch:gradle-download-task:4.0.1'
21+
api 'de.undercouch:gradle-download-task:5.6.0'
2222

2323
testImplementation('org.spockframework:spock-core:2.0-M4-groovy-3.0') {
2424
exclude group: 'org.codehaus.groovy'

ToolchainPlugin/src/main/java/edu/wpi/first/toolchain/DefaultToolchainInstaller.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.io.File;
1212
import java.io.IOException;
1313
import java.net.URL;
14+
import java.util.concurrent.ExecutionException;
1415

1516
public class DefaultToolchainInstaller extends AbstractToolchainInstaller {
1617

@@ -39,9 +40,14 @@ public void install(Project project) {
3940
action.src(source);
4041
action.dest(dst);
4142
action.overwrite(false);
42-
action.execute();
43+
action.retries(1);
44+
action.execute().get();
4345
} catch (IOException e) {
4446
throw new GradleException("Could not download toolchain", e);
47+
} catch (InterruptedException e) {
48+
throw new GradleException("Could not download toolchain, interrupted", e);
49+
} catch (ExecutionException e) {
50+
throw new GradleException("Could not download toolchain, failed", e);
4551
}
4652

4753
if (action.isUpToDate()) {

ToolchainPlugin/src/main/java/edu/wpi/first/toolchain/opensdk/OpenSdkToolchainBase.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.io.File;
44
import java.net.MalformedURLException;
5+
import java.net.URI;
6+
import java.net.URISyntaxException;
57
import java.net.URL;
68

79
import org.gradle.api.GradleException;
@@ -69,9 +71,9 @@ private String toolchainRemoteFile() {
6971
public URL toolchainDownloadUrl() {
7072
String file = toolchainRemoteFile();
7173
try {
72-
return new URL("https://github.com/wpilibsuite/opensdk/releases/download/" + tcExt.getToolchainTag().get()
73-
+ "/" + file);
74-
} catch (MalformedURLException e) {
74+
return new URI("https://github.com/wpilibsuite/opensdk/releases/download/" + tcExt.getToolchainTag().get()
75+
+ "/" + file).toURL();
76+
} catch (MalformedURLException | URISyntaxException e) {
7577
throw new RuntimeException(e);
7678
}
7779
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ java {
1313

1414
allprojects {
1515
group = "edu.wpi.first"
16-
version = "2025.12.3"
16+
version = "2026.0.0"
1717

1818
if (project.hasProperty('publishVersion')) {
1919
version = project.publishVersion

src/main/java/edu/wpi/first/nativeutils/vendordeps/VendorDepTask.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.nio.file.Files;
77
import java.nio.file.Path;
88
import java.nio.file.StandardCopyOption;
9+
import java.util.concurrent.ExecutionException;
910

1011
import org.gradle.api.DefaultTask;
1112
import org.gradle.api.file.Directory;
@@ -39,10 +40,12 @@ public void update() {
3940

4041
/**
4142
* Installs the JSON file
42-
* @throws java.io.IOException throws on ioexception
43+
* @throws ExecutionException if completed exceptionally
44+
* @throws InterruptedException if cancelled
45+
* @throws IOException if the download fails
4346
*/
4447
@TaskAction
45-
public void install() throws IOException {
48+
public void install() throws IOException, InterruptedException, ExecutionException {
4649
if (update) {
4750
Gson gson = new GsonBuilder().create();
4851
Object property = getProject().findProperty(WPIVendorDepsExtension.NATIVEUTILS_VENDOR_FOLDER_PROPERTY);
@@ -167,10 +170,13 @@ private void copyLocal(String filename, Path dest) {
167170
/**
168171
* Download a vendor JSON file from a URL
169172
* @param dest the destination file
173+
* @throws ExecutionException if completed exceptionally
174+
* @throws InterruptedException if cancelled
175+
* @throws IOException if the download fails
170176
*/
171-
private void downloadRemote(Path dest) throws IOException {
177+
private void downloadRemote(Path dest) throws IOException, InterruptedException, ExecutionException {
172178
downloadAction.src(url);
173179
downloadAction.dest(dest.toFile());
174-
downloadAction.execute();
180+
downloadAction.execute().get();
175181
}
176182
}

testing/cpp/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import edu.wpi.first.nativeutils.vendordeps.WPIVendorDepsPlugin
33

44
plugins {
55
id "cpp"
6-
id "edu.wpi.first.NativeUtils" version "2025.12.3"
6+
id "edu.wpi.first.NativeUtils" version "2026.0.0"
77
}
88

99
nativeUtils.addWpiNativeUtils()

0 commit comments

Comments
 (0)