google / google/bundletool

aapt2-proto dependency required for public API but not available

Open
#177 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
4k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Using 1.1.0 as a library from maven.google.com has a dependency declared on 'aapt2-proto' in the `pom.xml` as `runtime`. This means that it will be present on the runtime classpath but not on the compile-time classpath. This means that if you try to invoke API functions which accept or return these types your code will not resolve.

For example, create a project which depends on 1.1.0 and try to call `com.android.tools.build.bundletool.model.utils.xmlproto.XmlProtoNode`'s constructor with an `XmlNode`. This is impossible because the dependency is not on the compile classpath. You are required to maintain an explicit dependency on 'aapt2-proto' yourself which requires keeping it in sync with bundletool which isn't great.

The aapt2-proto dependency should likely be switched from `shadow` to `api` and the redundant shadow exclude of `com.android.aapt` can then be removed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.