aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Hu <paulhu@google.com>2021-03-16 12:18:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-03-16 12:18:49 +0000
commitd6206694e3f44137bcf07d39e2d00159ddb65bb8 (patch)
treeab47e8317fe9741986d18178b537e5d5845f1ca9
parent502b3afc7bba75a3905ebac05c65d6e07d7a2253 (diff)
parent57176b10c27e13853e46061fbf5edf05cc42606f (diff)
downloadokhttp-d6206694e3f44137bcf07d39e2d00159ddb65bb8.tar.gz
Merge "Make okhttp implementation source files available for libcore"
-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,