Skip to content

Commit b64b85d

Browse files
committed
Fix gradle plugin trying to preload non-existent sources.
1 parent 0d341c1 commit b64b85d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/.idea
33
/build
44
/lib/*
5-
/.gradle/
5+
.gradle/
66
/.settings/
77
/out/
88
/bin/

dev/src/main/groovy/com/fox2code/foxloader/dev/GradlePlugin.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ class GradlePlugin implements Plugin<Project> {
182182
}
183183
project.dependencies {
184184
implementation(dependency.name)
185-
sourcePreDownload(dependency.name + ":sources")
185+
if (!DependencyHelper.skipDevSources(dependency)) {
186+
sourcePreDownload(dependency.name + ":sources")
187+
}
186188
}
187189
}
188190
project.configurations.configureEach {

patching/src/main/java/com/fox2code/foxloader/dependencies/DependencyHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ private static boolean checkHashOrDeleteEx(File file, Dependency dependency, boo
334334
return true;
335335
}
336336

337+
public static boolean skipDevSources(Dependency dependency) {
338+
return dependency.name.startsWith("com.unascribed:ears-");
339+
}
340+
337341
public static class Agent {
338342
private static Instrumentation inst = null;
339343

0 commit comments

Comments
 (0)