Closed Bug 1366644 Opened 7 years ago Closed 7 years ago

Upgrade Android Gradle plugin to 2.3+

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement)

55 Branch
Unspecified
Android
enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: tyu, Assigned: nalexander)

References

(Blocks 1 open bug)

Details

Attachments

(7 files, 1 obsolete file)

With Gradle plugin 2.3 there is lint baseline that may be useful.

For the time being, Android 3.0 is fresh released on the canary channel and so is Android Gradle plugin 3.0.0-alpha1.

So we could might also wait till 3.0 rides on release channel and figure out what the safest versions of Gradle and the Android-Gradle plugin for use with AS 3.0 to avoid duplicate work.

(Originally discussed in Bug 1365878)
Blocks: 1366641
2.3 is stable now, seems like 2.3.3 just released yesterday!

    Version: 2.3.3.0
    Release date: June 8, 2017

https://developer.android.com/studio/index.html#downloads
Depends on: 1376306
Depends on: 1370119
Blocks: 1384312
Just noting here that updating the Android-Gradle build plugin to 2.3.3 requires updating Gradle to 3.3; see https://developer.android.com/studio/releases/gradle-plugin.html.
Depends on: 1408479
Comment on attachment 8918963 [details]
Bug 1366644 - Part 3a: Update Android build-tools (25.0.3), Gradle (3.4.1), Android-Gradle (2.3.3).

https://reviewboard.mozilla.org/r/189860/#review195122

::: mobile/android/app/build.gradle:485
(Diff revision 1)
>          excludeFilter = file("findbugs-exclude.xml")
>          dependsOn "assemble${variant.name.capitalize()}"
>  
>          reports {
>              html.enabled = true // HTML reports for humans.
> -            html.destination = "$project.buildDir/outputs/findbugs/findbugs-${variant.name}-output.html"
> +            html.destination = "$project.buildDir/reports/findbugs/findbugs-${variant.name}-output.html"

Looks like we also need to update the output file path in yml file: taskcluster/ci/build/android-stuff.yml
Attachment #8918963 - Flags: review?(max) → review+
Comment on attachment 8919071 [details]
Bug 1366644 - Pre: Print Android sdkmanager package listing.

https://reviewboard.mozilla.org/r/189980/#review195258
Attachment #8919071 - Flags: review?(max) → review+
Comment on attachment 8918959 [details]
Bug 1366644 - Pre: Bump Gradle JVM heap to allow in-process dex.

https://reviewboard.mozilla.org/r/189852/#review195260
Attachment #8918959 - Flags: review?(max) → review+
Comment on attachment 8918960 [details]
Bug 1366644 - Pre: Work around mach/mozharness/mozprocess output issue.

https://reviewboard.mozilla.org/r/189854/#review195262
Attachment #8918960 - Flags: review?(max) → review+
Comment on attachment 8918961 [details]
Bug 1366644 - Part 1: Avoid deprecated Gradle features.

https://reviewboard.mozilla.org/r/189856/#review195264
Attachment #8918961 - Flags: review?(max) → review+
Comment on attachment 8918962 [details]
Bug 1366644 - Part 2: Work around new deprecation warnings from Android SDK 25/26.

https://reviewboard.mozilla.org/r/189858/#review195124

We also need to lint
Attachment #8918962 - Flags: review?(max) → review+
Comment on attachment 8919072 [details]
Bug 1366644 - Part 3b: Use lint baseline to broaden Android lint coverage.

https://reviewboard.mozilla.org/r/189982/#review195266

::: mobile/android/app/lint-baseline.xml:10
(Diff revision 1)
> +        id="MissingPermission"
> +        message="Missing permissions required by KeyguardManager.KeyguardLock.disableKeyguard: android.permission.DISABLE_KEYGUARD"
> +        errorLine1="                keyguardLock.disableKeyguard();"
> +        errorLine2="                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
> +        <location
> +            file="/Users/nalexander/Mozilla/gecko/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecInstrumentationTestRunner.java"

We may have to replace abspath to wildcard filepath
Attachment #8919072 - Attachment is obsolete: true
Attachment #8919072 - Flags: review?(max)
Comment on attachment 8919482 [details]
Bug 1366644 - Part 3b: Ignore new lint warnings.

https://reviewboard.mozilla.org/r/190328/#review195606
Attachment #8919482 - Flags: review?(max) → review+
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ff11e283b905
Pre: Print Android sdkmanager package listing. r=maliu
https://hg.mozilla.org/integration/autoland/rev/fff0a54320b0
Pre: Bump Gradle JVM heap to allow in-process dex. r=maliu
https://hg.mozilla.org/integration/autoland/rev/1a0e10b4ea13
Pre: Work around mach/mozharness/mozprocess output issue. r=maliu
https://hg.mozilla.org/integration/autoland/rev/ba0e40a0b33f
Part 1: Avoid deprecated Gradle features. r=maliu
https://hg.mozilla.org/integration/autoland/rev/ea8854aacc68
Part 2: Work around new deprecation warnings from Android SDK 25/26. r=maliu
https://hg.mozilla.org/integration/autoland/rev/1c49a7a7cb5e
Part 3a: Update Android build-tools (25.0.3), Gradle (3.4.1), Android-Gradle (2.3.3). r=maliu
https://hg.mozilla.org/integration/autoland/rev/15f9515982b7
Part 3b: Ignore new lint warnings. r=maliu
Blocks: 1413006
Blocks: 1415298
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 58 → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: