Closed justinpapezsonos closed 1 year ago
@justinpapezsonos Thanks for sharing. We'll take a look.
Happy New Year, any updates that can be shared?
@justinpapezsonos I see this issue when you have a logger property file in your own module. You can try to add this to your app build.gradle:
packagingOptions {
pickFirst '**/android-logger.properties'
}
Let us know if it fixes your issue.
Does pickFirst
have deterministic behavior? As in, does pickFirst
guarantee that the android-logger.properties
file in my Android project will always be chosen before the android-logger.properties
file in my Gradle cache? I've not been able to find documentation that states that pickFirst
is deterministic.
@justinpapezsonos I also see lack of clear ordering definition, but it's expected be determined by the dependency order, and we observe deterministic in similar scenarios. If it's an option for you, you can also consider moving the logger property file to the main app, which will override the same-named resources from libs without error.
Great, thanks!
Issue
Task
:app:mergeDebugJavaResource
fails when trying to compile a multi-module Android application.Error
Application Structure
Implementation Details
feature-management
module includes the Optimizely Android SDK dependencyfeature-management
module includes theandroid-logger.properties
file atsrc/main/resources
per Optimizely's documentation: https://docs.developers.optimizely.com/full-stack/docs/customize-logger-androidapp
module is dependent onfeature-management
moduleEnvironment Details
Miscellaneous
Invoke the
build
Gradle task alongside of this bare bones multi-module Android sample app to reproduce the behavior outlined in this GitHub Issue.