Delete old targets from android_sdk_repository_template.bzl
In December 2015, these JARs needed for these targets were removed from all subsequent Android SDK releases. They were replaced by a two local maven repositories:
<android sdk>/extras/android/m2repository and <android sdk>/extras/google/m2repository. Furthermore, the new dependencies are AARs and the Maven repositories are sem-ver'd so the developer needs to select the version of the library to use.
In https://github.com/bazelbuild/bazel/commit/2fcf0e I added support for android_sdk_repository to parse these local maven repositories and generate java_import and aar_import rules along with their dependencies.
Since these "extras" do not ship with the SDK by default and are not versioned with the build-tools, you cannot currently download the old JAR versions. As such, anyone who has updated their Android SDK in the last year should not have been able to download the old JARs.
See https://github.com/bazelbuild/bazel/issues/1745 for the tracking issue and information on migrating from the old targets to the new ones.
RELNOTES: Top level @androidsdk support library targets have been replaced by @androidsdk//<group id>:<artifact id>-<version> for Android SDK Support and Google Play Services libraries.
--
MOS_MIGRATED_REVID=140562616
diff --git a/tools/android/android_sdk_repository_template.bzl b/tools/android/android_sdk_repository_template.bzl
index 58a4345..c8d5beb 100644
--- a/tools/android/android_sdk_repository_template.bzl
+++ b/tools/android/android_sdk_repository_template.bzl
@@ -49,112 +49,6 @@
], exclude_directories = 0),
)
- native.java_import(
- name = "appcompat_v7_import",
- jars = ["extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar"]
- )
-
- native.android_library(
- name = "appcompat_v7",
- custom_package = "android.support.v7.appcompat",
- manifest = "extras/android/support/v7/appcompat/AndroidManifest.xml",
- resource_files = native.glob(["extras/android/support/v7/appcompat/res/**"]),
- deps = [":appcompat_v7_import"]
- )
-
- native.java_import(
- name = "customtabs_import",
- jars = ["extras/android/support/customtabs/libs/android-support-customtabs.jar"],
- )
-
- native.android_library(
- name = "customtabs",
- custom_package = "android.support.customtabs",
- manifest = "extras/android/support/customtabs/AndroidManifest.xml",
- deps = [":customtabs_import"]
- )
-
- native.java_import(
- name = "design_import",
- jars = ["extras/android/support/design/libs/android-support-design.jar"],
- )
-
- native.android_library(
- name = "design",
- custom_package = "android.support.design",
- manifest = "extras/android/support/design/AndroidManifest.xml",
- resource_files = native.glob(["extras/android/support/design/res/**"]),
- deps = [":design_import", ":appcompat_v7"]
- )
-
- native.java_import(
- name = "mediarouter_v7_import",
- jars = ["extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar"]
- )
-
- native.android_library(
- name = "mediarouter_v7",
- custom_package = "android.support.v7.mediarouter",
- manifest = "extras/android/support/v7/mediarouter/AndroidManifest.xml",
- resource_files = native.glob(["extras/android/support/v7/mediarouter/res/**"]),
- deps = [
- ":appcompat_v7",
- ":mediarouter_v7_import",
- ]
- )
-
- native.java_import(
- name = "cardview_v7_import",
- jars = ["extras/android/support/v7/cardview/libs/android-support-v7-cardview.jar"]
- )
-
- native.android_library(
- name = "cardview_v7",
- custom_package = "android.support.v7.cardview",
- manifest = "extras/android/support/v7/cardview/AndroidManifest.xml",
- resource_files = native.glob(["extras/android/support/v7/cardview/res/**"]),
- deps = [":cardview_v7_import"]
- )
-
- native.java_import(
- name = "gridlayout_v7_import",
- jars = ["extras/android/support/v7/gridlayout/libs/android-support-v7-gridlayout.jar"]
- )
-
- native.android_library(
- name = "gridlayout_v7",
- custom_package = "android.support.v7.gridlayout",
- manifest = "extras/android/support/v7/gridlayout/AndroidManifest.xml",
- resource_files = native.glob(["extras/android/support/v7/gridlayout/res/**"]),
- deps = [":gridlayout_v7_import"]
- )
-
- native.java_import(
- name = "palette_v7_import",
- jars = ["extras/android/support/v7/palette/libs/android-support-v7-palette.jar"]
- )
-
- native.android_library(
- name = "palette_v7",
- custom_package = "android.support.v7.palette",
- manifest = "extras/android/support/v7/palette/AndroidManifest.xml",
- resource_files = native.glob(["extras/android/support/v7/palette/res/**"]),
- deps = [":palette_v7_import"]
- )
-
- native.java_import(
- name = "recyclerview_v7_import",
- jars = ["extras/android/support/v7/recyclerview/libs/android-support-v7-recyclerview.jar"]
- )
-
- native.android_library(
- name = "recyclerview_v7",
- custom_package = "android.support.v7.recyclerview",
- manifest = "extras/android/support/v7/recyclerview/AndroidManifest.xml",
- resource_files = native.glob(["extras/android/support/v7/recyclerview/res/**"]),
- deps = [":recyclerview_v7_import"]
- )
-
if api_level >= 23:
# Android 23 removed most of org.apache.http from android.jar and moved it
# to a separate jar.
@@ -163,16 +57,6 @@
jars = ["platforms/android-%d/optional/org.apache.http.legacy.jar" % api_level]
)
- native.java_import(
- name = "appcompat_v4",
- jars = ["extras/android/support/v4/android-support-v4.jar"]
- )
-
- native.java_import(
- name = "appcompat_v13",
- jars = ["extras/android/support/v13/android-support-v13.jar"]
- )
-
native.android_sdk(
name = "sdk",
build_tools_version = build_tools_version,
@@ -298,18 +182,3 @@
name = "dx_jar_import",
jars = [":dx_jar"],
)
-
- GOOGLE_PLAY_SERVICES_DIR = "extras/google/google_play_services/libproject/google-play-services_lib"
-
- native.java_import(
- name = "google_play_services_lib",
- jars = [GOOGLE_PLAY_SERVICES_DIR + "/libs/google-play-services.jar"])
-
- native.android_library(
- name = "google_play_services",
- custom_package = "com.google.android.gms",
- manifest = GOOGLE_PLAY_SERVICES_DIR + "/AndroidManifest.xml",
- exports_manifest = 1,
- resource_files = native.glob([GOOGLE_PLAY_SERVICES_DIR + "/res/**"]),
- proguard_specs = [GOOGLE_PLAY_SERVICES_DIR + "/proguard.txt"],
- deps = [":google_play_services_lib"])