Merge "Make DexString constructor private to only allow new in DexItemFactory"
diff --git a/infra/config/global/cr-buildbucket.cfg b/infra/config/global/cr-buildbucket.cfg
index 863bbbe..58afca3 100644
--- a/infra/config/global/cr-buildbucket.cfg
+++ b/infra/config/global/cr-buildbucket.cfg
@@ -87,6 +87,7 @@
       name: "archive"
       mixins: "linux"
       execution_timeout_secs: 1800  # 1/2h
+      dimensions: "archive_bot:true"
       recipe {
         properties: "archive:True"
       }
@@ -95,9 +96,9 @@
       name: "archive_release"
       mixins: "linux"
       execution_timeout_secs: 1800  # 1/2h
+      dimensions: "archive_bot:true"
       recipe {
-        # TODO(ricow): set archive flag when we flip over
-        # properties: "archive:True"
+        properties: "archive:True"
       }
 
     }
@@ -192,6 +193,7 @@
     builders {
       name: "d8-linux-jctf"
       mixins: "linux"
+      dimensions: "jctf:true"
       execution_timeout_secs: 43200  # 12h
       recipe {
         properties: "tool:d8"
@@ -202,6 +204,7 @@
     builders {
       name: "d8-linux-jctf_release"
       mixins: "linux"
+      dimensions: "jctf:true"
       execution_timeout_secs: 43200  # 12h
       recipe {
         properties: "tool:d8"
@@ -313,16 +316,21 @@
     builders {
       name: "linux-internal"
       mixins: "linux"
-      # TODO(move)
+      recipe {
+        properties: "internal:True"
+      }
     }
     builders {
       name: "linux-internal_release"
       mixins: "linux"
-      # TODO(move)
+      recipe {
+        properties: "internal:True"
+      }
     }
     builders {
       name: "linux-jctf"
       mixins: "linux"
+      dimensions: "jctf:true"
       execution_timeout_secs: 43200  # 12h
       recipe {
         properties: "tool:r8"
@@ -333,6 +341,7 @@
     builders {
       name: "linux-jctf_release"
       mixins: "linux"
+      dimensions: "jctf:true"
       execution_timeout_secs: 43200  # 12h
       recipe {
         properties: "tool:r8"
@@ -343,6 +352,7 @@
     builders {
       name: "r8cf-linux-jctf"
       mixins: "linux"
+      dimensions: "jctf:true"
       execution_timeout_secs: 43200  # 12h
       recipe {
         properties: "tool:r8cf"
diff --git a/infra/config/global/luci-scheduler.cfg b/infra/config/global/luci-scheduler.cfg
index 7c867e5..2b67476 100644
--- a/infra/config/global/luci-scheduler.cfg
+++ b/infra/config/global/luci-scheduler.cfg
@@ -23,7 +23,7 @@
     repo: "https://r8.googlesource.com/r8"
     refs: "refs/heads/master"
   }
-
+  triggers: "archive"
   triggers: "d8-linux"
   triggers: "d8-linux"
   triggers: "d8-linux-android-4.0.4"
@@ -39,13 +39,10 @@
   triggers: "linux-android-5.1.1"
   triggers: "linux-android-6.0.1"
   triggers: "linux-android-7.0.0"
+  triggers: "linux-internal"
+  triggers: "linux-jctf"
+  triggers: "r8cf-linux-jctf"
   triggers: "windows"
-  triggers: "archive"
-
-  # TODO(ricow): enable remaining
-  #  triggers: "linux-internal"
-  #  triggers: "linux-jctf"
-  #  triggers: "r8cf-linux-jctf"
 }
 
 trigger {
@@ -55,28 +52,23 @@
     repo: "https://r8.googlesource.com/r8"
     refs: "regexp:refs/heads/d8.*"
   }
+  triggers: "archive_release"
   triggers: "d8-linux-android-4.0.4_release"
   triggers: "d8-linux-android-4.4.4_release"
   triggers: "d8-linux-android-5.1.1_release"
   triggers: "d8-linux-android-6.0.1_release"
   triggers: "d8-linux-android-7.0.0_release"
+  triggers: "d8-linux-jctf_release"
   triggers: "d8-linux_release"
   triggers: "linux-android-4.0.4_release"
   triggers: "linux-android-4.4.4_release"
   triggers: "linux-android-5.1.1_release"
   triggers: "linux-android-6.0.1_release"
   triggers: "linux-android-7.0.0_release"
+  triggers: "linux-internal_release"
+  triggers: "linux-jctf_release"
   triggers: "linux_release"
-
-  # TODO(ricow): enable remaining
-  #  triggers: "archive_release"
-  #  triggers: "d8-linux-jctf_release"
-  #  triggers: "linux-internal_release"
-  #  triggers: "linux-jctf_release"
-
-  # TODO(ricow): Windows on the release branches currently do not work
-  #              There is no java available.
-  # triggers: "windows_release"
+  triggers: "windows_release"
 }
 
 job {
diff --git a/third_party/android_sdk.tar.gz.sha1 b/third_party/android_sdk.tar.gz.sha1
index ebc2c1d..9a9b464 100644
--- a/third_party/android_sdk.tar.gz.sha1
+++ b/third_party/android_sdk.tar.gz.sha1
@@ -1 +1 @@
-fdbcfa08e6a1772bc9569bf706819a95a15bc3a0
\ No newline at end of file
+acfc4d8ff4def954eb85da4bd5fff3a63764c09d
\ No newline at end of file
diff --git a/tools/archive.py b/tools/archive.py
index f86530a..ecc0c04 100755
--- a/tools/archive.py
+++ b/tools/archive.py
@@ -94,8 +94,8 @@
   if not utils.is_bot() and not options.dry_run:
     raise Exception('You are not a bot, don\'t archive builds')
 
-  if utils.is_new_bot():
-    print("Archiving is disabled on new bots.")
+  if utils.is_old_bot():
+    print("Archiving is disabled on old bots.")
     return
 
   # Create maven release which uses a build that exclude dependencies.
@@ -135,7 +135,7 @@
     with open(version_file,'w') as version_writer:
       version_writer.write('version.sha=' + GetGitHash() + '\n')
       version_writer.write(
-          'releaser=go/r8bot (' + os.environ.get('BUILDBOT_SLAVENAME') + ')\n')
+          'releaser=go/r8bot (' + os.environ.get('SWARMING_BOT_ID') + ')\n')
       version_writer.write('version-file.version.code=1\n')
 
     for file in [
diff --git a/tools/internal_test.py b/tools/internal_test.py
index a9a90eb..032f1fe 100755
--- a/tools/internal_test.py
+++ b/tools/internal_test.py
@@ -193,6 +193,9 @@
         print('\n\n%s had value:\n%s' % (to_print, value))
 
 def run_bot():
+  if utils.is_old_bot():
+    print('Not running on on old bot, please see: https://ci.chromium.org/p/r8')
+    return
   print_magic_file_state()
   # Ensure that there is nothing currently scheduled (broken/stopped run)
   for magic in ALL_MAGIC:
diff --git a/tools/test.py b/tools/test.py
index d6753ed..a7e0b98 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -253,6 +253,10 @@
 
   # Now run tests on selected runtime(s).
   vms_to_test = [options.dex_vm] if options.dex_vm != "all" else ALL_ART_VMS
+  # TODO(126683699): remove once we have single run
+  if options.dex_vm == 'all' and options.only_jctf:
+    vms_to_test = ["default",  "5.1.1"]
+
   for art_vm in vms_to_test:
     vm_kind_to_test = "_" + options.dex_vm_kind if art_vm != "default" else ""
     return_code = gradle.RunGradle(gradle_args + ['-Pdex_vm=%s' % (art_vm + vm_kind_to_test)],
diff --git a/tools/utils.py b/tools/utils.py
index 12535be..13b61cf 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -488,6 +488,9 @@
 def is_new_bot():
   return 'SWARMING_BOT_ID' in os.environ
 
+def is_old_bot():
+  return 'BUILDBOT_SLAVENAME' in os.environ
+
 def is_bot():
   return 'USER' in os.environ and os.environ['USER'] == 'chrome-bot'