4 articles Tag androiddev

android-apt 1.2

My Gradle plugin to support annotation processors in Android Gradle builds & Android Studio, android-apt, got another update! Version 1.2 now also supports library projects. This version requires the android plugin version 0.7 or up, since that version supports a new API that I use in the plugin. So upgrade your Android Gradle builds and generate some code :)

Check out the project site for more info and docs: https://bitbucket.org/hvisser/android-apt

android-apt Gradle plugin 1.1 is out

This plugin helps supporting annotation processors in Android Studio. See this post: https://plus.google.com/102164807080986038267/posts/7Wr3FcdNVxR for more info.This release fixes a minor bug that occured when you did not apply the android plugin to your project, but more importantly it’s now possible to pass extra configuration arguments to the annotation processor, which is something that the popular Android Annotations library needs. The project site has an example on how to configure annotation processor parameters.Thanks to +Thomas Bruyelle for sending the PR and testing the final implementation of this feature!It should be live on Maven Central shortly.

Next up is making the plugin use a new API that has been introduced with the Android Gradle plugin.
#androiddev #gradle

Embedded Link

hvisser / android-apt

View this post on Google+

Cupboard v1.0.4

I just pushed another minor update to Cupboard! Cupboard now supports limiting the result set (through the SQL LIMIT clause) and distinct queries if you need them. There’s also a new variant for bulk put’s that takes a Collection, which might come in handy if you are getting your entities from services like Parse.comTo learn more about Cupboard visit https://bitbucket.org/qbusict/cupboardAdditionally I’ve setup a community for Cupboard for questions and discussion here: https://plus.google.com/communities/102678039256081927502
It’s spanking brand new, so nothing is there yet, but feel free to join and discuss anything with regards to Cupboard if you like.

Gradle android-apt plugin

Here’s a small Gradle plugin that helps out if you have a project that includes an annotation processor. There are two use cases for this plugin:1. You have a processor that has a compiler part and an api part, you don’t want to get the compiler in your app. For this purpose the plugin sets up an apt configuration.
2. Your annotation processor produces source which you want to reference in Android Studio. By default these kinds of projects build fine in Android Studio, but the generated source isn’t on any source path in Android Studio so you might get errors there. The plugin will add the generated source to a source set so that AS will recognize it. This is also true for the first case btw; if the processor generates source, it will be added to the source set for the current flavor.

This is all based of a script that I’ve been using https://bitbucket.org/qbusict/android-gradle-scripts/src/60394ba8f5efa64badb17c9388f38b89f09c5d9a/annotations.groovy?at=default but it got a bit cumbersome to check out the script for each project and I thought providing it as a plugin might be useful for others as well.

One thing that is still missing is the option for passing in arguments to the annotation processors, when I have the need for it I’ll add it, but pull requests are welcome.

It’s live on Maven Central so easy to add to your build if you need it.
More info and source is here: https://bitbucket.org/hvisser/android-apt

View this post on Google+