Lines Matching +full:maven +full:- +full:bin
1 #!/usr/bin/python3
5 For details on how to use this script, visit go/update-prebuilts.
30 from maven import MavenLibraryInfo, GMavenArtifact, maven_path_for_artifact
47 jetifier_dir = os.path.join(buildtools_dir, 'jetifier', 'jetifier-standalone')
49 extension_sdk_finalization_cmd = 'prebuilts/build-tools/path/linux-x86/python3 %s -r "{readme}" {local_mode} -b {bug} -f {extension_version} {build_id}' % (
61 # - Name format is MAVEN.replaceAll(':','_')
62 # - Path format is MAVEN.replaceAll(':','/').replaceAll('.','/')
65 'androidx.benchmark:benchmark-macro': {},
66 'androidx.benchmark:benchmark-macro-junit4': {},
67 'androidx.benchmark:benchmark-common': {},
68 'androidx.benchmark:benchmark-junit4': {},
70 'androidx.tracing:tracing-perfetto': {},
71 'androidx.tracing:tracing-perfetto-binary': {},
72 'androidx.tracing:tracing-perfetto-handshake': {},
73 'androidx.tracing:tracing-perfetto-common': {},
74 'androidx.tracing:tracing-ktx': {},
75 'androidx.slice:slice-builders': {},
76 'androidx.slice:slice-core': {},
77 'androidx.slice:slice-view': {},
79 'androidx.remotecallback:remotecallback-processor': {
83 'androidx.vectordrawable:vectordrawable-animated': {},
85 'androidx.activity:activity-ktx': {},
86 'androidx.annotation:annotation-jvm': {
89 'androidx.annotation:annotation-experimental': {},
91 'androidx.camera:camera-viewfinder':{},
92 'androidx.camera:camera-camera2' :{},
93 'androidx.camera:camera-core': {},
94 'androidx.camera:camera-lifecycle': {},
95 'androidx.camera:camera-extensions': {},
96 'androidx.collection:collection-ktx': {},
97 'androidx.collection:collection-jvm': {},
98 'androidx.concurrent:concurrent-futures': {},
99 'androidx.concurrent:concurrent-futures-ktx': {},
100 'androidx.concurrent:concurrent-listenablefuture-callback': {},
101 'androidx.concurrent:concurrent-listenablefuture': {},
103 'androidx.core:core-animation': {},
104 'androidx.core:core-animation-testing': {},
105 'androidx.core:core-ktx': {},
107 'androidx.core.uwb:uwb-rxjava3': {},
110 'androidx.datastore:datastore-android': {},
111 'androidx.datastore:datastore-core-okio-jvm': {},
112 'androidx.datastore:datastore-core-android': {},
113 'androidx.datastore:datastore-preferences-android': {},
114 'androidx.datastore:datastore-preferences-core-jvm': {},
115 'androidx.datastore:datastore-preferences-rxjava2': {},
116 'androidx.datastore:datastore-rxjava2': {},
117 'androidx.legacy:legacy-support-core-ui': {},
118 'androidx.legacy:legacy-support-core-utils': {},
122 'androidx.customview:customview-poolingcontainer': {},
128 'androidx.emoji:emoji-appcompat': {},
129 'androidx.emoji:emoji-bundled': {},
131 'androidx.emoji2:emoji2-views-helper': {},
134 'androidx.fragment:fragment-ktx': {},
135 'androidx.fragment:fragment-testing': {},
136 'androidx.fragment:fragment-testing-manifest': {},
138 'androidx.health:health-services-client': {},
142 'androidx.media2:media2-player': {},
143 'androidx.media2:media2-session': {},
144 'androidx.media2:media2-common': {},
145 'androidx.media2:media2-exoplayer': {},
146 'androidx.media2:media2-widget': {},
147 'androidx.navigation:navigation-common': {},
148 'androidx.navigation:navigation-common-ktx': {},
149 'androidx.navigation:navigation-fragment': {},
150 'androidx.navigation:navigation-fragment-ktx': {},
151 'androidx.navigation:navigation-runtime': {},
152 'androidx.navigation:navigation-runtime-ktx': {},
153 'androidx.navigation:navigation-ui': {},
154 'androidx.navigation:navigation-ui-ktx': {},
157 'androidx.privacysandbox.ads:ads-adservices': {},
158 'androidx.privacysandbox.ads:ads-adservices-java': {},
159 'androidx.privacysandbox.ui:ui-client': {},
160 'androidx.privacysandbox.ui:ui-provider': {},
161 'androidx.privacysandbox.ui:ui-core': {},
162 'androidx.privacysandbox.sdkruntime:sdkruntime-client': {},
163 'androidx.privacysandbox.sdkruntime:sdkruntime-core': {},
167 'androidx.privacysandbox.tools:tools-apicompiler': {
170 'androidx.privacysandbox.tools:tools-apigenerator': {
173 'androidx.privacysandbox.tools:tools-apipackager': {
176 'androidx.privacysandbox.tools:tools-core': {
179 'androidx.privacysandbox.ui:ui-tests': {},
181 'androidx.recyclerview:recyclerview-selection': {},
183 'androidx.savedstate:savedstate-ktx': {},
188 'androidx.transition:transition-ktx': {},
190 'androidx.legacy:legacy-support-v13': {},
191 'androidx.legacy:legacy-preference-v14': {},
193 'androidx.leanback:leanback-grid': {},
194 'androidx.leanback:leanback-preference': {},
195 'androidx.legacy:legacy-support-v4': {},
197 'androidx.appcompat:appcompat-resources': {},
208 'androidx.wear:wear-ongoing': {},
214 'androidx.appsearch:appsearch-builtin-types': {},
215 'androidx.appsearch:appsearch-compiler': {
216 'name': 'androidx.appsearch_appsearch-compiler',
219 'androidx.appsearch:appsearch-local-storage': {
222 'androidx.appsearch:appsearch-platform-storage': {},
224 'androidx.car.app:app-automotive': {},
225 'androidx.car.app:app-testing': {},
226 'androidx.startup:startup-runtime': {},
228 'optional-uses-libs': {
235 'androidx.window:window-core': {},
236 'androidx.window:window-java':{},
237 'androidx.resourceinspection:resourceinspection-annotation': {},
242 'androidx.compose.compiler:compiler-hosted': {
245 'androidx.compose.animation:animation-android': {},
246 'androidx.compose.animation:animation-core-android': {},
247 'androidx.compose.animation:animation-graphics-android': {},
248 'androidx.compose.foundation:foundation-android': {},
249 'androidx.compose.foundation:foundation-layout-android': {},
250 'androidx.compose.foundation:foundation-text-android': {},
251 'androidx.compose.material:material-android': {},
252 'androidx.compose.material:material-icons-core-android': {},
253 'androidx.compose.material:material-icons-extended-android': {},
254 'androidx.compose.material:material-ripple-android': {},
255 'androidx.compose.material3:material3-android': {},
256 'androidx.compose.material3:material3-window-size-class-android': {},
257 'androidx.compose.runtime:runtime-android': {},
258 'androidx.compose.runtime:runtime-livedata': {},
259 'androidx.compose.runtime:runtime-saveable-android': {},
260 'androidx.compose.runtime:runtime-tracing': {},
261 'androidx.compose.ui:ui-util-android': {},
262 'androidx.compose.ui:ui-android': {},
263 'androidx.compose.ui:ui-geometry-android': {},
264 'androidx.compose.ui:ui-graphics-android': {},
265 'androidx.compose.ui:ui-test-manifest': {},
266 'androidx.compose.ui:ui-test-android': {},
267 'androidx.compose.ui:ui-test-junit4-android': {},
268 'androidx.compose.ui:ui-text-android': {},
269 'androidx.compose.ui:ui-tooling-android': {},
270 'androidx.compose.ui:ui-tooling-data-android': {},
271 'androidx.compose.ui:ui-tooling-preview-android': {},
272 'androidx.compose.ui:ui-unit-android': {},
273 'androidx.activity:activity-compose': {},
274 'androidx.navigation:navigation-compose': { },
275 'androidx.lifecycle:lifecycle-viewmodel-compose': { },
278 'androidx.wear.compose:compose-material-core': {},
279 'androidx.wear.compose:compose-foundation': {},
280 'androidx.wear.compose:compose-material': {},
281 'androidx.wear.compose:compose-navigation': {},
285 'androidx.multidex:multidex-instrumentation': {},
289 'name': 'androidx-constraintlayout_constraintlayout'
291 'androidx.constraintlayout:constraintlayout-solver': {
292 'name': 'androidx-constraintlayout_constraintlayout-solver'
294 'androidx.constraintlayout:constraintlayout-core': {},
295 'androidx.constraintlayout:constraintlayout-compose-android': {},
297 'androidx.arch.core:core-common': {},
298 'androidx.arch.core:core-runtime': {},
299 'androidx.arch.core:core-testing': {},
300 'androidx.lifecycle:lifecycle-common': {},
301 'androidx.lifecycle:lifecycle-common-java8': {},
302 'androidx.lifecycle:lifecycle-extensions': {},
303 'androidx.lifecycle:lifecycle-livedata': {},
304 'androidx.lifecycle:lifecycle-livedata-ktx': {},
305 'androidx.lifecycle:lifecycle-livedata-core': {},
306 'androidx.lifecycle:lifecycle-livedata-core-ktx': {},
307 'androidx.lifecycle:lifecycle-process': {},
308 'androidx.lifecycle:lifecycle-runtime': {},
309 'androidx.lifecycle:lifecycle-runtime-ktx': {},
310 'androidx.lifecycle:lifecycle-runtime-compose': {},
311 'androidx.lifecycle:lifecycle-runtime-testing': {},
312 'androidx.lifecycle:lifecycle-service': {},
313 'androidx.lifecycle:lifecycle-viewmodel': {},
314 'androidx.lifecycle:lifecycle-viewmodel-ktx': {},
315 'androidx.lifecycle:lifecycle-viewmodel-savedstate': {},
316 'androidx.paging:paging-common-jvm': {},
317 'androidx.paging:paging-common-ktx': {},
318 'androidx.paging:paging-guava': {},
319 'androidx.paging:paging-runtime': {},
321 'androidx.sqlite:sqlite-framework': {},
322 'androidx.room:room-common-jvm': {
325 'androidx.room:room-compiler': {
327 'extra-static-libs': {
331 'androidx.room:room-guava': {},
332 'androidx.room:room-migration': {
335 'androidx.room:room-ktx': {},
336 'androidx.room:room-paging': {},
337 'androidx.room:room-paging-guava': {},
338 'androidx.room:room-runtime': {},
339 'androidx.room:room-testing': {},
340 'androidx.room:room-compiler-processing': {
343 'androidx.work:work-runtime': {},
344 'androidx.work:work-runtime-ktx': {},
345 'androidx.work:work-testing': {},
347 # Third-party dependencies
359 'auto-common': 'auto_common',
360 'auto-value-annotations': 'auto_value_annotations',
361 'com.google.auto.value:auto-value': 'libauto_value_plugin',
362 'com.google.protobuf:protobuf-java': 'libprotobuf-java-full',
363 'com.google.protobuf:protobuf-javalite': 'libprotobuf-java-lite',
364 'org.ow2.asm:asm': 'ow2-asm',
365 'org.ow2.asm:asm-commons': 'ow2-asm-commons',
371 'com.squareup.okio:okio-jvm': 'okio-lib',
372 'com.google.guava:listenablefuture': 'guava-listenablefuture-prebuilt-jar',
373 'sqlite-jdbc': 'xerial-sqlite-jdbc',
374 'com.intellij:annotations': 'jetbrains-annotations',
375 'javax.annotation:javax.annotation-api': 'javax-annotation-api-prebuilt-host-jar',
376 'org.robolectric:robolectric': 'Robolectric_all-target',
377 'org.jetbrains.kotlin:kotlin-stdlib-common': 'kotlin-stdlib',
378 'org.jetbrains.kotlinx:kotlinx-coroutines-core': 'kotlinx_coroutines',
379 'org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm': 'kotlinx_coroutines_test',
380 'org.jetbrains.kotlinx:kotlinx-coroutines-guava': 'kotlinx_coroutines_guava',
381 'org.jetbrains.kotlinx:kotlinx-coroutines-android': 'kotlinx_coroutines_android',
382 'org.jetbrains.kotlinx:kotlinx-coroutines-test':'kotlinx_coroutines_test',
383 'org.jetbrains.kotlinx:kotlinx-coroutines-rx2': 'kotlinx_coroutines_rx2',
384 'org.jetbrains.kotlinx:kotlinx-metadata-jvm': 'kotlinx_metadata_jvm',
385 'androidx.test.espresso:espresso-core':'androidx.test.espresso.core',
386 'androidx.test.espresso:espresso-idling-resource':'androidx.test.espresso.idling-resource',
387 'androidx.datastore:datastore-core-jvm': 'androidx.datastore_datastore-core',
406 os.path.join('libs', 'noto-emoji-compat-java.jar')
409 # Explicitly allow-listed initializers
424 artifact_pattern = re.compile(r'^(.+?)-(\d+\.\d+\.\d+(?:-\w+\d+)?(?:-[\d.]+)*)\.(jar|aar)$')
428 """Returns the build system target name for a given library's Maven coordinate.
431 group_artifact: an unversioned Maven artifact coordinate, ex. androidx.core:core
436 if group_artifact.endswith("-" + kmp_suffix):
437 loc = group_artifact.rfind("-" + kmp_suffix)
448 """Returns the file system path for a given library's Maven coordinate.
451 group_artifact: an unversioned Maven artifact coordinate, ex. androidx.core:core
459 """Modifies the input mapping by expanding Maven coordinate keys into build target names and
463 mapping: a map where the keys are Maven coordinates
473 """Parses Maven libraries from the specified directories.
476 maven_repo_dirs: a list of maven repository roots
478 A map of Maven coordinate keys to MavenLibraryInfo objects parsed from POM files.
486 if file[-4:] == '.pom':
495 group_id = line[11:-11]
497 artifact_id = line[14:-14]
499 version = line[11:-11]
501 print_e('Failed to find Maven artifact data in ' + file)
505 artifact_file = file[:-4]
563 """Transforms a standard Maven repository to be compatible with the Android build system.
570 maven_repo_dirs: path to local Maven repository
574 include_static_deps: whether to pass --static-deps to pom2bp
575 include: list of Maven groupIds or unversioned artifact coordinates to include for
577 exclude: list of Maven groupIds or unversioned artifact coordinates to exclude from
658 args.extend(['-sdk-version', '31'])
659 args.extend(['-default-min-sdk-version', '24'])
661 args.extend(['-write-cmd=false'])
663 args.append('-static-deps')
665 args.append(f'-prepend={prepend}')
667 args.extend([f'-rewrite=^{name}$={maven_to_make[name]["name"]}' for name in rewrite_names])
668 args.extend([f'-rewrite=^{key}$={value}' for key, value in deps_rewrite.items()])
669 args.extend(["-extra-static-libs=" + maven_to_make[name]['name'] + "=" + ",".join(
670 sorted(maven_to_make[name]['extra-static-libs'])) for name in maven_to_make if
671 'extra-static-libs' in maven_to_make[name]])
672 args.extend(["-optional-uses-libs=" + maven_to_make[name]['name'] + "=" + ",".join(
673 sorted(maven_to_make[name]['optional-uses-libs'])) for name in maven_to_make if
674 'optional-uses-libs' in maven_to_make[name]])
675 args.extend([f'-host={name}' for name in maven_to_make
677 args.extend([f'-host-and-device={name}' for name in maven_to_make
755 # Remove top-level cruft.
766 (https://developer.android.com/studio/build/dependencies#gmaven-access)
795 # This is a common situation - os.makedirs fails if dir already exists.
806 def check_startup_initializers(manifest_path: Path) -> Optional[str]:
841 def _attribute_name(namespace: str, attribute: str) -> str:
848 def _check_node(node: ET.Element) -> bool:
856 metadata_nodes = child.findall('meta-data', namespaces=android_manifest_namepaces)
865 def _needs_disable_initialization(metadata_nodes: Iterable[ET.Element]) -> bool:
894 local_file: Optional local top-of-tree ZIP, must be specified if build_id is empty
895 include: List of Maven groupIds or unversioned artifact coordinates to include for
897 exclude: List of Maven groupIds or unversioned artifact coordinates to exclude from
899 beyond_corp: Whether to use BeyondCorp-compatible artifact fetcher
904 repo_file = 'top-of-tree-m2repository-all-%s.zip' % build_id.fs_id
914 # Transform the repo archive into a Makefile-compatible format.
929 # Ignore any output or error - these files are not gauranteed to exist, but
944 beyond_corp: Whether to use BeyondCorp-compatible artifact fetcher
948 repo_file = 'jetifier-standalone.zip'
955 mv(os.path.join(repo_dir, 'jetifier-standalone'), jetifier_dir)
956 os.chmod(os.path.join(jetifier_dir, 'bin', 'jetifier-standalone'), 0o755)
965 local_file: local Maven repository ZIP containing library artifacts
973 return transform_maven_repos([repo_dir], os.path.join(extras_dir, 'constraint-layout-x'),
982 local_file: local Maven repository ZIP containing library artifacts
990 return transform_maven_repos([design_dir], os.path.join(extras_dir, 'material-design-x'),
1031 api_scope_list = ['public', 'system', 'test', 'module-lib', 'system-server']
1043 if api_scope == 'public' or api_scope == 'module-lib':
1044 # Distinct core-for-system-modules.jar files are only provided
1045 # for the public and module-lib API surfaces.
1047 'system-modules/' + api_scope + '/core-for-system-modules.jar'] = os.path.join(
1056 artifact = 'android-sdk*.zip'
1058 artifact = f'sdk-repo-linux-platforms-{build_id.fs_id}.zip'
1081 for api_scope in ['public', 'system', 'module-lib', 'system-server']:
1082 data_folder = 'data' if api_scope == 'public' else api_scope + '-data'
1083 lint_database_artifacts[os.path.join(data_folder, 'api-versions.xml')] = os.path.join(sdk_dir, api_scope, 'data', 'api-versions.xml')
1106 for api_scope in ['public', 'system', 'test', 'module-lib', 'system-server']:
1123 f'sdk-repo-{arch}-build-tools-{build_id.fs_id}.zip',
1138 'bin/lib64/libwinpthread-1.dll',
1148 # Move all top-level files to /bin and make them executable
1149 bin_path = os.path.join(dst_path, 'bin')
1157 # Make the files under lld-bin executable
1158 lld_bin_files = os.listdir(os.path.join(dst_path, 'lld-bin'))
1160 os.chmod(os.path.join(dst_path, 'lld-bin', file), 0o755)
1171 diff_command = f'cd {git_dir} && git diff --quiet'
1173 subprocess.check_call(f'{diff_command} --cached', shell=True)
1182 if not re.match(r'[1-9][0-9]*\.(0|[1-9][0-9]*)', s):
1192 help='Build server build ID or local Maven ZIP file')
1194 '-m', '--material', action='store_true',
1197 '-c', '--constraint', action='store_true',
1200 '-j', '--jetifier', action='store_true',
1203 '-p', '--platform', action='store_true',
1206 '-f', '--finalize_sdk', type=check_string_major_minor_format,
1207 help='Finalize the build as the specified SDK version. Must be used together with -e')
1209 '-e', '--finalize_extension', type=int,
1210 help='Finalize the build as the specified extension SDK version. Must be used together with -f')
1211 parser.add_argument('--bug', type=int, help='The bug number to add to the commit message.')
1213 '--sdk_target',
1215 help='If specified, the name of the build target from which to retrieve the SDK when -p or -f '
1218 '-b', '--buildtools', action='store_true',
1221 '-x', '--androidx', action='store_true',
1225 '--include', action='append', default=[],
1226 help='If specified with -x, includes the specified Jetpack library Maven group or artifact for '
1229 '--exclude', action='append', default=[],
1230 help='If specified with -x, excludes the specified Jetpack library Maven group or artifact '
1233 '-g', '--gmaven', action='store_true',
1237 '--commit-first', action='store_true',
1240 '--beyond-corp', action='store_true',
1243 '--local_mode', action="store_true",
1253 parser.error('You must specify a build ID or local Maven ZIP file')
1264 parser.error('Either both or neither of -e and -f must be specified.')
1267 parser.error('Specifying a bug ID with --bug is required when finalizing an SDK.')
1270 # Validate the build environment for POM-dependent targets.
1292 subprocess.check_call(f'cd {git_dir} && git add -u', shell=True)
1293 subprocess.check_call(f'cd {git_dir} && git commit -m \'save working state\'',
1298 f'continuing, because {self_file} will run "git reset --hard" if execution fails')
1364 branch_name = 'finalize-%d' % args.finalize_extension
1370 subprocess.check_call(['git', 'commit', '-m', msg])
1380 local_mode='--local_mode' if args.local_mode else '')
1383 if update_buildtools('sdk-sdk_mac', 'darwin', build_id, args.beyond_corp) \
1404 src_msg = 'local Maven ZIP'
1410 subprocess.check_call(['git', 'commit', '-q', '-m', msg])
1414 subprocess.check_call(['git', 'log', '-3', '--oneline'])
1417 subprocess.check_call(['git', 'log', '-1', '--oneline'])
1430 subprocess.check_call(['git', 'add', '-Af', '.'], stdout=bitbucket)
1432 ['git', 'commit', '-m', 'COMMIT TO REVERT - RESET ME!!!', '--allow-empty'],
1434 subprocess.check_call(['git', 'reset', '--hard', 'HEAD~1'], stdout=bitbucket)