Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Load module dependency first by URL to inline behaviors with jup… #1259

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,13 @@ public void notifyPostModuleLifecycleChange(@NonNull ModuleWrapper wrapper, @Non
}
// ensure that the required properties are set
dependency.assertDefaultPropertiesSet();
// decide which way to go (by url or repository). In this case we start with the more common repository way
// decide which way to go (by url or repository). In this case we start with the developer defined url if there's one
if (dependency.url() != null) {
loadedDependencies.add(this.doLoadDependency(dependency, configuration, handler,
() -> this.moduleDependencyLoader.loadModuleDependencyByUrl(configuration, dependency)));
continue;
}
// check if the repository defined a repository for us to use
if (dependency.repo() != null) {
var repoUrl = Preconditions.checkNotNull(
repos.get(dependency.repo()),
Expand All @@ -468,12 +474,6 @@ public void notifyPostModuleLifecycleChange(@NonNull ModuleWrapper wrapper, @Non
() -> this.moduleDependencyLoader.loadModuleDependencyByRepository(configuration, dependency, repoUrl)));
continue;
}
// check if the repository defined a fixed download url for us to use
if (dependency.url() != null) {
loadedDependencies.add(this.doLoadDependency(dependency, configuration, handler,
() -> this.moduleDependencyLoader.loadModuleDependencyByUrl(configuration, dependency)));
continue;
}
// the dependency might be a dependency for a module, save this
pendingModuleDependencies.add(dependency);
}
Expand Down