aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Hu <paulhu@google.com>2021-03-16 12:44:36 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-03-16 12:44:36 +0000
commit6a44d6ede64ccaacd37ba0481c53f34b2d96ebea (patch)
treeab47e8317fe9741986d18178b537e5d5845f1ca9
parentc254c8546a8adb7eeb8f538b4e1ec2247eff6896 (diff)
parentd6206694e3f44137bcf07d39e2d00159ddb65bb8 (diff)
downloadokhttp-6a44d6ede64ccaacd37ba0481c53f34b2d96ebea.tar.gz
Merge "Make okhttp implementation source files available for libcore" am: d6206694e3
Original change: https://android-review.googlesource.com/c/platform/external/okhttp/+/1622890 Change-Id: Ifa0db7610a1a2eabf324997b4f8afb4a69a04787
-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,