RepoPilot

square / retrofit

Search square/retrofit

GitHub

Code

How square/retrofit is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Suggested starting pointAI
  4. Suggested starting pointAI
  5. Suggested starting pointAI
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new HTTP API endpoint

  • Create a Java interface with method signature using @GET/@POST/@PUT/@DELETE and parameter annotations like @Path, @Query, @Body.
  • Call retrofit.create(YourInterface.class) to generate a proxy implementation from RequestFactory parsing.
  • Call the proxy method to get a Call object, then execute().body() synchronously or enqueue(callback) asynchronously.

Add support for a new serialization format (JSON, XML, Protobuf, etc.)

  • Create a class implementing Converter.Factory with converterFactory(Type, Annotation[], Retrofit) returning Converter instances.
  • Register your factory via retrofit.addConverterFactory(yourFactory) before calling create().

Add support for custom return types (Future, Observable, Single, etc.)

  • Create a class implementing CallAdapter.Factory with get(Type, Annotation[], Retrofit) returning a CallAdapter.
  • Implement CallAdapter.adapt(Call) to wrap the Call in your target return type (e.g., CompletableFuture.supplyAsync).
  • Register your adapter via retrofit.addCallAdapterFactory(yourFactory) before calling create().

Add request/response interceptor or logging

  • Create an OkHttp Interceptor and add it to OkHttpClient.Builder via addInterceptor() before passing to Retrofit.
  • Intercept request/response via chain.proceed() to log, modify headers, or inject tokens.

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • No public API or start-up file could be picked out from the file names.

Code quality and hotspots

Largest source files

  • Branch points40 per file on average
  • Code issues0 errors, 5 warnings
  • Largest file876 lines
  • Hotspot load0 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions2 workflows
  • Tests140 test filesJUnit · 0.66 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava · retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2 · retrofit-adapters/guava/src/test/java/retrofit2/adapter/guava

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.