Merge "Convert Settings to Android.bp"
This commit is contained in:
48
Android.bp
Normal file
48
Android.bp
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
java_library {
|
||||||
|
name: "settings-logtags",
|
||||||
|
|
||||||
|
srcs: ["src/**/*.logtags"],
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build the Settings APK
|
||||||
|
android_app {
|
||||||
|
name: "Settings",
|
||||||
|
defaults: ["SettingsLibDefaults"],
|
||||||
|
platform_apis: true,
|
||||||
|
certificate: "platform",
|
||||||
|
product_specific: true,
|
||||||
|
privileged: true,
|
||||||
|
required: ["privapp_whitelist_com.android.settings"],
|
||||||
|
|
||||||
|
srcs: ["src/**/*.java"],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"androidx.slice_slice-builders",
|
||||||
|
"androidx.slice_slice-core",
|
||||||
|
"androidx.slice_slice-view",
|
||||||
|
"androidx.core_core",
|
||||||
|
"androidx.legacy_legacy-support-v4",
|
||||||
|
"androidx.legacy_legacy-support-v13",
|
||||||
|
"androidx.appcompat_appcompat",
|
||||||
|
"androidx.cardview_cardview",
|
||||||
|
"androidx.preference_preference",
|
||||||
|
"androidx.recyclerview_recyclerview",
|
||||||
|
"androidx.legacy_legacy-preference-v14",
|
||||||
|
"androidx.lifecycle_lifecycle-runtime",
|
||||||
|
"androidx.lifecycle_lifecycle-extensions",
|
||||||
|
"guava",
|
||||||
|
"jsr305",
|
||||||
|
"settings-logtags",
|
||||||
|
"setup-wizard-lib-gingerbread-compat",
|
||||||
|
],
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"telephony-common",
|
||||||
|
"ims-common",
|
||||||
|
],
|
||||||
|
|
||||||
|
optimize: {
|
||||||
|
proguard_flags_files: ["proguard.flags"],
|
||||||
|
},
|
||||||
|
}
|
65
Android.mk
65
Android.mk
@@ -1,65 +0,0 @@
|
|||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(call all-logtags-files-under, src)
|
|
||||||
|
|
||||||
LOCAL_MODULE := settings-logtags
|
|
||||||
|
|
||||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
||||||
|
|
||||||
# Build the Settings APK
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := Settings
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
LOCAL_PRODUCT_MODULE := true
|
|
||||||
LOCAL_PRIVILEGED_MODULE := true
|
|
||||||
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.settings
|
|
||||||
LOCAL_MODULE_TAGS := optional
|
|
||||||
LOCAL_USE_AAPT2 := true
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
||||||
|
|
||||||
LOCAL_STATIC_ANDROID_LIBRARIES := \
|
|
||||||
androidx.slice_slice-builders \
|
|
||||||
androidx.slice_slice-core \
|
|
||||||
androidx.slice_slice-view \
|
|
||||||
androidx.core_core \
|
|
||||||
androidx.legacy_legacy-support-v4 \
|
|
||||||
androidx.legacy_legacy-support-v13 \
|
|
||||||
androidx.appcompat_appcompat \
|
|
||||||
androidx.cardview_cardview \
|
|
||||||
androidx.preference_preference \
|
|
||||||
androidx.recyclerview_recyclerview \
|
|
||||||
androidx.legacy_legacy-preference-v14 \
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
telephony-common \
|
|
||||||
ims-common
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
androidx.lifecycle_lifecycle-runtime \
|
|
||||||
androidx.lifecycle_lifecycle-extensions \
|
|
||||||
guava \
|
|
||||||
jsr305 \
|
|
||||||
settings-logtags \
|
|
||||||
|
|
||||||
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
|
|
||||||
|
|
||||||
ifneq ($(INCREMENTAL_BUILDS),)
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
LOCAL_JACK_ENABLED := incremental
|
|
||||||
LOCAL_JACK_FLAGS := --multi-dex native
|
|
||||||
endif
|
|
||||||
|
|
||||||
include frameworks/opt/setupwizard/library/common-gingerbread.mk
|
|
||||||
include frameworks/base/packages/SettingsLib/common.mk
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
|
|
||||||
# Use the following include to make our test apk.
|
|
||||||
ifeq (,$(ONE_SHOT_MAKEFILE))
|
|
||||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
|
||||||
endif
|
|
@@ -1,5 +0,0 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# Include all makefiles in subdirectories
|
|
||||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
|
24
tests/anomaly-tester/Android.bp
Normal file
24
tests/anomaly-tester/Android.bp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
android_test {
|
||||||
|
name: "AnomalyTester",
|
||||||
|
|
||||||
|
certificate: "platform",
|
||||||
|
|
||||||
|
libs: ["android.test.runner"],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"android-support-test",
|
||||||
|
"mockito-target",
|
||||||
|
"ub-uiautomator",
|
||||||
|
"truth-prebuilt",
|
||||||
|
],
|
||||||
|
|
||||||
|
srcs: ["**/*.java"],
|
||||||
|
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
|
||||||
|
instrumentation_for: "Settings",
|
||||||
|
}
|
@@ -1,26 +0,0 @@
|
|||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := android.test.runner
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
android-support-test \
|
|
||||||
mockito-target \
|
|
||||||
ub-uiautomator \
|
|
||||||
truth-prebuilt \
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
|
||||||
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := AnomalyTester
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
|
|
||||||
LOCAL_INSTRUMENTATION_FOR := Settings
|
|
||||||
|
|
||||||
LOCAL_USE_AAPT2 := true
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
24
tests/robotests/Android.bp
Normal file
24
tests/robotests/Android.bp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
//############################################
|
||||||
|
// Settings Robolectric test target. #
|
||||||
|
//############################################
|
||||||
|
|
||||||
|
android_robolectric_test {
|
||||||
|
name: "SettingsRoboTests",
|
||||||
|
|
||||||
|
srcs: ["src/**/*.java"],
|
||||||
|
|
||||||
|
java_resource_dirs: ["config"],
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"robolectric_android-all-stub",
|
||||||
|
"Robolectric_all-target",
|
||||||
|
"mockito-robolectric-prebuilt",
|
||||||
|
"truth-prebuilt",
|
||||||
|
],
|
||||||
|
|
||||||
|
instrumentation_for: "Settings",
|
||||||
|
|
||||||
|
test_options: {
|
||||||
|
timeout: "36000",
|
||||||
|
},
|
||||||
|
}
|
@@ -1,45 +0,0 @@
|
|||||||
#############################################
|
|
||||||
# Settings Robolectric test target. #
|
|
||||||
#############################################
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE := SettingsRoboTests
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
||||||
|
|
||||||
LOCAL_JAVA_RESOURCE_DIRS := config
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
robolectric_android-all-stub \
|
|
||||||
Robolectric_all-target \
|
|
||||||
mockito-robolectric-prebuilt \
|
|
||||||
truth-prebuilt
|
|
||||||
|
|
||||||
LOCAL_INSTRUMENTATION_FOR := Settings
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := optional
|
|
||||||
|
|
||||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
||||||
|
|
||||||
#############################################################
|
|
||||||
# Settings runner target to run the previous target. #
|
|
||||||
#############################################################
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE := RunSettingsRoboTests
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
SettingsRoboTests \
|
|
||||||
robolectric_android-all-stub \
|
|
||||||
Robolectric_all-target \
|
|
||||||
mockito-robolectric-prebuilt \
|
|
||||||
truth-prebuilt
|
|
||||||
|
|
||||||
LOCAL_TEST_PACKAGE := Settings
|
|
||||||
|
|
||||||
LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src
|
|
||||||
|
|
||||||
LOCAL_ROBOTEST_TIMEOUT := 36000
|
|
||||||
|
|
||||||
include external/robolectric-shadows/run_robotests.mk
|
|
41
tests/uitests/Android.bp
Normal file
41
tests/uitests/Android.bp
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// Copyright (C) 2018 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.
|
||||||
|
|
||||||
|
android_test {
|
||||||
|
name: "SettingsUITests",
|
||||||
|
platform_apis: true,
|
||||||
|
certificate: "platform",
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
srcs: ["src/**/*.java"],
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"android.test.runner",
|
||||||
|
"android.test.base",
|
||||||
|
],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"android-support-test",
|
||||||
|
"app-helpers-core",
|
||||||
|
"launcher-helper-lib",
|
||||||
|
"metrics-helper-lib",
|
||||||
|
"platform-test-annotations",
|
||||||
|
"settings-helper",
|
||||||
|
"sysui-helper",
|
||||||
|
"timeresult-helper-lib",
|
||||||
|
"truth-prebuilt",
|
||||||
|
"ub-uiautomator",
|
||||||
|
],
|
||||||
|
|
||||||
|
//sdk_version: "current",
|
||||||
|
}
|
@@ -1,43 +0,0 @@
|
|||||||
# Copyright (C) 2018 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.
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := SettingsUITests
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
android.test.runner \
|
|
||||||
android.test.base
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
android-support-test \
|
|
||||||
app-helpers-core \
|
|
||||||
launcher-helper-lib \
|
|
||||||
metrics-helper-lib \
|
|
||||||
platform-test-annotations \
|
|
||||||
settings-helper \
|
|
||||||
sysui-helper \
|
|
||||||
timeresult-helper-lib \
|
|
||||||
truth-prebuilt \
|
|
||||||
ub-uiautomator \
|
|
||||||
|
|
||||||
#LOCAL_SDK_VERSION := current
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
33
tests/unit/Android.bp
Normal file
33
tests/unit/Android.bp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
android_test {
|
||||||
|
name: "SettingsUnitTests",
|
||||||
|
|
||||||
|
// We only want this apk build for tests.
|
||||||
|
certificate: "platform",
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"android.test.runner",
|
||||||
|
"telephony-common",
|
||||||
|
"ims-common",
|
||||||
|
"android.test.base",
|
||||||
|
"android.test.mock",
|
||||||
|
],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"android-support-test",
|
||||||
|
"espresso-core",
|
||||||
|
"espresso-contrib-nodep",
|
||||||
|
"espresso-intents-nodep",
|
||||||
|
"mockito-target-minus-junit4",
|
||||||
|
"platform-test-annotations",
|
||||||
|
"truth-prebuilt",
|
||||||
|
"ub-uiautomator",
|
||||||
|
],
|
||||||
|
|
||||||
|
// Include all test java files.
|
||||||
|
srcs: ["src/**/*.java"],
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
instrumentation_for: "Settings",
|
||||||
|
}
|
@@ -1,35 +0,0 @@
|
|||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# We only want this apk build for tests.
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
android.test.runner \
|
|
||||||
telephony-common \
|
|
||||||
ims-common \
|
|
||||||
android.test.base \
|
|
||||||
android.test.mock \
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
android-support-test \
|
|
||||||
espresso-core \
|
|
||||||
espresso-contrib-nodep \
|
|
||||||
espresso-intents-nodep \
|
|
||||||
mockito-target-minus-junit4 \
|
|
||||||
platform-test-annotations \
|
|
||||||
truth-prebuilt \
|
|
||||||
ub-uiautomator
|
|
||||||
|
|
||||||
# Include all test java files.
|
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := SettingsUnitTests
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_INSTRUMENTATION_FOR := Settings
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
Reference in New Issue
Block a user