Remove outdated gmail app data and tests

The test no longer runs after removed support for main-dex-list

Bug: b/181858113
Change-Id: I43cbfc2df00c884df6f95a3de4e6cf53942c0a30
diff --git a/.gitignore b/.gitignore
index c3dd4ff..bb6648e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
 !third_party/chrome/*.sha1
-!third_party/gmail/*.sha1
 !third_party/gmscore/*.sha1
 !third_party/internal/*.sha1
 !third_party/nest/*.sha1
@@ -111,7 +110,6 @@
 third_party/examplesAndroidPGenerated.tar.gz
 third_party/framework
 third_party/framework.tar.gz
-third_party/gmail/*
 third_party/gmscore/*
 third_party/google/google-java-format/1.14.0
 third_party/google/google-java-format/1.14.0.tar.gz
diff --git a/src/test/java/com/android/tools/r8/internal/Gmail18082615TreeShakeJarVerificationTest.java b/src/test/java/com/android/tools/r8/internal/Gmail18082615TreeShakeJarVerificationTest.java
deleted file mode 100644
index 4929cb2..0000000
--- a/src/test/java/com/android/tools/r8/internal/Gmail18082615TreeShakeJarVerificationTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-package com.android.tools.r8.internal;
-
-import static com.android.tools.r8.ToolHelper.isLocalDevelopment;
-import static org.hamcrest.CoreMatchers.anyOf;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
-
-import com.android.tools.r8.R8TestCompileResult;
-import com.android.tools.r8.TestParameters;
-import com.android.tools.r8.TestParametersCollection;
-import com.android.tools.r8.ToolHelper;
-import java.nio.file.Paths;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-public class Gmail18082615TreeShakeJarVerificationTest extends GmailCompilationBase {
-  private static final int MAX_SIZE = 20000000;
-
-  @Parameters(name = "{0}")
-  public static TestParametersCollection data() {
-    return getTestParameters().withNoneRuntime().build();
-  }
-
-  public Gmail18082615TreeShakeJarVerificationTest(TestParameters parameters) {
-    super(180826, 15);
-    parameters.assertNoneRuntime();
-  }
-
-  @Test
-  public void buildAndTreeShakeFromDeployJar() throws Exception {
-    assumeTrue(isLocalDevelopment());
-
-    R8TestCompileResult compileResult =
-        testForR8(Backend.DEX)
-            .addKeepRuleFiles(
-                Paths.get(base).resolve(BASE_PG_CONF),
-                Paths.get(ToolHelper.PROGUARD_SETTINGS_FOR_INTERNAL_APPS, PG_CONF))
-            .allowDiagnosticMessages()
-            .allowUnusedProguardConfigurationRules()
-            .compile()
-            .assertAllInfoMessagesMatch(
-                anyOf(
-                    equalTo("Ignoring option: -optimizations"),
-                    containsString("Proguard configuration rule does not match anything"),
-                    containsString("Invalid parameter counts in MethodParameter attributes"),
-                    containsString("Methods with invalid MethodParameter attributes")))
-            .assertAllWarningMessagesMatch(containsString("Ignoring option:"));
-
-    int appSize = compileResult.app.applicationSize();
-    assertTrue("Expected max size of " + MAX_SIZE+ ", got " + appSize, appSize < MAX_SIZE);
-  }
-}
diff --git a/src/test/java/com/android/tools/r8/internal/GmailCompilationBase.java b/src/test/java/com/android/tools/r8/internal/GmailCompilationBase.java
deleted file mode 100644
index 7332dd8..0000000
--- a/src/test/java/com/android/tools/r8/internal/GmailCompilationBase.java
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-package com.android.tools.r8.internal;
-
-abstract class GmailCompilationBase extends CompilationTestBase {
-  static final String APK = "Gmail_release_unsigned.apk";
-  static final String DEPLOY_JAR = "Gmail_release_unstripped_deploy.jar";
-  static final String PG_JAR = "Gmail_release_unstripped_proguard.jar";
-  static final String PG_MAP = "Gmail_release_unstripped_proguard.map";
-  static final String BASE_PG_CONF = "Gmail_release_unstripped_proguard.config";
-  static final String PG_CONF = "Gmail_proguard.config";
-
-  final String base;
-
-  GmailCompilationBase(int majorVersion, int minorVersion) {
-    this.base = "third_party/gmail/gmail_android_" + majorVersion + "." + minorVersion + "/";
-  }
-}
diff --git a/third_party/gmail/gmail_android_180826.15.tar.gz.sha1 b/third_party/gmail/gmail_android_180826.15.tar.gz.sha1
deleted file mode 100644
index 3789746..0000000
--- a/third_party/gmail/gmail_android_180826.15.tar.gz.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f3770f048210068c1920b10ab5d09b19da3a8ea7
\ No newline at end of file
diff --git a/tools/gmail_data.py b/tools/gmail_data.py
deleted file mode 100644
index 6170a66..0000000
--- a/tools/gmail_data.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-import glob
-import os
-import utils
-
-ANDROID_L_API = '21'
-BASE = os.path.join(utils.THIRD_PARTY, 'gmail')
-
-V180826_15_BASE = os.path.join(BASE, 'gmail_android_180826.15')
-V180826_15_PREFIX = os.path.join(V180826_15_BASE, 'Gmail_release_unstripped')
-
-# NOTE: We always use android.jar for SDK v25 for now.
-ANDROID_JAR = utils.get_android_jar(25)
-
-VERSIONS = {
-    '180826.15': {
-        'dex': {
-            'flags': '--no-desugaring',
-            'inputs': [
-                os.path.join(V180826_15_BASE, 'Gmail_release_unsigned.apk')
-            ],
-            'main-dex-list': os.path.join(V180826_15_BASE, 'main_dex_list.txt'),
-            'pgmap': '%s_proguard.map' % V180826_15_PREFIX,
-            'libraries': [ANDROID_JAR],
-        },
-        'deploy': {
-            'flags': '--no-desugaring',
-            'inputs': ['%s_deploy.jar' % V180826_15_PREFIX],
-            'pgconf': [
-                '%s_proguard.config' % V180826_15_PREFIX,
-                '%s/proguardsettings/Gmail_proguard.config' % utils.THIRD_PARTY,
-                utils.IGNORE_WARNINGS_RULES
-            ],
-            'min-api': ANDROID_L_API,
-            'allow-type-errors': 1,
-        },
-        'proguarded': {
-            'flags': '--no-desugaring',
-            'inputs': ['%s_proguard.jar' % V180826_15_PREFIX],
-            'main-dex-list': os.path.join(V180826_15_BASE, 'main_dex_list.txt'),
-            'pgmap': '%s_proguard.map' % V180826_15_PREFIX,
-        }
-    },
-}
diff --git a/tools/historic_memory_usage.py b/tools/historic_memory_usage.py
index a40cf2a..2256e28 100755
--- a/tools/historic_memory_usage.py
+++ b/tools/historic_memory_usage.py
@@ -17,7 +17,7 @@
 import sys
 import utils
 
-APPS = ['gmscore', 'nest', 'youtube', 'gmail', 'chrome']
+APPS = ['gmscore', 'nest', 'youtube', 'chrome']
 COMPILERS = ['d8', 'r8']
 
 
@@ -29,7 +29,6 @@
                       choices=COMPILERS)
     result.add_option('--app',
                       help='What app to run on',
-                      default='gmail',
                       choices=APPS)
     result.add_option('--top',
                       default=historic_run.top_or_default(),
diff --git a/tools/run_on_app.py b/tools/run_on_app.py
index 3aaa40d..c3f8307 100755
--- a/tools/run_on_app.py
+++ b/tools/run_on_app.py
@@ -14,7 +14,6 @@
 
 import archive
 import gradle
-import gmail_data
 import nest_data
 from sanitize_libraries import SanitizeLibraries, SanitizeLibrariesInPgconf
 import thread_utils
@@ -26,7 +25,7 @@
 import chrome_data
 
 TYPES = ['dex', 'deploy', 'proguarded']
-APPS = ['nest', 'youtube', 'gmail', 'chrome']
+APPS = ['nest', 'youtube', 'chrome']
 COMPILERS = ['d8', 'r8']
 COMPILER_BUILDS = ['full', 'lib']
 
@@ -230,7 +229,6 @@
         'nest': nest_data,
         'youtube': youtube_data,
         'chrome': chrome_data,
-        'gmail': gmail_data,
     }
     # Check to ensure that we add all variants here.
     assert len(APPS) == len(data_providers)
@@ -431,9 +429,6 @@
     elif options.app == 'chrome':
         version = options.version or '180917'
         data = chrome_data
-    elif options.app == 'gmail':
-        version = options.version or '170604.16'
-        data = gmail_data
     else:
         raise Exception("You need to specify '--app={}'".format('|'.join(APPS)))
     return version, data