Android Lint available in the Central Repository

Ever since the Android Lint tool was released by Xavier, Tor and the rest of the great team at the Android Tools project, I thought this would be really great to have as a goal for the Android Maven Plugin. Since I am core committer and merge master of the plugin and implemented a bunch of goals already I had that side covered. Now I just needed to make the Android Lint tool available for the plugin.

We could do this with dynamically loading the jars from the SDK install, but that has proven to be painful in the past since we need to wrap all the API’s and worry about transitive dependencies and so on. However quite a while ago Robert Manning and then also Ladislav Thon stepped up and helped with getting Android related artifacts into the Central Repository as part of the Android4Maven project. I have been helping all along and finally joined the project this time and did some of the groundwork myself. I ended up figuring out the correct branch for the r16 release of the SDK on the ADT-DEV mailing list and built a bunch of scripts based on the existing scripts that rebuild the artifacts I needed for Android Lint as well as the ddmlib and compared them against the ones built by the Android SDK build using make (sic! ouch! – had to dig through them to fix some issues).

Now I have uploaded the artifacts to the Central Repository via the great service of Sonatype for open source projects. So here is what is available.

Common Library

<dependency>
  <groupId>com.android</groupId>
  <artifactId>common</artifactId>
  <version>r16</version>
</dependency>

Android Preferences Library

<dependency>
  <groupId>com.android.prefs</groupId>
  <artifactId>androidprefs</artifactId>
  <version>r16</version>
</dependency>

ddmlib Library

<dependency>
  <groupId>com.android.ddmlib</groupId>
  <artifactId>ddmlib</artifactId>
  <version>r16</version>
</dependency>

Lint API Library

<dependency>
  <groupId>com.android.tools.lint</groupId>
  <artifactId>lint_api</artifactId>
  <version>r16</version>
</dependency>

Lint Checks Library

<dependency>
  <groupId>com.android.tools.lint.checks</groupId>
  <artifactId>lint_checks</artifactId>
  <version>r16</version>
</dependency>

Lint Library

<dependency>
  <groupId>com.android.tools.lint</groupId>
  <artifactId>lint</artifactId>
  <version>r16</version>
</dependency>

With these libraries available on the Central Repository I can now go ahead and add Lint support to the Android Maven Plugin. Beyond that however the library is also available for many other cool projects to use. Here are some that might be interested and you might want to check out.

but of course you can also just go and implement some tools or other stuff with the libraries. If you want other SDK artifacts in central, let me know and maybe help out with a patch.

Enough now though – go, get busy and code!

Manfred

PS: and if you want to learn more about the Nexus Repository server or Apache Maven you could take a training class with Sonatype and me as your trainer 😉

4 comments » Write a comment