Page MenuHomePhabricator

[Dev] Update Gradle plugin to 2.2.0
Closed, ResolvedPublic

Description

release notes:
https://developer.android.com/studio/releases/gradle-plugin.html

Stephen's comments to keep in mind when implementing:

Try to at least run the full test suite locally.

A new experimental caching feature lets Gradle speed up build times by pre-dexing, storing, and reusing the pre-dexed versions of your libraries. To learn more about using this experimental feature, read the Build Cache guide.

This seems worth calling out in case devs want to enable it in their own configs.

Event Timeline

Change 313114 had a related patch set uploaded (by BearND):
Update Android Plugin for Gradle

https://gerrit.wikimedia.org/r/313114

The screenshot tests fail with

./gradlew testAllDevDebug --info
[...]
:app:connectedDevDebugAndroidTest (Thread[Daemon worker,5,main]) completed. Took 5 mins 44.132 secs.
:app:pullScreenshots (Thread[Daemon worker,5,main]) started.
:app:pullScreenshots
Executing task ':app:pullScreenshots' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
:app:pullScreenshots FAILED
:app:pullScreenshots (Thread[Daemon worker,5,main]) completed. Took 0.009 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:pullScreenshots'.
> Expected task ':app:packageDevDebugAndroidTest' output files to contain exactly one file, however, it contains 2 files.

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 6 mins 11.982 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:pullScreenshots'.] from daemon DaemonInfo{pid=28765, address=[3a3cbce2-6c0b-4007-8a5b-e0908a034830 port:64723, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=false, lastBusy=1475522218628, context=DefaultDaemonContext[uid=072c41c4-2700-4bf9-be98-1da30bfb3a6c,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home,daemonRegistryDir=/Users/besi/.gradle/daemon,pid=28765,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).

Looks like this is more effort than I originally anticipated. I'll leave the task unassigned until we assign this task to a sprint and give it some points.

I've removed the note on versionNameSuffix as it's not as applicable as I thought. Our versionName is 2.4.${android.defaultConfig.versionCode}-${label}-${date} so the suffix would have to be beta-${date}, alpha-${date}, ... which doesn't seem worthwhile.

Niedzielski raised the priority of this task from Medium to High.Nov 9 2016, 8:48 PM
Niedzielski added a subscriber: Mholloway.

@Dbrant, @Mholloway just thinking we're almost through January :] We only have about two months to close out our quarterly goal but I think this tech debt task is worth resolving sooner rather than later

Change 335545 had a related patch set uploaded (by Mholloway):
Update to Android Plugin for Gradle 2.2.0

https://gerrit.wikimedia.org/r/335545

The periodic tests now pass for me. My guess is that whatever was previously causing trouble got resolved in the course of our push for better testing practices.

Change 335545 merged by jenkins-bot:
Update to Android Plugin for Gradle 2.2.0

https://gerrit.wikimedia.org/r/335545

Mholloway claimed this task.

Change 313114 abandoned by Mholloway:
Update Android Plugin for Gradle

Reason:
new patch merged, see I20b22f9c04d33901df17ed11845f910d93a781bd

https://gerrit.wikimedia.org/r/313114