Home | History | Annotate | Download | only in okhttp
      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 // The source files that contribute to Android's core library APIs.
     18 filegroup {
     19     name: "okhttp_api_files",
     20     // 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"],
     23 }
     24 
     25 // non-jarjar'd version of okhttp to compile the tests against
     26 java_library {
     27     name: "okhttp-nojarjar",
     28     srcs: [
     29         "android/src/main/java/**/*.java",
     30         "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     ],
     35     exclude_srcs: ["okhttp/src/main/java/com/squareup/okhttp/internal/Platform.java"],
     36 
     37     hostdex: true,
     38 
     39     no_standard_libs: true,
     40     libs: [
     41         "core-all",
     42         // TODO(b/129126571): Depend on Conscrypt stubs instead
     43         "conscrypt",
     44     ],
     45     system_modules: "core-all-system-modules",
     46     java_version: "1.7",
     47 }
     48 
     49 java_library {
     50     name: "okhttp",
     51     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     ],
     61 
     62     hostdex: true,
     63     installable: true,
     64 
     65     no_standard_libs: true,
     66     libs: [
     67         "core-all",
     68         // TODO(b/129126571): Depend on Conscrypt stubs instead
     69         "conscrypt",
     70     ],
     71     system_modules: "core-all-system-modules",
     72     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.
     78 java_library {
     79     name: "okhttp-testdex",
     80     static_libs: ["okhttp"],
     81 
     82     installable: true,
     83 
     84     no_standard_libs: true,
     85     libs: [
     86         "core-all",
     87         // TODO(b/129126571): Depend on Conscrypt stubs instead
     88         "conscrypt",
     89     ],
     90     dex_preopt: {
     91         enabled: false,
     92     },
     93     system_modules: "core-all-system-modules",
     94     java_version: "1.7",
     95 }
     96 
     97 java_library_static {
     98     name: "okhttp-tests-nojarjar",
     99     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"],
    113 
    114     no_standard_libs: true,
    115     libs: [
    116         "core-all",
    117         "okhttp-nojarjar",
    118         "junit",
    119         "conscrypt",
    120         "bouncycastle-unbundled",
    121     ],
    122     system_modules: "core-all-system-modules",
    123 
    124     java_version: "1.7",
    125 }
    126