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

Repair Android tests #78

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

Repair Android tests #78

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

Comments

@henri-tremblay
Copy link
Contributor

henri-tremblay commented Sep 24, 2020

It might require to migrate to Gradle

@gitryder
Copy link

Can I try to do this?

@henri-tremblay
Copy link
Contributor Author

@gitryder Of Course! Go for it! Normally if you launch with the -Pall profile, you will things falling over.

@gitryder
Copy link

I'm sorry, I'm new to contributing. I don't understand what you're saying.

What's -Pall profile?

@henri-tremblay
Copy link
Contributor Author

when launching maven build: mvn verify -Pall. Otherwise the android module isn't compiled. The README.md should explain how to work with Android.

@NyorJa
Copy link

NyorJa commented Oct 1, 2020

Can I check this also? Thanks.

@henri-tremblay
Copy link
Contributor Author

All help is appreciated. Start by getting a working build. I can give move details afterwards. Some working example could be https://github.com/raphw/byte-buddy/tree/master/byte-buddy-android-test

@yogurtearl
Copy link

The gradle to maven migration fails with an NPE on this project. :/
File here: gradle/gradle#14974

@yogurtearl
Copy link

yogurtearl commented Nov 8, 2020

Thoughts on just moving tck-android to gradle as a first step?
would probably have to run it with ./mvnw install -Pall && cd tck-android && ./gradlew connectedAndroidTest

@yogurtearl
Copy link

yogurtearl commented Nov 29, 2020

Here is a basic gradle setup that let's you run the Android test. -> #82

If you change minSdk to 21 and run ./gradlew connectedAndroidTest the build will fail.
https://github.com/yogurtearl/objenesis/blob/b6ee12c618897150d34651d28b6de479c8dcad7d/tck-android/build.gradle.kts#L29

With error:

D8: com.android.tools.r8.a: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)

@nach-o-man
Copy link
Contributor

@henri-tremblay I couldn't see any failing tests. Is this issue up-to-date?
Also created #84 with instructions for windows user on how-to run android tck

@henri-tremblay
Copy link
Contributor Author

@nach-o-man Yes. The tests are "passing". But if you read the log, you will see that it looks like the test is actually failing with some error code. So the current build probably just doesn' detect the failure.

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

5 participants