| package(default_visibility = ["//visibility:public"]) |
| |
| load("//tools/adt/idea/studio:studio.bzl", "studio_data") |
| |
| filegroup( |
| name = "jdk", |
| srcs = ["BUILD"] + select({ |
| "//tools/base/bazel:darwin": glob(["mac/**"]), |
| "//tools/base/bazel:windows": glob(["win64/**"]), |
| "//conditions:default": glob(["linux/**"]), |
| }), |
| ) |
| |
| studio_data( |
| name = "jdk-bundle", |
| files_linux = glob(["jdk11-runtime/linux/**"]), |
| files_mac = glob(["jdk11-runtime/mac/**"]), |
| # For directory symbolic links to be preserved, files must be listed explicitly. |
| # Otherwise, glob(["/**"]) will traverse the directory symlink. |
| files_mac_arm = [ |
| "jdk11-runtime/mac-arm64/Contents/Info.plist", |
| "jdk11-runtime/mac-arm64/Contents/Home/release", |
| "jdk11-runtime/mac-arm64/Contents/Home/Frameworks/JavaNativeFoundation.framework/Headers", |
| "jdk11-runtime/mac-arm64/Contents/Home/Frameworks/JavaNativeFoundation.framework/Modules", |
| "jdk11-runtime/mac-arm64/Contents/Home/Frameworks/JavaNativeFoundation.framework/Resources", |
| "jdk11-runtime/mac-arm64/Contents/Home/Frameworks/JavaNativeFoundation.framework/JavaNativeFoundation", |
| "jdk11-runtime/mac-arm64/Contents/Home/Frameworks/JavaNativeFoundation.framework/JavaNativeFoundation.tbd", |
| "jdk11-runtime/mac-arm64/Contents/Home/Frameworks/JavaNativeFoundation.framework/Versions/Current", |
| ] + glob( |
| [ |
| "jdk11-runtime/mac-arm64/Contents/MacOS/*", |
| "jdk11-runtime/mac-arm64/Contents/Home/bin/*", |
| "jdk11-runtime/mac-arm64/Contents/Home/conf/**", |
| "jdk11-runtime/mac-arm64/Contents/Home/include/**", |
| "jdk11-runtime/mac-arm64/Contents/Home/jmods/**", |
| "jdk11-runtime/mac-arm64/Contents/Home/legal/**", |
| "jdk11-runtime/mac-arm64/Contents/Home/lib/**", |
| "jdk11-runtime/mac-arm64/Contents/Home/Frameworks/JavaNativeFoundation.framework/Versions/A/**", |
| ], |
| ), |
| files_win = glob(["jdk11-runtime/win/**"]), |
| mappings = { |
| "prebuilts/studio/jdk/jdk11-runtime/linux/": "", |
| "prebuilts/studio/jdk/jdk11-runtime/mac/": "", |
| "prebuilts/studio/jdk/jdk11-runtime/mac-arm64/": "", |
| "prebuilts/studio/jdk/jdk11-runtime/win/": "", |
| }, |
| visibility = ["//visibility:public"], |
| ) |
| |
| filegroup( |
| name = "jdk11", |
| srcs = ["BUILD"] + select({ |
| "//tools/base/bazel:darwin": glob(["jdk11/mac/**"]), |
| "//tools/base/bazel:windows": glob(["jdk11/win/**"]), |
| "//conditions:default": glob(["jdk11/linux/**"]), |
| }), |
| ) |
| |
| filegroup( |
| name = "jdk_all", |
| srcs = glob( |
| include = ["**"], |
| exclude = [".git/**"], |
| ), |
| ) |
| |
| filegroup( |
| name = "langtools", |
| srcs = select({ |
| "//tools/base/bazel:darwin": [ |
| "mac/Contents/Home/jre/lib/jce.jar", |
| "mac/Contents/Home/lib/tools.jar", |
| ], |
| "//tools/base/bazel:windows": [ |
| "win64/jre/lib/jce.jar", |
| "win64/lib/tools.jar", |
| ], |
| "//conditions:default": [ |
| "linux/jre/lib/jce.jar", |
| "linux/lib/tools.jar", |
| ], |
| }), |
| ) |
| |
| filegroup( |
| name = "bootclasspath", |
| srcs = select({ |
| "//tools/base/bazel:darwin": glob([ |
| "mac/Contents/Home/jre/lib/*.jar", |
| "mac/Contents/Home/jre/lib/ext/*.jar", |
| ]), |
| "//tools/base/bazel:windows": glob([ |
| "win32/jre/lib/*.jar", |
| "win32/jre/lib/ext/*.jar", |
| ]), |
| "//conditions:default": glob([ |
| "linux/jre/lib/*.jar", |
| "linux/jre/lib/ext/*.jar", |
| ]), |
| }), |
| ) |
| |
| cc_library( |
| name = "jni_headers", |
| srcs = [], |
| hdrs = select({ |
| "//tools/base/bazel:darwin": glob(["mac/Contents/Home/include/**/*.h"]), |
| "//tools/base/bazel:windows": glob(["win64/include/**/*.h"]), |
| "//tools/base/bazel:android_cpu_x86": [], |
| "//tools/base/bazel:android_cpu_x86_64": [], |
| "//tools/base/bazel:android_cpu_arm": [], |
| "//tools/base/bazel:android_cpu_arm_64": [], |
| "//conditions:default": glob(["linux/include/**/*.h"]), |
| }), |
| includes = select({ |
| "//tools/base/bazel:darwin": [ |
| "mac/Contents/Home/include", |
| "mac/Contents/Home/include/darwin", |
| ], |
| "//tools/base/bazel:windows": [ |
| "win64/include", |
| "win64/include/win32", |
| "win64/include/win32/bridge", |
| ], |
| "//tools/base/bazel:android_cpu_x86": [], |
| "//tools/base/bazel:android_cpu_x86_64": [], |
| "//tools/base/bazel:android_cpu_arm": [], |
| "//tools/base/bazel:android_cpu_arm_64": [], |
| "//conditions:default": [ |
| "linux/include", |
| "linux/include/linux", |
| ], |
| }), |
| deps = select({ |
| "//tools/base/bazel:android_cpu_x86": ["//tools/vendor/google/android-ndk:jvmti"], |
| "//tools/base/bazel:android_cpu_x86_64": ["//tools/vendor/google/android-ndk:jvmti"], |
| "//tools/base/bazel:android_cpu_arm": ["//tools/vendor/google/android-ndk:jvmti"], |
| "//tools/base/bazel:android_cpu_arm_64": ["//tools/vendor/google/android-ndk:jvmti"], |
| "//conditions:default": [], |
| }), |
| ) |
| |
| java_runtime( |
| name = "jdk_runtime", |
| srcs = select({ |
| "//tools/base/bazel:darwin": glob(["mac/**"]), |
| "//tools/base/bazel:windows": glob(["win64/**"]), |
| "//conditions:default": glob(["linux/**"]), |
| }), |
| java_home = select({ |
| "//tools/base/bazel:darwin": "mac/Contents/Home", |
| "//tools/base/bazel:windows": "win64", |
| "//conditions:default": "linux", |
| }), |
| ) |
| |
| java_runtime( |
| name = "jdk11_runtime", |
| srcs = select({ |
| "//tools/base/bazel:darwin": glob(["jdk11/mac/**"]), |
| "//tools/base/bazel:windows": glob(["jdk11/win/**"]), |
| "//conditions:default": glob(["jdk11/linux/**"]), |
| }), |
| java_home = select({ |
| "//tools/base/bazel:darwin": "jdk11/mac/Contents/Home", |
| "//tools/base/bazel:windows": "jdk11/win", |
| "//conditions:default": "jdk11/linux", |
| }), |
| ) |
| |
| filegroup( |
| name = "jdk11_runtime_linux_files", |
| srcs = glob(["jdk11/linux/**"]), |
| visibility = ["//visibility:public"], |
| ) |
| |
| # managed by go/iml_to_build |
| java_import( |
| name = "linux/jre/lib/rt", |
| jars = ["linux/jre/lib/rt.jar"], |
| visibility = ["//tools/idea/plugins/xslt-debugger:__subpackages__"], |
| ) |
| |
| filegroup( |
| name = "mock-jdk17", |
| srcs = [ |
| "mock-jdk17/jre/lib/annotations.jar", |
| "mock-jdk17/jre/lib/rt.jar", |
| "mock-jdk17/src.zip", |
| ], |
| visibility = ["//visibility:public"], |
| ) |