Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embedRelease or embedDebug buildType or productFlavours support #46

Closed
mochadwi opened this issue Aug 7, 2019 · 9 comments
Closed

embedRelease or embedDebug buildType or productFlavours support #46

mochadwi opened this issue Aug 7, 2019 · 9 comments

Comments

@mochadwi
Copy link

mochadwi commented Aug 7, 2019

Does it currently support different both buildTypes & productFlavours? @kezong

@mochadwi mochadwi changed the title embedRelease or embedDebug support embedRelease or embedDebug buildType or productFlavours support Aug 7, 2019
@kezong
Copy link
Owner

kezong commented Aug 8, 2019

Flavor is supported, you can build in assembleFlavorRelease or assembleFlavor2Debug, but for the time it is not supported to write like
flavorEmbed 'com.facebook.fresco:fresco:1.11.0'

@mochadwi
Copy link
Author

mochadwi commented Aug 8, 2019

I see, awesome. But like you stated above, currently, we can't use buildTypes or buildFlavours for embed keywords.

With the general assemble[WithFlavour&BuildType] the aar merging can't be processed, right?

@kezong

EDITED:
With the general embed[WithFlavour&BuildType] the aar merging can't be processed, right?

@kezong
Copy link
Owner

kezong commented Aug 8, 2019

With the general assemble[WithFlavour&BuildType], aar can be merged, and it is merged according to the customized of flavor & build type of each module.

@mochadwi
Copy link
Author

mochadwi commented Aug 8, 2019

My apologies look like I've been mistaken.

What I mean was, e.g:
embedDebug example:library:1.0.0-debug

Flavor is supported, you can build in assembleFlavorRelease or assembleFlavor2Debug, but for the time it is not supported to write like
flavorEmbed 'com.facebook.fresco:fresco:1.11.0'

As stated in your statement above. So the workaround will be using traditional approach e.g:
implementationDebug example:library:1.0.0-debug or

implementationRelease example:library:1.0.0-debug

Instead of embed when using implementation does the aar merging process skipped for that library? @kezong

@kezong
Copy link
Owner

kezong commented Aug 8, 2019

Sorry, I don't quite understand.
Do you mean debugImplementation or releaseImplementaion ?
For the time debugEmbed or releaseEmbed is not supported, if you write like this, will resulting a compile error.

@mochadwi
Copy link
Author

mochadwi commented Aug 8, 2019

Sorry, I don't quite understand.

Yes, sorry for the typo.

Do you mean debugImplementation or releaseImplementaion ?

What I mean was [debug|release]Implementation

For the time debugEmbed or releaseEmbed is not supported, if you write like this, will resulting a compile error.

roger that.

@mochadwi mochadwi closed this as completed Aug 8, 2019
@JirkaKrivanek
Copy link

Sorry, I am reading this thread third time and I am still confused, that is why I am trying to comment on it again...

Currently I have this in my gradle.build:

    debugImplementation 'com.gemalto.android.lib:http-real-debug:2.0.2'
    releaseImplementation 'com.gemalto.android.lib:http-real-release:2.0.2'

It is a MUST to have different dependency for debug resp. release (because the debug variant allows insecure HTTP connections while the release variant crashes on it).

Unfortunately, the http dependency is not embedded with the output AAR.

I would expect to be able to do something like this:

    debugEmbed 'com.gemalto.android.lib:http-real-debug:2.0.2'
    releaseEmbed 'com.gemalto.android.lib:http-real-release:2.0.2'

I already know that the intuitive way above does not work :)

From the thread above, I have a feeling that it actually is possible to achieve the effect somehow.

Could you please write a clear example for me?

@mochadwi
Copy link
Author

mochadwi commented Apr 9, 2020

No, it still not supported currently @JirkaKrivanek

@NMGuner
Copy link
Contributor

NMGuner commented Apr 17, 2020

Proposed a solution on #135 for build types and product flavors (only with single flavor dimension).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants