aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-03-09 02:21:23 +0000
committerPaul Hu <paulhu@google.com>2021-03-09 08:19:58 +0000
commit57176b10c27e13853e46061fbf5edf05cc42606f (patch)
treeab47e8317fe9741986d18178b537e5d5845f1ca9
parent502b3afc7bba75a3905ebac05c65d6e07d7a2253 (diff)
downloadokhttp-57176b10c27e13853e46061fbf5edf05cc42606f.tar.gz
Make okhttp implementation source files available for libcore
Bug: 182238821 Test: m update-api Change-Id: Ib5c8490eb756edc8ce3ef21e7104bd1c2349b0c9
-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,