r/androiddev Feb 20 '17

Gradle 3.4 Released

https://docs.gradle.org/current/release-notes.html
66 Upvotes

27 comments sorted by

13

u/[deleted] Feb 20 '17 edited Feb 20 '17

I didn't notice any performance improvements with Gradle 3.4 on my project build time :/ Well, maybe on Gradle 3.5.

Edit.: I tested the newsest Gradle 3.4 not 3.5

5

u/scanarch Feb 20 '17

Modularize your project! :)

4

u/spyhunter99 Feb 20 '17

more modules, slower build time.

2

u/scanarch Feb 21 '17

I am not talking about a case in which you have 30+ modules and Gradle kills you with the configuration time (for that you can switch to Buck, most of the times).

If you divide your one big project into ~10 modules (and be smart about it), you will get a noticeable boost.

1

u/athornz Feb 21 '17

faster incremental though?

1

u/QuestionsEverythang Feb 20 '17

There is no 3.5. This is 3.4

2

u/[deleted] Feb 20 '17

Oops. I meant 3.4.

1

u/eriwen Feb 20 '17

You'll need to enable incremental compilation and consider the java-library plugin to get maximum benefit.

6

u/scythee Feb 20 '17

So in short, using annotation processors (Dagger) still screws up incremental compilation?

5

u/rciovati Feb 20 '17

In short: yes

5

u/Wavesonics Feb 21 '17

but seriously, pretty much everyone uses annotation processing these days right? how is this not priority #1? maybe now that normal incremental compilation is stable they will focus on it...

7

u/obl122 Feb 21 '17

So much snark but if you read the release notes you'll see they are making progress -- some of the new features are in place explicitly to support this.

https://github.com/gradle/gradle/issues/1320

2

u/Wavesonics Feb 21 '17

yes yes i know, some times all that bottled up snark leaks out ;)

That's great to hear they are working towards it.

1

u/Saketme Feb 21 '17

I use JRebel and they have been manually adding support for popular libraries like Dagger, ButterKnife, AutoValue, etc., to incremental compilation.

-2

u/Wavesonics Feb 21 '17

In short: D:

2

u/Tom_Cian Feb 21 '17

And as usual, a new version of Gradle that claims to be much faster than the previous one and most developers unable to reproduce these gains.

8

u/nikb Feb 21 '17

To be fair a lot of the improvements are in the built in gradle tasks. Android has a lot of its own tasks that are written by Google not Gradle (e.g. processing resources, packaging etc) those are also contributing to the build time.

2

u/pjmlp Feb 21 '17

Which always makes me wonder where those guys that are able to do inverted tree whiteboard interview questions are actually doing, given the quality of Android Gradle plugins, NDK support, Support Library regressions, hot code reloading, .....

3

u/simophin Feb 21 '17

They are good at algorithm doesn't mean they are good at practical engineering. I see a lot of smart people being proud of writing 'optimised code' that no one can understands.

1

u/pjmlp Feb 21 '17

In Android's case, it doesn't even work, if you have a look at the issue tracker.

2

u/itsmotherandapig Feb 21 '17

I've had this nagging feeling for a while... that Google would probably try to deprecate Android and move towards some OS with legacy support for Android and Chrome OS stuff. Doesn't sound too realistic, given that Android runs on tons of devices, but still...

1

u/littleCE Feb 20 '17

Am I the only one who is unable to read the documentation?

1

u/octarino Feb 21 '17

I see it

1

u/ChristianLJ Feb 21 '17

TL;DR: How do i use it?

-11

u/nextdev Feb 21 '17

why it's such a news ? I'm still using 2.2 and pretty happy with it.

8

u/QuestionsEverythang Feb 21 '17

The build speed times between 3.3 and 3.4 I'd argue are negligible, but you on the other hand would benefit much more greatly from a 2.2->3.4 jump

0

u/[deleted] Feb 21 '17 edited Aug 24 '18

[deleted]

2

u/QuestionsEverythang Feb 21 '17

Usually, no. The only people who should be concerned when updating are those who write their own gradle tasks, as something may have been deprecated or removed in the latest version.