Skip to content

Commit

Permalink
Delete old targets from android_sdk_repository_template.bzl
Browse files Browse the repository at this point in the history
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 bazelbuild@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 bazelbuild#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
  • Loading branch information
aj-michael authored and iirina committed Nov 30, 2016
1 parent 79d09f7 commit f699b50
Showing 1 changed file with 0 additions and 131 deletions.
131 changes: 0 additions & 131 deletions tools/android/android_sdk_repository_template.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -49,112 +49,6 @@ def create_android_sdk_rules(
], 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.
Expand All @@ -163,16 +57,6 @@ def create_android_sdk_rules(
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,
Expand Down Expand Up @@ -298,18 +182,3 @@ def create_android_sdk_rules(
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"])

0 comments on commit f699b50

Please sign in to comment.