Class DependencyResolution
java.lang.Object
io.github.intisy.gradle.github.plugin.DependencyResolution
Resolves each GitHub dependency configuration's declared dependencies into local JAR files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapply(org.gradle.api.Project project, Logger logger, GithubExtension githubExtension, Releases releases) Same asapply(Project, Logger, GithubExtension, Releases, Set), with a fresh, private dedup set: nothing outside the GitHub branches shares it.static voidapply(org.gradle.api.Project project, Logger logger, GithubExtension githubExtension, Releases releases, Set<File> addedJars) Resolves everygithubImplementation/githubApi/etc.
-
Constructor Details
-
DependencyResolution
public DependencyResolution()
-
-
Method Details
-
apply
public static void apply(org.gradle.api.Project project, Logger logger, GithubExtension githubExtension, Releases releases) Same asapply(Project, Logger, GithubExtension, Releases, Set), with a fresh, private dedup set: nothing outside the GitHub branches shares it.- Parameters:
project- the project whose GitHub dependency configurations are resolved.logger- receives diagnostic output.githubExtension- the extension supplyingresilience.skipOnRateLimit.releases- the client used to resolve each dependency to a jar.
-
apply
public static void apply(org.gradle.api.Project project, Logger logger, GithubExtension githubExtension, Releases releases, Set<File> addedJars) Resolves everygithubImplementation/githubApi/etc. dependency into a local jar and adds it to the matching native Gradle configuration, after the project is evaluated.- Parameters:
project- the project whose GitHub dependency configurations are resolved.logger- receives diagnostic output.githubExtension- the extension supplyingresilience.skipOnRateLimit.releases- the client used to resolve each dependency to a jar.addedJars- the dedup filter, keyed by resolvedFile; pass the same set given toSourcesResolution.apply(org.gradle.api.Project, io.github.intisy.gradle.github.plugin.Logger, io.github.intisy.gradle.github.plugin.extension.SourcesExtension, io.github.intisy.gradle.github.api.capability.SourceBuilds, io.github.intisy.gradle.github.api.capability.Downloads, java.util.Set<java.io.File>)so a jar reachable from both agithub*coordinate and asources { }entry is added to a native configuration only once.- Implementation Note:
Releases.resolveWithDependencies(java.lang.String, java.lang.String, java.lang.String)deduplicates cycles only within a single call.addedJarsextends that dedup across every configuration, every branch, and everysources { }entry: the no-classifier branch (Releases.resolveWithDependencies(java.lang.String, java.lang.String, java.lang.String)), the:allbranch (Releases.downloadAllModuleJars(java.lang.String, java.lang.String, java.lang.String)), the explicit-classifier branch (Releases.downloadJar(String, String, String, String)), andSourcesResolutionall consult it, keyed by the resolvedFile. The guarantee is only as strong as the cache-naming scheme behind thatFile: both the release cache and the source-build cache key a jar by unescaped"-"-joined string concatenation (owner, repo, version or commit), so two logically distinct artifacts could in principle collide on the same path and be treated as one jar. The url-download cache sidesteps this by keying on a hash of the URL instead.
-