Skip to content

Publish a Gradle Version Catalog #4762

Description

@hmzgtl16

Description

With the widespread adoption of Gradle Version Catalogs in the Android and Kotlin ecosystems, it would be highly beneficial if Retrofit published its own version catalog alongside its artifacts.

Currently, consumers of Retrofit often use multiple related dependencies (the core library, various converters like converter-moshi or converter-gson, and adapters). While a BOM (Bill of Materials) helps with version alignment, a published Version Catalog would provide pre-configured type-safe dependency accessors for Gradle users out of the box, eliminating boilerplate configuration.

Proposed Solution

Publish a Gradle Version Catalog to Maven Central that defines the library versions, libraries, and potentially bundles for common Retrofit setups.

Example usage for a consumer:

// settings.gradle.kts
dependencyResolutionManagement {
    versionCatalogs {
        create("retrofitLibs") {
            from("com.squareup.retrofit2:retrofit-version-catalog:<version>")
        }
    }
}

// build.gradle.kts
dependencies {
    implementation(retrofitLibs.retrofit)
    implementation(retrofitLibs.converter.moshi)
}

Additional Context

Many modern libraries and frameworks (Ktor, Exposed) are increasingly relying on Catalogs and BOMs to simplify multi-module dependency declarations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions