Skip to content
New issue

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

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

Already on GitHub? # to your account

Android Gradle Plugin 3.5.0 Compatibility #53

Closed
llDavidll opened this issue Aug 21, 2019 · 8 comments
Closed

Android Gradle Plugin 3.5.0 Compatibility #53

llDavidll opened this issue Aug 21, 2019 · 8 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@llDavidll
Copy link

Hi,

The latest Android Gradle plugin breaks the fat-aar plugin :

Cannot expand ZIP '****\intermediates\compile_only_not_namespaced_r_class_jar\release\generateReleaseRFile\R.jar' as it does not exist.

Path of the R.jar file with 3.4.2 :
intermediates\compile_only_not_namespaced_r_class_jar\release\generateReleaseRFile\R.jar
Path of the R.jar file with 3.5.0 :
intermediates\compile_only_not_namespaced_r_class_jar\release\R.jar

One step is really important : clean before trying to reproduce this error. Without a clean, old generated files are still present and are used by the plugin.

I think the fix should be made here by adding another case without the last part of the path (/generate${mVariant.name.capitalize()}RFile) :

ConfigurableFileCollection getRClassPath() {

I tried to build by manually puting the R.jar file in the old path and it seems to work, so it may be the only broken thing.

@llDavidll
Copy link
Author

I have another issue linked to the new Android Gradle Plugin :

  • Embed a dependency :
    embed 'your:dependency'
    Then build the project : the dependency is present in the aar.

  • Remove the dependency completely or replace "embed" by "api":
    api 'your:dependency'
    Build the project again. The dependency should not be in the aar, but it is.

  • Clean the project, rebuild : this time the dependency will not be in the aar.

This bug is only present in the 3.5.0.

@kezong kezong added the bug Something isn't working label Aug 22, 2019
@kezong
Copy link
Owner

kezong commented Aug 22, 2019

Thanks for your issue, I will take time to look at this.

@kezong kezong added the enhancement New feature or request label Aug 24, 2019
@krmao
Copy link

krmao commented Aug 27, 2019

I am also find this bug about classpath 'com.android.tools.build:gradle:3.5.0'

@victorlaerte
Copy link

Also got this issue. Downgrade for 3.4.2 works until this is fixed.

@kezong
Copy link
Owner

kezong commented Sep 2, 2019

I adapted 3.5.0 in fat-aar 1.2.6。
You can upgrade it.

@llDavidll
Copy link
Author

Great, both issues have been fixed. Thank you for your time !

@awushensky
Copy link

This issue has resurfaced with gradle 4.1.0. Seems to work ok on 4.0.2

@duanniston
Copy link

This issue has resurfaced with gradle 4.1.0. Seems to work ok on 4.0.2

Yes

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants