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

ResourceClassGenerator always generates final fields #756

Closed
hameno opened this issue Jan 11, 2017 · 8 comments
Closed

ResourceClassGenerator always generates final fields #756

hameno opened this issue Jan 11, 2017 · 8 comments

Comments

@hameno
Copy link
Contributor

hameno commented Jan 11, 2017

It seems that the old version of SymbolWriter from the android builder always writes the fields as final fields.
Updated to 2.2.3 the SymbolWriter class allows to specify whether to use final fields.

This should probably be fixed for aar libraries as their tests currently fail with robolectric 3.2.1 (see robolectric/robolectric#2847)

@hameno hameno changed the title ResourceClassGenerator always generate final fields ResourceClassGenerator always generates final fields Jan 11, 2017
@hameno
Copy link
Contributor Author

hameno commented Jan 11, 2017

Tried updating to the newer 2.2.3 but I don't know how to fix ManifestMergerMojo, since that class seems to heavily depend on classes which are gone in 2.2.3

@Shusshu
Copy link
Member

Shusshu commented Jan 12, 2017

I can help you with that class. Do you have a branch with the ongoing changes?

@hameno
Copy link
Contributor Author

hameno commented Jan 12, 2017

Not yet, my "fix" was to always call the SymbolWriter in a way that does not use final fields, but that would be wrong. I'm not sure how I can detect if the generation is run during test lifecycle (and inside an aar library).

@hameno
Copy link
Contributor Author

hameno commented Jan 12, 2017

@hameno
Copy link
Contributor Author

hameno commented Jan 12, 2017

I've created a WIP PR: #757

@Schlud
Copy link

Schlud commented Feb 13, 2017

Hi guys.
First of all thank you for your great work!

I've noticed that you are currently working on PR:#757
Do you now, if there is a pre-release version available for getting and testing the fixed state?

Thanks

@Shusshu
Copy link
Member

Shusshu commented Feb 13, 2017

You can build it locally and try it out. It would be good to know how it works for your use cases

@hameno
Copy link
Contributor Author

hameno commented Mar 22, 2017

Fixed with #757

@hameno hameno closed this as completed Mar 22, 2017
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

3 participants