UPDATE: JRebel For Android now has two versions: Free and Enterprise! Whether you’re building a complex application with ridiculous build times, or starting on your very first app, JRebel For Android can make your coding faster!
Time flies and software keeps getting better. This is a universally good thing.
Today, I’m excited to announce a significant milestone in the development of JRebel for Android. JRebel for Android has reached the 2.0 status. This is the first major release we have introduced since the release of JRebel for Android v1.0 in December last year.
We have been listening to your feedback and turned it into features that will help JRebel for Android make your development process faster and simpler. Literally hundreds of fixes and improvements have been added in the v2.0 release.
In this post I want to shed some light on the main features we’ve added since v1.0 and why we think it’s a really big deal.
Highlights of JRebel for Android 2.0
Before we get excited about all the cool stuff, here’s the best news. Everything we talk about in this post is just a couple clicks away. Go grab your 21 day trial and take advantage of instantly updating code and resources on your Android projects. Experience it yourself.
You can try the v2.0 trial even if you have run JRebel for Android trial before! We feel the new improvements are a major game changer — and everyone should have the opportunity to try them!
Incremental Java compilation with annotation processor support
Incremental Java compilation is the single most important addition to JRebel for Android 2.0.
If you tried JRebel for Android before, you know that it works beautifully.
With incremental compilation now enabled in JRebel for Android, the build process only captures those parts of the code that are changed. Leveraging the incremental compiler results in significantly faster builds and working with JRebel for Android is whole new experience.
Expanding on the above, compiling an Android project can be a rather long process, especially if you include all the annotation processing for libraries like Daggers, Butterknife, Icepick and others that must be accounted for in the build.
To give you a taste of the benefits for incremental Java compilation, here’s an example.
We used an internal test project for incremental compiler testing. It’s quite large, consisting of 4706 application classes, 14497 Android resources, 84 libraries, Dagger 2, Butterknife, and others, with 7971 library classes in total.
The screenshots below show the difference in build times with JRebel for Android with incremental compilation enabled and disabled.
To obtain these profiles we changed a single line of code in this rather large app and measured the time it took to build the project.
Notice how the :app:compileFreeLegacyFatDebugWithJavaWithJavac task, which is where the compilation happens, took 12.8 seconds. JRebel for Android completed the incremental compilation with in under 1.6 seconds. That’s a 8x time difference. You should expect similar gains with your projects. Naturally, your mileage may vary. For a better understanding of the benefits it can bring you, check out this blog post with more benchmark details.
One of the more difficult efforts was integrating all the libraries containing an annotation processor to work with the incremental compiler in JRebel for Android.
So far, we have added support for the following libraries:
- Butter Knife
- Greenrobot eventbus
When using these, definitely give JRebel for Android a try. You can only win. Do you have a library that we may have missed? Let us know at firstname.lastname@example.org
Zero configuration and IntelliJ IDEA
Getting started with JRebel for Android is far simpler with the 2.0 release. You only need the JRebel for Android plugin installed in your Android Studio or IntelliJ IDEA. Yes indeed, we have added IntelliJ IDEA to our supported list of IDEs. Just like before, the plugin is available from the Jetbrains repositories. Grab it from Android Studio / IntelliJ IDEA > Preferences > Plugins > Browse repositories… > Search “JRebel for Android”.
JRebel for Android no longer needs to add the Gradle plugin to your build.gradle file to work. Your project files will need zero modification.
Optimized heap memory utilization
We’ve taken a critical look into how much memory JRebel for Android uses when running and have made some serious optimizations. Our testing data shows that JRebel for Android memory overhead is now reduced by around 3x. Below is comparison between JRebel for Android v1.0 and v2.0 after garbage collection in the Android Device Monitor for the same app we tested above:
In the above screenshot, v1.0 is on the top and v2.0 is on the bottom and as you can see the memory usage is reduced from ~96mb to ~34mb. Again, this is nearly a 3x difference!
Changes to licensing
We have revised the licensing options based on your feedback. The JRebel for Android v2.0, Individual license now includes multidex, JNI linking and debugger integration. Now you can debug everything!
In addition, the Business license now exclusively includes incremental compiler with support for annotation processors. The larger your project is, the more benefit you’ll see from incremental compilation.
We are really happy to introduce these increases in JRebel for Android functionality in v2.0! More developers can leverage JRebel for Android without restrictions to the technologies they are using and at the same time speed up their Android development.