Version 3.3.79

Contains changes to resolve cherry-pick issues.

Bug: b/160484830
Change-Id: I65e2242cdf294aabc03dd728e63c68cea653c92a
diff --git a/src/main/java/com/android/tools/r8/Version.java b/src/main/java/com/android/tools/r8/Version.java
index d42f670..2530cd4 100644
--- a/src/main/java/com/android/tools/r8/Version.java
+++ b/src/main/java/com/android/tools/r8/Version.java
@@ -11,7 +11,7 @@
 
   // This field is accessed from release scripts using simple pattern matching.
   // Therefore, changing this field could break our release scripts.
-  public static final String LABEL = "3.3.78";
+  public static final String LABEL = "3.3.79";
 
   private Version() {
   }
diff --git a/src/test/java/com/android/tools/r8/desugar/backports/ThreadLocalBackportWithDesugaredLibraryTest.java b/src/test/java/com/android/tools/r8/desugar/backports/ThreadLocalBackportWithDesugaredLibraryTest.java
index 67ee012..0c6273c 100644
--- a/src/test/java/com/android/tools/r8/desugar/backports/ThreadLocalBackportWithDesugaredLibraryTest.java
+++ b/src/test/java/com/android/tools/r8/desugar/backports/ThreadLocalBackportWithDesugaredLibraryTest.java
@@ -4,20 +4,14 @@
 
 package com.android.tools.r8.desugar.backports;
 
-import static com.android.tools.r8.desugar.desugaredlibrary.test.CompilationSpecification.SPECIFICATIONS_WITH_CF2CF;
-import static com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification.JDK11;
-import static com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification.JDK11_LEGACY;
-import static com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification.JDK11_MINIMAL;
-import static com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification.JDK11_PATH;
-import static com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification.JDK8;
-
+import com.android.tools.r8.CompilationMode;
+import com.android.tools.r8.LibraryDesugaringTestConfiguration;
 import com.android.tools.r8.TestParameters;
 import com.android.tools.r8.desugar.desugaredlibrary.DesugaredLibraryTestBase;
-import com.android.tools.r8.desugar.desugaredlibrary.test.CompilationSpecification;
-import com.android.tools.r8.desugar.desugaredlibrary.test.LibraryDesugaringSpecification;
+import com.android.tools.r8.utils.BooleanUtils;
 import com.android.tools.r8.utils.StringUtils;
-import com.google.common.collect.ImmutableList;
 import java.util.List;
+import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -31,26 +25,57 @@
   public TestParameters parameters;
 
   @Parameter(1)
-  public LibraryDesugaringSpecification libraryDesugaringSpecification;
+  public boolean shrinkDesugaredLibrary;
 
   @Parameter(2)
-  public CompilationSpecification compilationSpecification;
+  public boolean traceReferencesKeepRules;
 
-  @Parameters(name = "{0}, spec: {1}, {2}")
+  @Parameters(name = "{0}, shrinkDesugaredLibrary: {1}, traceReferencesKeepRules {2}")
   public static List<Object[]> data() {
     return buildParameters(
         getTestParameters().withAllRuntimes().withAllApiLevelsAlsoForCf().build(),
-        ImmutableList.of(JDK8, JDK11_LEGACY, JDK11_MINIMAL, JDK11, JDK11_PATH),
-        SPECIFICATIONS_WITH_CF2CF);
+        BooleanUtils.values(),
+        BooleanUtils.values());
   }
 
   private static final String EXPECTED_OUTPUT = StringUtils.lines("Hello, world!");
 
   @Test
-  public void testWithDesugaredLibrary() throws Exception {
-    testForDesugaredLibrary(parameters, libraryDesugaringSpecification, compilationSpecification)
+  public void testTimeD8() throws Exception {
+    Assume.assumeTrue(parameters.getRuntime().isDex());
+    Assume.assumeTrue(shrinkDesugaredLibrary || !traceReferencesKeepRules);
+
+    testForD8()
+        .addInnerClasses(getClass())
+        .setMinApi(parameters.getApiLevel())
+        .addLibraryFiles(getLibraryFile())
+        .enableLibraryDesugaring(
+            LibraryDesugaringTestConfiguration.builder()
+                .setMinApi(parameters.getApiLevel())
+                .withKeepRuleConsumer()
+                .setMode(shrinkDesugaredLibrary ? CompilationMode.RELEASE : CompilationMode.DEBUG)
+                .build())
+        .compile()
+        .run(parameters.getRuntime(), TestClass.class)
+        .assertSuccessWithOutput(EXPECTED_OUTPUT);
+  }
+
+  @Test
+  public void testTimeR8() throws Exception {
+    Assume.assumeTrue(parameters.getRuntime().isDex());
+    Assume.assumeTrue(shrinkDesugaredLibrary || !traceReferencesKeepRules);
+
+    testForR8(parameters.getBackend())
         .addInnerClasses(getClass())
         .addKeepMainRule(TestClass.class)
+        .setMinApi(parameters.getApiLevel())
+        .addLibraryFiles(getLibraryFile())
+        .enableLibraryDesugaring(
+            LibraryDesugaringTestConfiguration.builder()
+                .setMinApi(parameters.getApiLevel())
+                .withKeepRuleConsumer()
+                .setMode(shrinkDesugaredLibrary ? CompilationMode.RELEASE : CompilationMode.DEBUG)
+                .build())
         .run(parameters.getRuntime(), TestClass.class)
         .assertSuccessWithOutput(EXPECTED_OUTPUT);
   }