Advanced
Unsupported libraries#
Treat this section as a packaging rule, not a special escape hatch.
The template no longer uses fatImplementation.
This guide explains how to add libraries that your provider needs.
Configuration#
Use implementation(...) when the dependency must be packaged with the provider artifact.
Use compileOnly(...) when the host app/runtime already provides the dependency.
dependencies {
// Packaged inside the provider artifact
implementation("com.example.network:NetworkClient:1.0.0")
// Only available at compile time because the host provides it
compileOnly("org.jsoup:jsoup:1.18.1")
}Important notes#
implementation(...)is the default choice for bundled dependencies.compileOnly(...)keeps the artifact smaller when the library is already available in the host.- Avoid adding duplicate copies of libraries the app already ships with.
- If you see runtime errors such as
ClassNotFoundExceptionorNoClassDefFoundError, check whether the library belongs inimplementation(...)orcompileOnly(...).
