blob: b9f34308b07aa0ca842fe33588c8cbea41f241f0 [file] [log] [blame]
load("//tools/base/bazel:bazel.bzl", "iml_module")
load("//tools/base/bazel:maven.bzl", "maven_java_library", "maven_pom")
load("//tools/base/bazel:kotlin.bzl", "kotlin_library", "kotlin_test")
load("//tools/base/bazel:proto.bzl", "android_java_proto_library", "java_proto_library")
# managed by go/iml_to_build
iml_module(
name = "studio.android.sdktools.ddmlib",
srcs = ["src/main/java"],
iml_files = ["android.sdktools.ddmlib.iml"],
test_data = ["//prebuilts/studio/sdk:platform-tools"],
test_resources = ["src/test/resources"],
test_srcs = ["src/test/java"],
visibility = ["//visibility:public"],
# do not sort: must match IML order
exports = [
"//tools/base/common:studio.android.sdktools.common",
"//tools/idea/.idea/libraries:kxml2",
],
# do not sort: must match IML order
deps = [
"//tools/base/common:studio.android.sdktools.common[module]",
"//tools/idea/.idea/libraries:kxml2",
"//tools/idea/.idea/libraries:easymock[test]",
"//tools/idea/.idea/libraries:Objenesis[test]",
"//tools/idea/.idea/libraries:JUnit4[test]",
"//tools/base/testutils:studio.android.sdktools.testutils[module, test]",
"//tools/idea/.idea/libraries:mockito[test]",
"//tools/idea/.idea/libraries:truth[test]",
"//tools/base/fakeadbserver:studio.android.sdktools.fakeadbserver[module, test]",
"//tools/idea/.idea/libraries:kotlin-stdlib-jdk8",
"//tools/idea/.idea/libraries:protobuf",
"//tools/idea/.idea/libraries:libam-instrumentation-data-proto",
],
)
# Kotlin is not enabled in ddmlib module but here we use kotlin_library rule
# for bundled_deps support.
kotlin_library(
name = "tools.ddmlib",
srcs = glob([
"src/main/java/**/*.kt",
"src/main/java/**/*.java",
]),
bundled_deps = [
":am-instrumentation-data-proto",
],
pom = ":pom",
resource_strip_prefix = "tools/base/ddmlib",
visibility = ["//visibility:public"],
deps = [
"//tools/base/annotations",
"//tools/base/common:tools.common",
"//tools/base/third_party:com.google.guava_guava",
"//tools/base/third_party:com.google.protobuf_protobuf-java",
"//tools/base/third_party:net.sf.kxml_kxml2",
],
)
maven_pom(
name = "pom",
artifact = "ddmlib",
group = "com.android.tools.ddms",
source = "//tools/buildSrc/base:base_version",
)
kotlin_test(
name = "tools.tests",
srcs = glob([
"src/test/java/**/*.kt",
"src/test/java/**/*.java",
]),
data = ["//prebuilts/studio/sdk:platform-tools"],
jvm_flags = ["-Dtest.suite.jar=tools.tests.jar"],
resources = glob(["src/test/resources/**"]),
test_class = "com.android.testutils.JarTestSuite",
deps = [
":tools.ddmlib",
"//tools/base/annotations",
"//tools/base/common:tools.common",
"//tools/base/fakeadbserver:tools.fakeadbserver",
"//tools/base/testutils:tools.testutils",
"//tools/base/third_party:com.google.guava_guava",
"//tools/base/third_party:com.google.protobuf_protobuf-java",
"//tools/base/third_party:com.google.truth_truth",
"//tools/base/third_party:junit_junit",
"//tools/base/third_party:org.easymock_easymock",
"//tools/base/third_party:org.mockito_mockito-core",
],
)
java_proto_library(
name = "am-instrumentation-data-proto",
srcs = glob(["src/main/proto/**/*.proto"]),
protoc_version = "3.4.0",
visibility = ["//visibility:public"],
)