Home | History | Annotate | Download | only in libphonenumber
      1 //
      2 // Copyright (C) 2014 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 // For platform use, builds directly against core-libart to avoid circular
     17 // dependencies. *NOT* for unbundled use.
     18 java_library_static {
     19     name: "libphonenumber-platform",
     20 
     21     // For the platform, compile everything except the carrier to phone number
     22     // which isn't used.
     23     java_resource_dirs: [
     24         "repackaged/libphonenumber/src",
     25         "repackaged/geocoder/src",
     26         "repackaged/internal/prefixmapper/src",
     27     ],
     28 
     29     srcs: [
     30         "repackaged/libphonenumber/src/**/*.java",
     31         "repackaged/geocoder/src/**/*.java",
     32         "repackaged/internal/prefixmapper/src/**/*.java",
     33     ],
     34 
     35     no_framework_libs: true,
     36 }
     37 
     38 
     39 java_defaults {
     40     name: "libphonenumber-unbundled-defaults",
     41     java_resource_dirs: [
     42         "libphonenumber/src",
     43         "carrier/src",
     44         "internal/prefixmapper/src",
     45     ],
     46 
     47     srcs: [
     48         "libphonenumber/src/**/*.java",
     49         "carrier/src/**/*.java",
     50         "internal/prefixmapper/src/**/*.java",
     51     ],
     52 }
     53 
     54 // For unbundled use, supports gingerbread and up.
     55 java_library_static {
     56     name: "libphonenumber",
     57     defaults: ["libphonenumber-unbundled-defaults"],
     58 
     59     srcs: ["geocoder/src/**/*.java"],
     60     java_resource_dirs: ["geocoder/src"],
     61 
     62     sdk_version: "9",
     63     java_version: "1.7",
     64 }
     65 
     66 // For unbundled use - without geocoder
     67 java_library_static {
     68     name: "libphonenumber-nogeocoder",
     69     defaults: ["libphonenumber-unbundled-defaults"],
     70 
     71     sdk_version: "9",
     72     java_version: "1.7",
     73 }
     74 
     75 // Tests for unbundled use.
     76 // vogar --timeout 0  \
     77 //    --classpath out/target/common/obj/JAVA_LIBRARIES/libphonenumber-test_intermediates/classes.jack \
     78 //    com.google.i18n.phonenumbers
     79 java_library {
     80     name: "libphonenumber_test",
     81     srcs: [
     82         "carrier/test/**/*.java",
     83         "geocoder/test/**/*.java",
     84         "internal/prefixmapper/test/**/*.java",
     85         "libphonenumber/test/**/*.java",
     86     ],
     87 
     88     java_resource_dirs: [
     89         "carrier/test",
     90         "geocoder/test",
     91         "libphonenumber/test",
     92     ],
     93 
     94     sdk_version: "current",
     95     static_libs: [
     96         "libphonenumber",
     97         "junit",
     98     ],
     99     java_version: "1.7",
    100 }
    101