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

Wrong placement of generated META-INF/services #110

Closed
almozavr opened this issue May 8, 2015 · 5 comments
Closed

Wrong placement of generated META-INF/services #110

almozavr opened this issue May 8, 2015 · 5 comments

Comments

@almozavr
Copy link

almozavr commented May 8, 2015

Immutables is a 3rd party lib with code generation, among java classes it generates META-INF/services file, but it seems retrolambda stands in the way to put it into assembled apk: generated service is put into retrolambda folder, but not in the resulting apk META-INF folder

@evant
Copy link
Owner

evant commented May 8, 2015

This is due to assuming that javaCompileTask.destinationDir will only contain class files. Retrolambda simply ignores other file types. Two possible solutions I can see for this:

  1. Change retrolambda to simply copy files it doesn't understand to it's output dir.
  2. Change the gradle plugin to copy any non-classfiles to the output dir.

Which one depends on if this feature would be worthwhile in non-gradle uses of retrolambda. @orfjackal can you speak to that?

@luontola
Copy link

luontola commented May 8, 2015

Sounds like a feature that would best belong in Retrolambda.

@luontola
Copy link

luontola commented Jul 8, 2015

This is fixed in Retrolambda 2.0.4

@evant evant closed this as completed Jul 8, 2015
@almozavr
Copy link
Author

almozavr commented Jul 8, 2015

I confirm, it works! Great, absolutely great.

@vovkab
Copy link

vovkab commented May 24, 2016

Not sure if this similar problem, but right now I can't even compile most of the time:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileRetrolambdaDebug'.
> java.io.FileNotFoundException: my-project/build/intermediates/classes/project/debug/META-INF/services

While actual file is generated in:

my-project/build/retrolambda/debug/META-INF/services/com.google.gson.TypeAdapterFactory

I'm registering all type adapters manually, so I don't really need services, is there any good way to completely disable generation or maybe there is another way to fix it?

gradle: 2.10
android plugin: 2.1.0
retrolambda: 3.2.0
immutables: 2.2 (the same on 2.19)

p.s. crossposted in immutables/immutables#100

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

No branches or pull requests

4 participants