Home | History | Annotate | Download | only in test-base
      1 //
      2 // Copyright (C) 2016 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 // Build the android.test.base library
     18 // ===================================
     19 // This contains the junit.framework and android.test classes that were in
     20 // Android API level 25 excluding those from android.test.runner.
     21 // Also contains the com.android.internal.util.Predicate[s] classes.
     22 java_sdk_library {
     23     name: "android.test.base",
     24 
     25     srcs: ["src/**/*.java"],
     26 
     27     errorprone: {
     28       javacflags: ["-Xep:DepAnn:ERROR"],
     29     },
     30 
     31     hostdex: true,
     32 
     33     api_packages: [
     34         "android.test",
     35         "android.test.suitebuilder.annotation",
     36         "com.android.internal.util",
     37         "junit.framework",
     38     ],
     39 
     40     compile_dex: true,
     41 }
     42 
     43 // Build the android.test.base_static library
     44 // ==========================================
     45 // This is only intended for inclusion in the android.test.runner-minus-junit,
     46 // robolectric_android-all-stub and repackaged.android.test.* libraries.
     47 // Must not be used elsewhere.
     48 java_library_static {
     49     name: "android.test.base_static",
     50     installable: false,
     51 
     52     srcs: ["src/**/*.java"],
     53 
     54     errorprone: {
     55         javacflags: ["-Xep:DepAnn:ERROR"],
     56     },
     57 
     58     // Needs to be consistent with the repackaged version of this make target.
     59     java_version: "1.8",
     60 
     61     sdk_version: "current",
     62 }
     63 
     64 // Build the repackaged.android.test.base library
     65 // ==============================================
     66 // This contains repackaged versions of the classes from
     67 // android.test.base.
     68 java_library_static {
     69     name: "repackaged.android.test.base",
     70 
     71     sdk_version: "current",
     72     static_libs: ["android.test.base_static"],
     73 
     74     jarjar_rules: "jarjar-rules.txt",
     75     // Pin java_version until jarjar is certified to support later versions. http://b/72703434
     76     java_version: "1.8",
     77 }
     78 
     79 // Build the android.test.base-minus-junit library
     80 // ===============================================
     81 // This contains the android.test classes from android.test.base plus
     82 // the com.android.internal.util.Predicate[s] classes. This is only
     83 // intended for inclusion in android.test.legacy and must not be used
     84 // elsewhere.
     85 java_library_static {
     86     name: "android.test.base-minus-junit",
     87 
     88     srcs: [
     89         "src/android/**/*.java",
     90         "src/com/**/*.java",
     91     ],
     92 
     93     sdk_version: "current",
     94     libs: [
     95         "junit",
     96     ],
     97 }
     98 
     99