aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Hu <paulhu@google.com>2021-03-16 13:03:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-03-16 13:03:58 +0000
commit80ddd786c0d846641b9a269d1589d865797161d2 (patch)
treeab47e8317fe9741986d18178b537e5d5845f1ca9
parent4d49a34cec9ca2d29ca7b2cd85d90137ed6aacca (diff)
parent6a44d6ede64ccaacd37ba0481c53f34b2d96ebea (diff)
downloadokhttp-temp_ab_7272582.tar.gz
Merge "Make okhttp implementation source files available for libcore" am: d6206694e3 am: 6a44d6ede6temp_ab_7272582
Original change: https://android-review.googlesource.com/c/platform/external/okhttp/+/1622890 Change-Id: I4cb6e324b259368ecf05b6600244a12fb64486ec
-rw-r--r--Android.bp29
1 files changed, 21 insertions, 8 deletions
diff --git a/Android.bp b/Android.bp
index 9312078..1c7f6e7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -69,6 +69,26 @@ java_library {
java_version: "1.7",
}
+// The source implementation files, used to build okhttp and core-all. It is
+// used in the latter case to break the cycle where okhttp depends on core-all
+// and core-all depends on okhttp. By including the source into core-all it
+// ensures that the code can all build correctly and then that is used to build
+// the separate parts.
+filegroup {
+ name: "okhttp_impl_files",
+ visibility: ["//libcore"],
+ srcs: [
+ // Although some of the classes in the android/ directory are already in the correct
+ // package and do not need to be moved to another package they are transformed as they
+ // reference other classes that do require repackaging.
+ "repackaged/android/src/main/java/**/*.java",
+ "repackaged/okhttp/src/main/java/**/*.java",
+ "repackaged/okhttp-urlconnection/src/main/java/**/*.java",
+ "repackaged/okhttp-android-support/src/main/java/**/*.java",
+ "repackaged/okio/okio/src/main/java/**/*.java",
+ ],
+}
+
java_library {
name: "okhttp",
visibility: [
@@ -80,14 +100,7 @@ java_library {
"//packages/modules/ArtPrebuilt",
],
srcs: [
- // Although some of the classes in the android/ directory are already in the correct
- // package and do not need to be moved to another package they are transformed as they
- // reference other classes that do require repackaging.
- "repackaged/android/src/main/java/**/*.java",
- "repackaged/okhttp/src/main/java/**/*.java",
- "repackaged/okhttp-urlconnection/src/main/java/**/*.java",
- "repackaged/okhttp-android-support/src/main/java/**/*.java",
- "repackaged/okio/okio/src/main/java/**/*.java",
+ ":okhttp_impl_files",
],
hostdex: true,