1// 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 17// non-jarjar'd version of okhttp to compile the tests against 18java_library_static { 19 name: "okhttp-nojarjar", 20 hostdex: true, 21 22 srcs: [ 23 "okhttp/src/main/java/**/*.java", 24 "okhttp-urlconnection/src/main/java/**/*.java", 25 "okhttp-android-support/src/main/java/**/*.java", 26 "okio/okio/src/main/java/**/*.java", 27 ], 28 29 target: { 30 android: { 31 srcs: ["android/main/java/**/*.java"], 32 exclude_srcs: ["okhttp/src/main/java/com/squareup/okhttp/internal/Platform.java"], 33 }, 34 }, 35 36 no_framework_libs: true, 37 java_version: "1.7", 38} 39 40java_library { 41 name: "okhttp", 42 hostdex: true, 43 jarjar_rules: "jarjar-rules.txt", 44 static_libs: ["okhttp-nojarjar"], 45 no_framework_libs: true, 46 java_version: "1.7", 47} 48 49// A guaranteed unstripped version of okhttp. 50// The build system may or may not strip the okhttp jar, but this one will 51// not be stripped. See b/24535627. 52java_library { 53 name: "okhttp-testdex", 54 static_libs: ["okhttp"], 55 no_framework_libs: true, 56 java_version: "1.7", 57} 58 59java_library_static { 60 name: "okhttp-tests-nojarjar", 61 62 srcs: [ 63 "android/test/java/**/*.java", 64 "okhttp-android-support/src/test/java/**/*.java", 65 "okhttp-testing-support/src/main/java/**/*.java", 66 "okhttp-tests/src/test/java/**/*.java", 67 "okhttp-urlconnection/src/test/java/**/*.java", 68 "okhttp-ws/src/main/java/**/*.java", 69 "okhttp-ws-tests/src/test/java/**/*.java", 70 "okio/okio/src/test/java/**/*.java", 71 "mockwebserver/src/main/java/**/*.java", 72 "mockwebserver/src/test/java/**/*.java", 73 ], 74 // Exclude test Android currently has problems with due to @Parameterized (requires JUnit 4.11). 75 exclude_srcs: ["okhttp-tests/src/test/java/com/squareup/okhttp/WebPlatformUrlTest.java"], 76 libs: [ 77 "okhttp-nojarjar", 78 "junit", 79 "bouncycastle-unbundled", 80 "conscrypt", 81 ], 82 no_framework_libs: true, 83 java_version: "1.7", 84} 85