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

Objenesis can't be compiled on Android SDK < 26 #79

Closed
henri-tremblay opened this issue Sep 24, 2020 · 3 comments
Closed

Objenesis can't be compiled on Android SDK < 26 #79

henri-tremblay opened this issue Sep 24, 2020 · 3 comments

Comments

@henri-tremblay
Copy link
Contributor

See mockito/mockito#2007.

The current possible solution can be to remove "exotic" instantiator from objenesis-core. We should have a test to make sure it works.

@yogurtearl
Copy link

yogurtearl commented Nov 22, 2020

@henri-tremblay The main issue for supporting android SDK < 26 is any mention of MethodHandle in the bytecode.

The Java 11 support added this and broke Android. -> 5f9d20b

I think it will be hard to have a single jar that works on android API < 26 and JDK 11+.

Providing multiple different artifacts is one possible solultion. Perhaps with a -jdk7 and -jdk11 maven classifier?

@henri-tremblay
Copy link
Contributor Author

I'm a bit overwhelm these day. I do hope I will have the time to revisit soon. If anyone has the time, feel free to look.

@henri-tremblay
Copy link
Contributor Author

I have pushed the changes moving some instantiators in a new project. Could you please check if it works? I'm still not sure it's a good idea. JPMS requires me to change the package of the moved classes. I'm afraid of what I will break but I hope they are not that used. The alternative is indeed to play with classifiers.

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

2 participants