I'm looking for a Maven-Plugin that can check Jar/Class-Files for compliance with a specified API Level of Android. E.g. can all Classes and Methods be resolved in the Android API..
Does someone know about such a plugin? The DX tool doesn't seem to provide such functionality or am I missing something?
Use case:
I wrote some Jar-Files which should be used in Desktop-Java-Applications as well in Android-Apps. Now I want to make sure that these Jar-Files are compliant to the Android API of a certain level.
My current workaround would be to run my Unit-Tests in an Android-Emulator.
You can use animal-sniffer-maven-plugin with android-api-level signatures.
This will looks like :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.16</version>
<configuration>
<signature>
<groupId>net.sf.androidscents.signature</groupId>
<artifactId>android-api-level-19</artifactId>
<version>4.4_r1</version>
</signature>
</configuration>
</plugin>
See animal-sniffer-maven-plugin for more details.
More resources about android level API :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With