Package io.root.patcher
Class RootIoClient
java.lang.Object
io.root.patcher.RootIoClient
HTTP client for querying the Root.io
/v3/analyze/maven API, with exponential backoff retries.-
Constructor Summary
ConstructorsConstructorDescriptionRootIoClient(int maxRetries, long baseDelayMs) Creates a client with the given retry settings and exponential backoff. -
Method Summary
-
Constructor Details
-
RootIoClient
public RootIoClient(int maxRetries, long baseDelayMs) Creates a client with the given retry settings and exponential backoff.- Parameters:
maxRetries- maximum number of retry attempts after the initial requestbaseDelayMs- base delay in milliseconds; doubles on each subsequent attempt
-
-
Method Details
-
query
Query the Root.io API for a patch for the given dependency, with exponential backoff retries. Retries on network errors and 5xx responses; fails immediately on 4xx.- Parameters:
coords- Maven GAV string — "group:artifact:version"apiUrl- Root.io API base URL (e.g. "...")apiKey- Root.io API key (used as HTTP basic auth username)- Returns:
- patched GAV string ("io.root.group:artifact:version"), or null if no patch
- Throws:
org.gradle.api.GradleException- after all retries are exhausted, or immediately on 4xx
-