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

Formalizes compliance with Android 8, SDK 26 (2017+) #157

Merged
merged 4 commits into from
Sep 26, 2022

Conversation

vitorpamplona
Copy link
Contributor

@vitorpamplona vitorpamplona commented Sep 25, 2022

This PR formalizes this project's compliance with Android APIs

  1. Adds an Animal Sniffer plugin to check compliance with any runtime API when running mvn test
  2. Selects modules evaluator, evaluator.activitydefinition, evaluator.builder, evaluator.dagger, evaluator.expression, evaluator.fhir, evaluator.library, evaluator.measure, evaluator.measure-hapi, evaluator.plandefinition to be checked for Android compliance.
  3. Establishes initial compliance to Android 8 - SDK 26, the minimum Android version the Translator is currently fully compliant with.

Important: The plugin only verifies the source code in this project, not dependencies.

For testing, add:

if (Optional.of(UUID.randomUUID()).isEmpty())
   throw new RuntimeException("Test");

in the desired module and run mvn animal-sniffer:check.

Since the method Optional.isEmpty is not available on Android, the output should look like this:

[INFO] --- animal-sniffer-maven-plugin:1.22:check (check-android-26-compliance) @ evaluator.builder ---
[INFO] Checking unresolved references to net.sf.androidscents.signature:android-api-level-26:8.0.0_r2
[ERROR] /Users/vitor/Documents/workspace/cql-evaluator/evaluator.builder/src/main/java/org/opencds/cqf/cql/evaluator/builder/CqlEvaluatorBuilder.java:152: Undefined reference: boolean java.util.Optional.isEmpty()

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

Successfully merging this pull request may close these issues.

None yet

2 participants