-
Notifications
You must be signed in to change notification settings - Fork 394
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
Error generating BuildConfig with transitive AAR dependency without classes.jar #640
Comments
Hmm looks like an edge case that hasn't been well covered yet. |
I too have trouble getting |
Nevermind I just figured this out. I had to add a second repository: <repositories>
<repository>
<id>project.local1</id>
<name>LocalSdkAndroidRepository</name>
<url>file:${env.ANDROID_HOME}/extras/android/m2repository</url>
</repository>
<repository>
<id>project.local2</id>
<name>LocalSdkGoogleRepository</name>
<url>file:${env.ANDROID_HOME}/extras/google/m2repository</url>
</repository>
</repositories> |
Hello |
I've the same problem (in a multimodule maven project), but I discovered that if you don't make a "mvn clean package", but only a "mvn package", it works. Looking at the extended log (-X) it seems that the plugin deleted the unpacked-libs after the modules that use it. |
Can you post a cut down project on Github that clearly shows the failure? |
We have the same issue. Judging from the logs it looks it the error occurs in isBuildConfigPresent. It should be fairly easy to fix it. One just needs to catch FileNotFoundExceptions and return false. Something like this:
|
Sorry about the bad formatting. Markdown didn't like my code snippet for some strange reason. |
Can you send this as a PR instead so you end up in the changelog? |
Is this fixed with the 4.4.3 release I just cut? |
No, the problem still persists with 4.4.3. |
Closing old issues as part of cleanup effort. Feel free to re-open and submit a PR with fix. |
The problem still persists with 4.5.0 but we use the following workaround:
It is just that one command with both goals together can't run:
...but the workaround of two commands is not that bad. |
Hm .. that shoud work .. but I cant reproduce. Maybe you can try the above suggested patch (not sure where exactly to apply that) and test it and then send a PR with the fix. |
Hello, i'm experiencing the following issue compiling my project using the latest android-maven-plugin 4.2.1. However it happens when
com.google.android.gms:play-services:7.5.0
is a transitive dependency, not a direct one.My relevant dependency chain is as follows:
com.google.android.gms:play-services:7.5.0
(aar) <-myGroupId:coreProject
(aar) <-myGroupId:appProject
coreProject
depends onplay-services
, whileappProject
depends oncoreProject
. HowevercoreProject
builds fine whileappProject
fails with this error:As the error message suggests, i've verified that no
classes.jar
is found onappProject/target/unpacked-libs/cgag_play-services_7.5.0/
folder.I saw that similar issues were addressed on #618 and #626 (when .aar doesn't contain a
classes.jar
file), however both are closed. By the way, i use this project layout since a year ago. Problems arised when i tried to includeplay-services:7.5.0
to my core project (which in turn forced me to upgrade from android-maven-plugin 3.9.0-rc.3 to 4.2.1).The text was updated successfully, but these errors were encountered: