blob: e9f1ddee604347bd966fe700139344691505674c [file] [log] [blame]
Colin Crossea8fc512017-10-19 15:06:43 -07001//
2// Copyright (C) 2012 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
Neil Fuller7c21fa42018-09-24 15:37:43 +010017// The source files that contribute to Android's core library APIs.
18filegroup {
19 name: "okhttp_api_files",
Paul Duffinaa7ed342018-11-13 14:51:39 +000020 // Use the repackaged version of android as that is what is used by Android core library
21 // APIs.
22 srcs: ["repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/**/*.java"],
Neil Fuller7c21fa42018-09-24 15:37:43 +010023}
Colin Crossea8fc512017-10-19 15:06:43 -070024
Neil Fuller7c21fa42018-09-24 15:37:43 +010025// non-jarjar'd version of okhttp to compile the tests against
26java_library {
27 name: "okhttp-nojarjar",
Colin Crossea8fc512017-10-19 15:06:43 -070028 srcs: [
Paul Duffin84746082018-11-13 11:45:44 +000029 "android/src/main/java/**/*.java",
Colin Crossea8fc512017-10-19 15:06:43 -070030 "okhttp/src/main/java/**/*.java",
31 "okhttp-urlconnection/src/main/java/**/*.java",
32 "okhttp-android-support/src/main/java/**/*.java",
33 "okio/okio/src/main/java/**/*.java",
34 ],
Neil Fuller7c21fa42018-09-24 15:37:43 +010035 exclude_srcs: ["okhttp/src/main/java/com/squareup/okhttp/internal/Platform.java"],
Colin Crossea8fc512017-10-19 15:06:43 -070036
Neil Fuller7c21fa42018-09-24 15:37:43 +010037 hostdex: true,
Colin Crossea8fc512017-10-19 15:06:43 -070038
Neil Fuller4c219c62018-10-04 13:11:17 +010039 no_standard_libs: true,
40 libs: [
41 "core-all",
Adam Vartanianed342712019-03-19 09:36:23 +000042 // TODO(b/129126571): Depend on Conscrypt stubs instead
43 "conscrypt",
Neil Fuller4c219c62018-10-04 13:11:17 +010044 ],
45 system_modules: "core-all-system-modules",
Colin Crossea8fc512017-10-19 15:06:43 -070046 java_version: "1.7",
47}
48
49java_library {
50 name: "okhttp",
Paul Duffinaa7ed342018-11-13 14:51:39 +000051 srcs: [
52 // Although some of the classes in the android/ directory are already in the correct
53 // package and do not need to be moved to another package they are transformed as they
54 // reference other classes that do require repackaging.
55 "repackaged/android/src/main/java/**/*.java",
56 "repackaged/okhttp/src/main/java/**/*.java",
57 "repackaged/okhttp-urlconnection/src/main/java/**/*.java",
58 "repackaged/okhttp-android-support/src/main/java/**/*.java",
59 "repackaged/okio/okio/src/main/java/**/*.java",
60 ],
Neil Fuller7c21fa42018-09-24 15:37:43 +010061
62 hostdex: true,
63 installable: true,
64
Neil Fuller4c219c62018-10-04 13:11:17 +010065 no_standard_libs: true,
66 libs: [
67 "core-all",
Adam Vartanianed342712019-03-19 09:36:23 +000068 // TODO(b/129126571): Depend on Conscrypt stubs instead
69 "conscrypt",
Neil Fuller4c219c62018-10-04 13:11:17 +010070 ],
71 system_modules: "core-all-system-modules",
Colin Crossea8fc512017-10-19 15:06:43 -070072 java_version: "1.7",
73}
74
75// A guaranteed unstripped version of okhttp.
76// The build system may or may not strip the okhttp jar, but this one will
77// not be stripped. See b/24535627.
78java_library {
79 name: "okhttp-testdex",
80 static_libs: ["okhttp"],
Neil Fuller7c21fa42018-09-24 15:37:43 +010081
82 installable: true,
83
Neil Fuller4c219c62018-10-04 13:11:17 +010084 no_standard_libs: true,
85 libs: [
86 "core-all",
Adam Vartanianed342712019-03-19 09:36:23 +000087 // TODO(b/129126571): Depend on Conscrypt stubs instead
88 "conscrypt",
Neil Fuller4c219c62018-10-04 13:11:17 +010089 ],
Vladimir Marko5eb6baa2018-12-04 10:25:47 +000090 dex_preopt: {
91 enabled: false,
92 },
Neil Fuller4c219c62018-10-04 13:11:17 +010093 system_modules: "core-all-system-modules",
Colin Crossea8fc512017-10-19 15:06:43 -070094 java_version: "1.7",
95}
96
97java_library_static {
98 name: "okhttp-tests-nojarjar",
Colin Crossea8fc512017-10-19 15:06:43 -070099 srcs: [
100 "android/test/java/**/*.java",
101 "okhttp-android-support/src/test/java/**/*.java",
102 "okhttp-testing-support/src/main/java/**/*.java",
103 "okhttp-tests/src/test/java/**/*.java",
104 "okhttp-urlconnection/src/test/java/**/*.java",
105 "okhttp-ws/src/main/java/**/*.java",
106 "okhttp-ws-tests/src/test/java/**/*.java",
107 "okio/okio/src/test/java/**/*.java",
108 "mockwebserver/src/main/java/**/*.java",
109 "mockwebserver/src/test/java/**/*.java",
110 ],
111 // Exclude test Android currently has problems with due to @Parameterized (requires JUnit 4.11).
112 exclude_srcs: ["okhttp-tests/src/test/java/com/squareup/okhttp/WebPlatformUrlTest.java"],
Neil Fuller7c21fa42018-09-24 15:37:43 +0100113
Neil Fuller1a022c12018-10-09 17:44:35 +0100114 no_standard_libs: true,
Colin Crossea8fc512017-10-19 15:06:43 -0700115 libs: [
Neil Fuller1a022c12018-10-09 17:44:35 +0100116 "core-all",
Colin Crossea8fc512017-10-19 15:06:43 -0700117 "okhttp-nojarjar",
118 "junit",
Neil Fuller1a022c12018-10-09 17:44:35 +0100119 "conscrypt",
Narayan Kamath34f350f2018-03-01 12:33:49 +0000120 "bouncycastle-unbundled",
Colin Crossea8fc512017-10-19 15:06:43 -0700121 ],
Neil Fuller1a022c12018-10-09 17:44:35 +0100122 system_modules: "core-all-system-modules",
123
Colin Crossea8fc512017-10-19 15:06:43 -0700124 java_version: "1.7",
125}