2017-12-07 13:11:06 -08:00
|
|
|
//
|
|
|
|
// Copyright (C) 2008 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
// Build the android.test.runner library
|
|
|
|
// =====================================
|
2021-02-12 17:07:05 -08:00
|
|
|
package {
|
|
|
|
// See: http://go/android-license-faq
|
2022-01-10 21:16:59 -08:00
|
|
|
default_applicable_licenses: ["frameworks_base_test-runner_license"],
|
|
|
|
}
|
|
|
|
|
|
|
|
license {
|
|
|
|
name: "frameworks_base_test-runner_license",
|
|
|
|
visibility: [":__subpackages__"],
|
|
|
|
license_kinds: [
|
|
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
|
|
"SPDX-license-identifier-CPL-1.0",
|
|
|
|
],
|
|
|
|
license_text: [
|
|
|
|
"src/junit/cpl-v10.html",
|
|
|
|
],
|
2021-02-12 17:07:05 -08:00
|
|
|
}
|
|
|
|
|
2018-07-31 16:54:41 +09:00
|
|
|
java_sdk_library {
|
2017-12-07 13:11:06 -08:00
|
|
|
name: "android.test.runner",
|
|
|
|
|
2021-05-10 12:40:05 +01:00
|
|
|
srcs: [":android-test-runner-sources"],
|
2017-12-07 13:11:06 -08:00
|
|
|
|
2018-02-16 13:11:05 +00:00
|
|
|
errorprone: {
|
2018-02-22 12:16:31 +00:00
|
|
|
javacflags: ["-Xep:DepAnn:ERROR"],
|
2018-02-16 13:11:05 +00:00
|
|
|
},
|
|
|
|
|
2017-12-07 13:11:06 -08:00
|
|
|
libs: [
|
2017-11-16 15:53:09 +00:00
|
|
|
"android.test.base",
|
2018-07-31 16:54:41 +09:00
|
|
|
"android.test.mock",
|
|
|
|
],
|
|
|
|
stub_only_libs: [
|
|
|
|
"android.test.base",
|
|
|
|
"android.test.mock",
|
2017-12-07 13:11:06 -08:00
|
|
|
],
|
2018-07-31 16:54:41 +09:00
|
|
|
api_packages: [
|
|
|
|
"android.test",
|
|
|
|
"android.test.suitebuilder",
|
|
|
|
"junit.runner",
|
|
|
|
"junit.textui",
|
|
|
|
],
|
|
|
|
|
2019-05-30 15:12:47 +01:00
|
|
|
compile_dex: true,
|
2020-05-29 10:51:18 +09:00
|
|
|
default_to_stubs: true,
|
2021-05-10 10:38:53 -07:00
|
|
|
dist_group: "android",
|
2017-12-07 13:11:06 -08:00
|
|
|
}
|
|
|
|
|
2018-01-12 16:08:35 +00:00
|
|
|
// Build the android.test.runner-minus-junit library
|
|
|
|
// =================================================
|
2019-02-25 19:18:37 +00:00
|
|
|
// This is only intended for inclusion in the android.test.legacy static
|
2018-02-14 10:36:16 +00:00
|
|
|
// library and must not be used elsewhere.
|
2018-01-12 16:08:35 +00:00
|
|
|
java_library {
|
|
|
|
name: "android.test.runner-minus-junit",
|
|
|
|
|
|
|
|
srcs: ["src/android/**/*.java"],
|
|
|
|
|
2018-02-22 14:16:35 +09:00
|
|
|
sdk_version: "current",
|
2018-01-12 16:08:35 +00:00
|
|
|
libs: [
|
2018-07-31 16:54:41 +09:00
|
|
|
"android.test.base_static",
|
|
|
|
"android.test.mock",
|
2018-01-12 16:08:35 +00:00
|
|
|
"junit",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-12-07 13:11:06 -08:00
|
|
|
// Build the repackaged.android.test.runner library
|
|
|
|
// ================================================
|
|
|
|
java_library_static {
|
|
|
|
name: "repackaged.android.test.runner",
|
|
|
|
|
2021-05-10 12:40:05 +01:00
|
|
|
srcs: [":android-test-runner-sources"],
|
2018-02-22 12:16:31 +00:00
|
|
|
exclude_srcs: [
|
|
|
|
"src/android/test/ActivityUnitTestCase.java",
|
|
|
|
"src/android/test/ApplicationTestCase.java",
|
|
|
|
"src/android/test/IsolatedContext.java",
|
|
|
|
"src/android/test/ProviderTestCase.java",
|
|
|
|
"src/android/test/ProviderTestCase2.java",
|
|
|
|
"src/android/test/RenamingDelegatingContext.java",
|
|
|
|
"src/android/test/ServiceTestCase.java",
|
|
|
|
],
|
|
|
|
|
2018-02-22 14:16:35 +09:00
|
|
|
sdk_version: "current",
|
2018-02-22 12:16:31 +00:00
|
|
|
libs: [
|
2018-07-31 16:54:41 +09:00
|
|
|
"android.test.base_static",
|
2018-02-22 12:16:31 +00:00
|
|
|
],
|
2017-12-07 13:11:06 -08:00
|
|
|
|
|
|
|
jarjar_rules: "jarjar-rules.txt",
|
2018-02-05 15:49:52 +00:00
|
|
|
// Pin java_version until jarjar is certified to support later versions. http://b/72703434
|
|
|
|
java_version: "1.8",
|
2017-12-07 13:11:06 -08:00
|
|
|
}
|
2018-04-26 14:55:41 -07:00
|
|
|
|
2019-05-30 15:12:47 +01:00
|
|
|
// Make the current.txt available for use by the cts/tests/signature tests.
|
|
|
|
// ========================================================================
|
|
|
|
filegroup {
|
|
|
|
name: "android-test-runner-current.txt",
|
|
|
|
visibility: [
|
|
|
|
"//cts/tests/signature/api",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"api/current.txt",
|
|
|
|
],
|
|
|
|
}
|
2021-05-10 12:40:05 +01:00
|
|
|
|
|
|
|
filegroup {
|
|
|
|
name: "android-test-runner-sources",
|
|
|
|
srcs: ["src/**/*.java"],
|
|
|
|
path: "src",
|
|
|
|
}
|