Skip to content

okhttp-bom inside a library not passing through to the app #5919

@AfzalivE

Description

@AfzalivE

I have a library (let's call it mylibrary) which imports okhttp like this:

    api platform("com.squareup.okhttp3:okhttp-bom:4.4.1")
    api 'com.squareup.okhttp3:okhttp'
    api 'com.squareup.okhttp3:okhttp-urlconnection'
    api 'com.squareup.okhttp3:logging-interceptor'

I publish that on artifactory and other apps use it. In the app's build.gradle file, they do:

    implementation "com.company:mylibrary:2.0.0"

But when they sync their apps, they get this:

Failed to resolve: com.squareup.okhttp3:okhttp:

I'm not sure if this is a limitation of gradle's BoM support or this is something in the okhttp-bom setup though. Tried googling but didn't find any info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    build-ciBuild infra relatedstackoverflowReferred to stackoverflow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions