aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp21
1 files changed, 12 insertions, 9 deletions
diff --git a/Android.bp b/Android.bp
index 6eeb3f8..0db44d2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -153,16 +153,17 @@ java_library {
":okhttp_version.java",
],
- target: {
- host: {
- libs: [
- "okhttp-android-util-log",
- ],
- },
- },
+ libs: [
+ // Building against "core_current" means that the android.util.Log API
+ // is not available. This provides stubs for it which allows the code to
+ // compile.
+ "okhttp-android-util-log",
+ ],
installable: true,
- sdk_version: "current",
+ // Build against a "core_current" as it cannot use "current" as it has to
+ // build in manifests without frameworks/base.
+ sdk_version: "core_current",
}
// Generate Version.java based on the version number from pom.xml.
@@ -182,9 +183,11 @@ genrule {
// A library to provide a stub android.util.Log symbol for
// okhttp/src/main/java/com/squareup/okhttp/internal/Platform.java
-java_library_host {
+java_library {
name: "okhttp-android-util-log",
+ host_supported: true,
srcs: ["okhttp-android-util-log/src/main/java/**/*.java"],
+ sdk_version: "core_current",
}
java_library {