Over a million developers have joined DZone.

The Latest IDEA: Gradle Composite Builds and Android Studio

Using IDEA? Take a look at some of the new features in the latest preview, including a nifty tool for substituting dependencies and new features for Android Studio.

· Java Zone

Discover how powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience, brought to you in partnership with JetBrains

A fresh IntelliJ IDEA 2016.3 EAP build, packed with various improvements is here.

This and all future builds will have Gradle composite builds support, so you can substitute any of your project dependencies with another project.

Imagine your project has compilation time dependencies to org.sample:number-utils and org.sample:string-utils:

Now, you’d like to change something in these libraries (a very common case). Normally, you’d need to open the sources of these libraries as separate projects, make the changes, build, upload new artifacts to the repository, then update the dependencies in your project and only after that, verify if the changes worked ok. Another change? Rinse, repeat.

With composite builds, everything is much, much simpler. All you have to is to attach the Gradle projects of these libraries via the Add button in the Gradle tool window (my-utils in our case), and then select Compose Build Configuration from the context menu for the original project.

Then, refresh your Gradle project, and you’re all set. Now you can make any changes to the attached projects and immediately get feedback—IntelliJ IDEA will use module dependencies instead of binary ones.

Note, this feature requires Gradle 3.1 or higher. Composite builds work nicely with the option that delegates the IDE build and run actions to Gradle:

We hope this will make your life a tad easier. If you’re using Maven, don’t worry: adding a similar feature for Maven is on our roadmap.

Also, in this build we have features coming from Android Studio 2.2:

  • The Blueprint mode in the Designer that hides all of the visuals from views and shows only their outlines. You can choose to have it side by side with the Designer.
  • Constraint Layout, a new layout manager which allows to create large and complex layouts with a flat view hierarchy. It’s similar to Relative Layout in that all views are laid out according to relationships between sibling views and the parent layout, but it’s more flexible and easier to use.
  • Code Sample Browser that helps you find Google-provided Android code samples based on the currently highlighted symbol in your project.
  • Many stability and reliability improvements to Instant Run. If you have previously disabled Instant Run, the Android team encourages you to re-enable it. Let us know if you come across further issues.
  • Espresso Test Recorder that lets you create UI tests by recording interactions with your application. When you finish recording, it prints out the test code.

And among other news:

  • Filter values in the Log viewer for Git and Mercurial are now persisted between IDE restarts.
  • Support for SVN 1.8’s automatic reintegration merge.

That’s it for now. Download the EAP build, give it a spin, and share your feedback via our issue tracker.

Learn more about Kotlin, a new programming language designed to solve problems that software developers face every day brought to you in partnership with JetBrains.

java,intellij idea,gradle,android studio

Published at DZone with permission of Andrey Cheptcov, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}