Bug 1405396 - Post: Make it easier to debug l10n builds. r=maliu draft
authorNick Alexander <nalexander@mozilla.com>
Fri, 20 Oct 2017 11:07:21 -0700
changeset 692170 04c1bcd2bf62fd193541fa92dd8841db102f6b5a
parent 692169 f8bfc730ab963833f43d2f19b11027db8e49a06a
child 692172 64afca521be49b0bfb4c4a677be24886c0e7f412
push id87422
push usernalexander@mozilla.com
push dateThu, 02 Nov 2017 17:14:40 +0000
reviewersmaliu
bugs1405396
milestone58.0a1
Bug 1405396 - Post: Make it easier to debug l10n builds. r=maliu This adds the R.txt files produced by the build -- timestamped, so they are kept in order -- to the Task Cluster artifacts, for later comparison. MozReview-Commit-ID: 3hj6XjFDIE4
mobile/android/app/build.gradle
taskcluster/ci/build/android.yml
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -537,8 +537,32 @@ android.applicationVariants.all { varian
                         .each { it.replaceNode {} }
 
                     manifestOutFile.write(XmlUtil.serialize(xml), 'UTF-8')
                 }
             })
         }
     }
 }
+
+android.applicationVariants.all { variant ->
+    def processResourcesTask = tasks["process${variant.name.capitalize()}Resources"]
+    def assembleTask = tasks["assemble${variant.name.capitalize()}"]
+
+    def dumpTask = task("dump${variant.name.capitalize()}RTxt", type: Copy) {
+        from "${project.buildDir}/intermediates/symbols"
+        into "${project.buildDir}/R/symbols-${System.env.AB_CD}"
+        include "**/R.txt"
+
+        includeEmptyDirs = false
+
+        // Force task to run.
+        outputs.upToDateWhen { false }
+
+        rename { filename ->
+            filename.replace 'R.txt', "R-${new Date().format('yyyyMMddHHmmssSSS')}.txt"
+        }
+
+        dependsOn processResourcesTask
+    }
+
+    assembleTask.dependsOn dumpTask
+}
--- a/taskcluster/ci/build/android.yml
+++ b/taskcluster/ci/build/android.yml
@@ -9,16 +9,19 @@ android-api-16/debug:
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -58,16 +61,19 @@ android-x86/opt:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
             # Increase the timeout because nsContentUtils.o takes a ridiculously
             # long time to compile for x86 when using the current NDKs.  This
             # will eventually get fixed, but for now we have to live with this.
             # See https://github.com/android-ndk/ndk/issues/522 for more context.
             SCCACHE_IDLE_TIMEOUT: "1500"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -110,16 +116,19 @@ android-x86-nightly/opt:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
             # Increase the timeout because nsContentUtils.o takes a ridiculously
             # long time to compile for x86 when using the current NDKs.  This
             # will eventually get fixed, but for now we have to live with this.
             # See https://github.com/android-ndk/ndk/issues/522 for more context.
             SCCACHE_IDLE_TIMEOUT: "1500"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -155,16 +164,19 @@ android-api-16/opt:
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -202,16 +214,19 @@ android-api-16-nightly/opt:
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -252,16 +267,19 @@ android-x86-old-id/opt:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
             # Increase the timeout because nsContentUtils.o takes a ridiculously
             # long time to compile for x86 when using the current NDKs.  This
             # will eventually get fixed, but for now we have to live with this.
             # See https://github.com/android-ndk/ndk/issues/522 for more context.
             SCCACHE_IDLE_TIMEOUT: "1500"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -305,16 +323,19 @@ android-x86-old-id-nightly/opt:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
             # Increase the timeout because nsContentUtils.o takes a ridiculously
             # long time to compile for x86 when using the current NDKs.  This
             # will eventually get fixed, but for now we have to live with this.
             # See https://github.com/android-ndk/ndk/issues/522 for more context.
             SCCACHE_IDLE_TIMEOUT: "1500"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -351,16 +372,19 @@ android-api-16-old-id/opt:
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -399,16 +423,19 @@ android-api-16-old-id-nightly/opt:
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -445,16 +472,19 @@ android-api-16-gradle/opt:
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -488,16 +518,19 @@ android-aarch64/opt:
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/
@@ -535,16 +568,19 @@ android-aarch64-nightly/opt:
     worker-type: aws-provisioner-v1/gecko-{level}-b-android
     worker:
         docker-image: {in-tree: android-build}
         max-run-time: 7200
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
             TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
         artifacts:
+          - name: public/android/R
+            path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+            type: directory
           - name: public/android/maven
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
             type: directory
           - name: public/build/geckoview_example.apk
             path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk
             type: file
           - name: public/build
             path: /builds/worker/artifacts/