Maven-Plugin for checking API-Compliance with Android

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.

Answers


Since there was no such tool available I wrote it myself. http://code.google.com/p/compliancechecker/

It's a plugin for the maven build system which supports validating Java SE 1.4, 1.5, 1.6 and 1.7 code against a certain android api level.


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 :


Need Your Help

Sending a byte with .net UDP sockets in C#

c# visual-studio-2010 sockets udp

So i'm following a tutorial on how to setup a .net UDP Server and Client. So far it's going alright I can send a string to the server just like bellow.

NSNotification is not calling @selector method

ios objective-c iphone xcode nsnotificationcenter

I am trying to pass NSString from one class to another. Let's say I have ViewController A and ViewController B. I want to pass NSString from A to B.