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 against core_current to avoid circular 17// dependencies. *NOT* for unbundled use. 18package { 19 default_applicable_licenses: ["external_libphonenumber_license"], 20} 21 22// Added automatically by a large-scale-change 23// See: http://go/android-license-faq 24license { 25 name: "external_libphonenumber_license", 26 visibility: [":__subpackages__"], 27 license_kinds: [ 28 "SPDX-license-identifier-Apache-2.0", 29 ], 30 license_text: [ 31 "NOTICE", 32 ], 33} 34 35java_library { 36 name: "libphonenumber-platform", 37 38 // For the platform, compile everything except the carrier to phone number 39 // which isn't used. 40 java_resource_dirs: [ 41 "repackaged/libphonenumber/src", 42 "repackaged/geocoder/src", 43 "repackaged/internal/prefixmapper/src", 44 ], 45 46 srcs: [ 47 "repackaged/libphonenumber/src/**/*.java", 48 "repackaged/geocoder/src/**/*.java", 49 "repackaged/internal/prefixmapper/src/**/*.java", 50 ], 51 52 libs: [ 53 "unsupportedappusage", 54 ], 55 56 sdk_version: "core_current", 57} 58 59java_defaults { 60 name: "libphonenumber-unbundled-defaults", 61 java_resource_dirs: [ 62 "libphonenumber/src", 63 "carrier/src", 64 "internal/prefixmapper/src", 65 ], 66 67 srcs: [ 68 "libphonenumber/src/**/*.java", 69 "carrier/src/**/*.java", 70 "internal/prefixmapper/src/**/*.java", 71 ], 72} 73 74// For unbundled use, supports gingerbread and up. 75java_library { 76 name: "libphonenumber", 77 defaults: ["libphonenumber-unbundled-defaults"], 78 79 srcs: ["geocoder/src/**/*.java"], 80 java_resource_dirs: ["geocoder/src"], 81 82 sdk_version: "9", 83 java_version: "1.7", 84} 85 86// For unbundled use - without geocoder 87java_library { 88 name: "libphonenumber-nogeocoder", 89 defaults: ["libphonenumber-unbundled-defaults"], 90 91 sdk_version: "9", 92 java_version: "1.7", 93} 94 95// Tests for unbundled use. 96// vogar --timeout 0 \ 97// --classpath out/target/common/obj/JAVA_LIBRARIES/libphonenumber-test_intermediates/classes.jack \ 98// com.google.i18n.phonenumbers 99java_library { 100 name: "libphonenumber_test", 101 srcs: [ 102 "carrier/test/**/*.java", 103 "geocoder/test/**/*.java", 104 "internal/prefixmapper/test/**/*.java", 105 "libphonenumber/test/**/*.java", 106 ], 107 108 java_resource_dirs: [ 109 "carrier/test", 110 "geocoder/test", 111 "libphonenumber/test", 112 ], 113 114 sdk_version: "current", 115 static_libs: [ 116 "libphonenumber", 117 "junit", 118 ], 119 java_version: "1.7", 120} 121