react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

Compatibility with Android product flavors

Open dev6james opened this issue 5 years ago • 4 comments

Right now this library depends on the launch_image being located under src/main/res/layout/launch_image.

However, Android allows you to configure product flavors each with their own asset source sets. That means you may have a separate launch_image per source set.

https://developer.android.com/studio/build/build-variants

Using source sets, the path the launch_image would become src/[Product Flavor]/res/layout/launch_image

dev6james avatar Feb 21 '19 23:02 dev6james

Ok, the use of publishNonDefault: true in app/build.gradle solved this for me. I wonder if this should be documented for the library somehow, or if this is out of scope.

dev6james avatar Feb 21 '19 23:02 dev6james

Hey @dev6james,

Do you have a sample of how you did it?

yashlinmaistry avatar Sep 06 '19 21:09 yashlinmaistry

Ok, the use of publishNonDefault: true in app/build.gradle solved this for me. I wonder if this should be documented for the library somehow, or if this is out of scope.

@dev6james was this all that needed to be added?

dooleyb1 avatar Mar 07 '22 17:03 dooleyb1

@dooleyb1 current me does not remember, but I think the comment from past me was accurate at the time! But that was 3 years ago so don't know how newer Android versions impact this. I'm not currently working with React Native.

dev6james avatar Mar 07 '22 19:03 dev6james