Revert "Add rules to create the tradefed.zip from prebuilts"

Revert "Move the common rules to a common location"

Revert submission 1506477-tradefed-all-zip

Reason for revert: http://b/173971094 master-without-vendor is broken due to absence of the prebuilts.
Reverted Changes:
I738883887:Add rules to create the tradefed.zip from prebuilt...
I122724b52:Move the common rules to a common location

Change-Id: I0b764e4a4b8b0d3425f332392f8b4df32af2a401
diff --git a/Android.bp b/Android.bp
deleted file mode 100644
index f1202dc..0000000
--- a/Android.bp
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2020 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Set of error prone rules to ensure code quality
-// PackageLocation check requires the androidCompatible=false otherwise it does not do anything.
-java_defaults {
-  name: "tradefed_errorprone_defaults",
-  errorprone: {
-    javacflags: [
-      "-XDandroidCompatible=false",
-      "-Xep:ArrayToString:ERROR",
-      "-Xep:BoxedPrimitiveConstructor:ERROR",
-      "-Xep:CatchFail:ERROR",
-      "-Xep:ConstantField:ERROR",
-      "-Xep:DeadException:ERROR",
-      "-Xep:EqualsIncompatibleType:ERROR",
-      "-Xep:ExtendingJUnitAssert:ERROR",
-      "-Xep:FormatString:ERROR",
-      "-Xep:GetClassOnClass:ERROR",
-      "-Xep:IdentityBinaryExpression:ERROR",
-      "-Xep:JUnit3TestNotRun:ERROR",
-      "-Xep:JUnit4TestNotRun:ERROR",
-      "-Xep:JUnit4ClassUsedInJUnit3:ERROR",
-      "-Xep:JUnitAmbiguousTestClass:ERROR",
-      "-Xep:MissingFail:ERROR",
-      "-Xep:MissingOverride:ERROR",
-      "-Xep:ModifiedButNotUsed:ERROR",
-      "-Xep:MustBeClosedChecker:ERROR",
-      "-Xep:Overrides:ERROR",
-      "-Xep:PackageLocation:ERROR",
-      "-Xep:ParameterName:ERROR",
-      "-Xep:ReferenceEquality:ERROR",
-      "-Xep:RemoveUnusedImports:ERROR",
-      "-Xep:ReturnValueIgnored:ERROR",
-      "-Xep:SelfEquals:ERROR",
-      "-Xep:SizeGreaterThanOrEqualsZero:ERROR",
-      "-Xep:TryFailThrowable:ERROR",
-      "-Xep:UnnecessaryParentheses:ERROR",
-      "-Xep:UseCorrectAssertInTests:ERROR",
-      "-XepDisableWarningsInGeneratedCode",  // Disable warnings in gRPC generated code.
-      "-XepExcludedPaths:.*/srcjars/.*"
-    ],
-  },
-}
-
-java_defaults {
-  name: "tradefed_defaults",
-  defaults: [ "tradefed_errorprone_defaults" ],
-  javacflags: [
-    "-g",
-    "-Xlint",
-  ],
-}
diff --git a/filegroups/tradefed/Android.bp b/filegroups/tradefed/Android.bp
index 7a75c38..f974771 100644
--- a/filegroups/tradefed/Android.bp
+++ b/filegroups/tradefed/Android.bp
@@ -23,6 +23,36 @@
 }
 
 filegroup {
+    name: "tradefed-tests-prebuilt",
+    srcs: ["tradefed-tests.jar"],
+}
+
+filegroup {
     name: "tradefed-test-framework-prebuilt",
     srcs: ["tradefed-test-framework.jar"],
 }
+
+filegroup {
+    name: "tradefed-isolation-prebuilt",
+    srcs: ["tradefed-isolation.jar"],
+}
+
+filegroup {
+    name: "tradefed-contrib-prebuilt",
+    srcs: ["tradefed-contrib.jar"],
+}
+
+filegroup {
+    name: "tf-contrib-tests-prebuilt",
+    srcs: ["tf-contrib-tests.jar"],
+}
+
+filegroup {
+    name: "loganalysis-prebuilt",
+    srcs: ["loganalysis.jar"],
+}
+
+filegroup {
+    name: "loganalysis-tests-prebuilt",
+    srcs: ["loganalysis-tests.jar"],
+}
diff --git a/test_harness/Android.bp b/test_harness/Android.bp
index 9a42f03..f45f047 100644
--- a/test_harness/Android.bp
+++ b/test_harness/Android.bp
@@ -14,17 +14,8 @@
  * limitations under the License.
  */
 
-// This file contains all the build target that we expect tests writers
-// to need to build tests.
-
 java_import_host {
     name: "tradefed",
     jars: [":tradefed-prebuilt"],
     installable: true,
 }
-
-java_import_host {
-    name: "tradefed-test-framework",
-    jars: [":tradefed-test-framework-prebuilt"],
-    installable: true,
-}
diff --git a/test_harness/Android.mk b/test_harness/Android.mk
deleted file mode 100644
index 8180f7c..0000000
--- a/test_harness/Android.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 2020 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-ifeq (,$(wildcard $(LOCAL_PATH)/../../core))
-.PHONY: tradefed-all
-tradefed-all-prebuilt: tradefed
-
-tradefed_dist_artifacts := tradefed.jar tradefed-tests.jar tradefed-test-framework.jar loganalysis.jar loganalysis-tests.jar tradefed-contrib.jar tf-contrib-tests.jar tradefed-isolation.jar tradefed.sh tradefed_win.bat script_help.sh atest_tradefed.sh TradeFedUiTestApp.apk TradeFedTestApp.apk version.txt
-
-tradefed_dist_copy_pairs := $(foreach m, $(tradefed_dist_artifacts), $(LOCAL_PATH)/../filegroups/tradefed/$(m):$(m))
-
-tradefed_dist_artifacts :=
-
-tradefed_dist_intermediates := $(call intermediates-dir-for,PACKAGING,tradefed_dist,HOST,COMMON)
-tradefed_dist_zip := $(tradefed_dist_intermediates)/tradefed.zip
-$(tradefed_dist_zip) : PRIVATE_COPY_PAIRS := $(tradefed_dist_copy_pairs)
-$(tradefed_dist_zip) : $(SOONG_ZIP) $(foreach f,$(tradefed_dist_copy_pairs),$(call word-colon,1,$(f)))
-	rm -rf $(dir $@)/tmp && mkdir -p $(dir $@)/tmp
-	$(foreach f,$(PRIVATE_COPY_PAIRS), \
-	  cp -f $(call word-colon,1,$(f)) $(dir $@)/tmp/$(call word-colon,2,$(f)) &&) true
-
-$(call dist-for-goals, tradefed, $(tradefed_dist_zip))
-
-tradefed_dist_copy_pairs :=
-tradefed_dist_intermediates :=
-tradefed_dist_zip :=
-endif
-
-# Build all sub-directories
-include $(call all-makefiles-under,$(LOCAL_PATH))