-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Android compatibility checks #4070
Conversation
Run with: - mvn animal-sniffer:check
…n all projects being used on the platform: base + android + converter + structures + validation.
@vitorpamplona does this work for you? I just checked it out, and when I run it I see the following error:
I thought maybe it was an issue because I'm running on JDK17 but I see the same error if I downgrade to JDK11. Bumping the ASM dependency to the animal sniffer plugin didn't help unfortunately. |
Hum... it still works here, for Java11 and Java17 on MacOS. FYI, base is not compliant anymore: [ERROR] /Users/vitor/Documents/workspace/hapi-fhir/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationContext.java:57: Undefined reference: boolean java.util.Optional.isEmpty() Optional.isEmpty is not available on Android. |
Weird! What does
|
|
Maybe this is an M1/M2 issue? I am still on intel. |
I wonder... I just got this new M2 MacBook. It's crazy fast, but definitely some things don't work well on it. I'll try on my home linux/x86_64 machine tonight. |
Good to know... I am about to buy one :) |
Well, sure enough, this works just fine on my Linux box. What a weird side effect. I'm definitely good to merge this, although it should probably be moved to the
PS - Despite this wacky behaviour, I highly recommend the M2! It cuts my build times in half compared to my 4 year old MBP, and the battery life is... well, i have trouble believing it. I worked away in IJ and watched a webinar yesterday for an hour and only used about 10%. |
@vitorpamplona - Can you merge the latest from |
Good to go. But I can never get CI to pass :( |
Now we are a go! :) @JPercival |
Codecov ReportBase: 81.00% // Head: 81.31% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #4070 +/- ##
============================================
+ Coverage 81.00% 81.31% +0.30%
- Complexity 23466 23619 +153
============================================
Files 1446 1421 -25
Lines 86175 86405 +230
Branches 11798 11698 -100
============================================
+ Hits 69809 70258 +449
+ Misses 11087 10962 -125
+ Partials 5279 5185 -94
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Adding a maven plugin to check the compatibility of given modules with Android APIs:
The idea is to declare compliance with Android 8 and up. The plugin runs through the source code to check if all classes and all methods used are available in that version of Android. Android 8 uses SDK 26 and was released in 2017. This should give us good coverage without blocking the use of newer Java APIs.
Run with:
./mvnw animal-sniffer:check