1// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE 2// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE 3// DEPENDING ON IT IN YOUR PROJECT. *** 4package { 5 default_applicable_licenses: ["prebuilts_sdk_license"], 6} 7 8// Added automatically by a large-scale-change that took the approach of 9// 'apply every license found to every target'. While this makes sure we respect 10// every license restriction, it may not be entirely correct. 11// 12// e.g. GPL in an MIT project might only apply to the contrib/ directory. 13// 14// Please consider splitting the single license below into multiple licenses, 15// taking care not to lose any license_kind information, and overriding the 16// default license using the 'licenses: [...]' property on targets as needed. 17// 18// For unused files, consider creating a 'fileGroup' with "//visibility:private" 19// to attach the license to, and including a comment whether the files may be 20// used in the current project. 21// See: http://go/android-license-faq 22license { 23 name: "prebuilts_sdk_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 "SPDX-license-identifier-BSD", 28 "SPDX-license-identifier-CC0-1.0", 29 "SPDX-license-identifier-CPL-1.0", 30 "SPDX-license-identifier-MIT", 31 "SPDX-license-identifier-NCSA", 32 "SPDX-license-identifier-OFL", // by exception only 33 "SPDX-license-identifier-Unicode-DFS", 34 "SPDX-license-identifier-W3C", 35 "legacy_unencumbered", 36 ], 37 license_text: [ 38 "NOTICE", 39 ], 40} 41 42subdirs = ["tools"] 43 44filegroup { 45 name: "current-support-api", 46 srcs: [ 47 "current/support-api.txt", 48 ], 49} 50 51genrule { 52 name: "current-androidx-api", 53 srcs: ["current/androidx-api.txt"], 54 out: ["androidx-api.xml"], 55 tools: ["metalava"], 56 cmd: "$(location metalava) signature-to-jdiff $(in) $(out)", 57} 58 59filegroup { 60 name: "metalava-sdk-android-jars", 61 srcs: [ 62 "**/android.jar", 63 ], 64} 65 66// Allow aconfig to use finalized flag files to automatically include SDK level 67// checks for finalized API flags. 68filegroup { 69 name: "finalized-api-flags", 70 srcs: [ 71 "*/finalized-flags.txt", 72 ], 73 visibility: [ 74 "//build/make/tools/aconfig:__subpackages__", 75 ], 76} 77 78droiddoc_exported_dir { 79 name: "sdk-dir", 80 path: ".", 81} 82 83genrule { 84 name: "last-released-public-api-for-metalava-annotations", 85 srcs: [ 86 "*/public/api/android.txt", 87 ], 88 cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -t/ -k3 -n | tail -2 | head -1) $(genDir)/last-released-api-for-metalava-annotations.txt", 89 out: [ 90 "last-released-api-for-metalava-annotations.txt", 91 ], 92} 93 94// This filegroup is to package android.jar into CtsUsesNativeLibraryTestCase 95filegroup { 96 name: "sdk_public_30_android.jar", 97 srcs: [ 98 "30/public/android.jar", 99 ], 100 visibility: [ 101 "//cts/hostsidetests/library", 102 ], 103} 104 105prebuilt_apis { 106 name: "sdk", 107 api_dirs: [ 108 "1", 109 "2", 110 "3", 111 "4", 112 "5", 113 "6", 114 "7", 115 "8", 116 "9", 117 "10", 118 "11", 119 "12", 120 "13", 121 "14", 122 "15", 123 "16", 124 "17", 125 "18", 126 "19", 127 "20", 128 "21", 129 "22", 130 "23", 131 "24", 132 "25", 133 "26", 134 "27", 135 "28", 136 "29", 137 "30", 138 "31", 139 "32", 140 "33", 141 "34", 142 "35", 143 "36", 144 "current", 145 ], 146 extensions_dir: "extensions", 147 next_api_dir: "36", 148 imports_sdk_version: "none", 149 imports_compile_dex: true, 150} 151 152filegroup { 153 name: "prebuilt_sdk_system_public_api_txt", 154 srcs: [ 155 "*/system/api/*.txt", 156 "*/public/api/*.txt", 157 ], 158} 159 160filegroup { 161 name: "prebuilt_sdk_system_api_android_txt", 162 srcs: [ 163 "*/system/api/android.txt", 164 ], 165} 166 167filegroup { 168 name: "android27.txt", 169 srcs: [ 170 "27/public/api/android.txt", 171 ], 172} 173 174genrule { 175 name: "latest-finalized-flags", 176 srcs: [ 177 "*/finalized-flags.txt", 178 ], 179 out: ["latest-finalized-flags.txt"], 180 cmd: "cp `echo \"$(in)\" | tr ' ' '\n' | grep -v -e current | sort -V | tail -n1` $(out)", 181} 182