Status Update
Comments
jl...@google.com <jl...@google.com>
je...@google.com <je...@google.com>
sa...@gmail.com <sa...@gmail.com> #2
I'm also seeing this issue with Material Components 1.3.0 and ConstraintLayout 2.1.0-alpha2
kr...@gmail.com <kr...@gmail.com> #3
Fixed with 2.1.0-beta01
sp...@google.com <sp...@google.com> #4
It's possible to set packagingOptions for specific variants or for the androidTest component in the androidComponents
block. See
Description
Android Studio 4.1.2
Build #AI-201.8743.12.41.7042882, built on December 19, 2020
Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.7
GC: ParNew, ConcurrentMarkSweep
Memory: 4012M
Cores: 12
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true
Non-Bundled Plugins: org.intellij.plugins.markdown, com.intellij.marketplace, org.jetbrains.kotlin, com.jetbrains.kmm
The scenario is this - we have several projects, each with native components, that have various dependencies on one another. I have a library project that depends on each of these projects, and also has its own native component. Managing the packaging of all these native libraries quickly becomes very difficult. We have it configured so that each project only includes its own native libraries in the aar artifact packaging (to avoid duplicates everywhere these projects are used as dependencies). However,
packagingOptions
not only applies to the library artifact, it also applies to the test APK that is generated to run connected tests. This means we end up with some rather unsavory workarounds to ensure that the right native libraries end up being included in the test APK. We should be able to specify separate packaging options for each of these targets.