diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-02 23:51:42 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-02 23:51:42 +0000 |
commit | 00b50353897b3b5b390b9b3d9c9b90655a890ee3 (patch) | |
tree | 69ddb35137e1770d71de0522c20bd0ebd341775a | |
parent | 29423ac3612af5e61c51bd712707561466e4b5e7 (diff) | |
parent | 22b779eab4916ceb4d07b653a3ab1a71ae101a9c (diff) | |
download | robolectric-shadows-simpleperf-release.tar.gz |
Snap for 11400057 from 22b779eab4916ceb4d07b653a3ab1a71ae101a9c to simpleperf-releasesimpleperf-release
Change-Id: If9a3e88fd689089c9102fb99c3cffc158d40d216
-rw-r--r-- | Android.bp | 105 | ||||
-rw-r--r-- | shadows/androidx/fragment/Android.mk | 2 | ||||
-rw-r--r-- | soong/Android.bp | 32 | ||||
-rw-r--r-- | soong/robolectric.go | 101 |
4 files changed, 3 insertions, 237 deletions
diff --git a/Android.bp b/Android.bp index f314f50cd..76f78968e 100644 --- a/Android.bp +++ b/Android.bp @@ -46,71 +46,6 @@ license { // Empty library. Should be removed java_library { name: "robolectric_android-all-stub", - visibility: ["//visibility:public"], -} - -// build.prop file created by module type defined in soong/robolectric.go -robolectric_build_props { - name: "robolectric_build_props", -} - -java_genrule_host { - name: "robolectric_framework_res", - tools: ["zip2zip"], - srcs: [":framework-res"], - out: ["robolectric_framework_res.jar"], - cmd: "$(location zip2zip) " + - "-i $(location :framework-res) " + - "-o $(location robolectric_framework_res.jar) " + - "-x classes.dex " + - "-x META-INF/**/* " + - "-0 resources.arsc", -} - -java_device_for_host { - name: "robolectric_android-all-device-deps", - libs: [ - "conscrypt-for-host", - "core-icu4j-for-host", - "core-libart-for-host", - "ext", - "framework-all", - "icu4j-icudata-jarjar", - "icu4j-icutzdata-jarjar", - "ims-common", - "libphonenumber-platform", - "okhttp-for-host", - "services", - "services.accessibility", - "telephony-common", - "android.car", - "android.car.builtin", - ], -} - -java_library_host { - name: "robolectric-host-android_all", - static_libs: [ - "robolectric_android-all-device-deps", - "robolectric_tzdata", - "robolectric_framework_res", - ], - dist: { - targets: [ - "sdk", - "win_sdk", - ], - dest: "android-all-robolectric.jar", - }, - - java_resources: [ - // Copy the build.prop - ":robolectric_build_props", - ], - visibility: [ - ":__subpackages__", - "//prebuilts/misc/common/robolectric", - ], } //############################################# @@ -158,46 +93,10 @@ java_host_for_device { libs: ["Robolectric_all"], visibility: [ ":__subpackages__", - //java references - "//frameworks/opt/net/wifi/libs/WifiTrackerLib/tests:__pkg__", - "//prebuilts/sdk/current/androidx:__subpackages__", - "//prebuilts/sdk/current/aaos-libs:__pkg__", - "//packages/apps/TV/tests/common:__pkg__", - //robolectric tests - "//vendor:__subpackages__", - "//platform_testing/robolab/roboStandaloneProj/tests:__pkg__", - "//external/mobile-data-download/javatests:__pkg__", - "//frameworks/base/services/robotests:__pkg__", - "//frameworks/base/services/robotests/backup:__pkg__", + //settings test + "//packages/apps/TvSettings/Settings/tests/robotests:__pkg__", "//frameworks/base/packages/SettingsLib/tests/robotests:__pkg__", - "//frameworks/base/packages/SystemUI:__pkg__", - "//frameworks/opt/car/setupwizard/library/main/tests/robotests:__pkg__", - "//frameworks/opt/localepicker/tests:__pkg__", - "//frameworks/opt/wear/signaldetector/robotests:__pkg__", - "//frameworks/opt/wear/robotests:__pkg__", - "//packages/modules/Connectivity/nearby/tests/multidevices/clients/test_support/snippet_helper/tests:__pkg__", - "//packages/modules/Connectivity/nearby/tests/robotests:__pkg__", - "//packages/modules/DeviceLock/DeviceLockController/tests/robolectric:__pkg__", - "//packages/services/Car/tests/CarLibTests:__pkg__", - "//packages/services/Mms/tests/robotests:__pkg__", - "//packages/apps/QuickAccessWallet/tests/robolectric:__pkg__", - "//packages/apps/ManagedProvisioning/tests/robotests:__pkg__", - "//packages/apps/Car/libs/car-media-common/tests/robotests", - "//packages/apps/Car/libs/car-ui-lib", - "//packages/apps/Car/Notification/tests/robotests:__pkg__", - "//packages/apps/Car/Cluster/DirectRenderingCluster/tests/robotests:__pkg__", - "//packages/apps/Car/Settings/tests/robotests:__pkg__", - "//packages/apps/EmergencyInfo/tests/robolectric:__pkg__", - "//packages/apps/StorageManager/robotests:__pkg__", "//packages/apps/Settings/tests/robotests:__pkg__", - "//packages/apps/ThemePicker/tests/robotests:__pkg__", - "//packages/apps/WallpaperPicker2/tests/robotests:__pkg__", - "//packages/apps/TvSettings/Settings/tests/robotests:__pkg__", - "//packages/apps/KeyChain/robotests:__pkg__", - "//packages/apps/CertInstaller/robotests:__pkg__", - //tm-dev additions - "//frameworks/base/packages/BackupEncryption/test/robolectric-integration:__pkg__", - "//frameworks/base/packages/BackupEncryption/test/robolectric:__pkg__", ], } diff --git a/shadows/androidx/fragment/Android.mk b/shadows/androidx/fragment/Android.mk index 945d3acf5..98ece456f 100644 --- a/shadows/androidx/fragment/Android.mk +++ b/shadows/androidx/fragment/Android.mk @@ -14,7 +14,7 @@ LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/src/test/resources/res # This exists to coerce make into generating and compiling R.java. LOCAL_STATIC_JAVA_LIBRARIES := androidx.fragment_fragment -LOCAL_MIN_SDK_VERSION := 16 +LOCAL_MIN_SDK_VERSION := 19 LOCAL_SDK_VERSION := current diff --git a/soong/Android.bp b/soong/Android.bp deleted file mode 100644 index 954cf15b8..000000000 --- a/soong/Android.bp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2019 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. - -package { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "external_robolectric-shadows_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - default_applicable_licenses: ["external_robolectric-shadows_license"], -} - -bootstrap_go_package { - name: "soong-robolectric", - pkgPath: "android/soong/robolectric", - srcs: ["robolectric.go"], - pluginFor: ["soong_build"], - deps: [ - "soong-android", - ], -} diff --git a/soong/robolectric.go b/soong/robolectric.go deleted file mode 100644 index cadeb0fad..000000000 --- a/soong/robolectric.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2019 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. - -package robolectric - -import ( - "fmt" - "strings" - - "android/soong/android" -) - -var pctx = android.NewPackageContext("android/soong/robolectric") - -func init() { - pctx.Import("android/soong/android") - android.RegisterModuleType("robolectric_build_props", buildPropsFactory) -} - -type buildProps struct { - android.ModuleBase - output android.WritablePath -} - -var _ android.SourceFileProducer = (*buildProps)(nil) - -func (b *buildProps) Srcs() android.Paths { - return android.Paths{b.output} -} - -func (b *buildProps) GenerateAndroidBuildActions(ctx android.ModuleContext) { - - displayID := fmt.Sprintf("robolectric %s %s", - ctx.Config().PlatformVersionName(), - ctx.Config().BuildId()) - - lines := []string{ - "# build properties autogenerated by robolectric.go", - "", - "ro.build.id=" + ctx.Config().BuildId(), - "ro.build.display.id=" + displayID, - "ro.product.name=robolectric", - "ro.product.device=robolectric", - "ro.product.board=robolectric", - "ro.product.manufacturer=robolectric", - "ro.product.brand=robolectric", - "ro.product.model=robolectric", - "ro.hardware=robolectric", - "ro.build.version.security_patch=" + ctx.Config().PlatformSecurityPatch(), - "ro.build.version.sdk=" + ctx.Config().PlatformSdkVersion().String(), - "ro.build.version.release=" + ctx.Config().PlatformVersionName(), - "ro.build.version.preview_sdk=" + ctx.Config().PlatformPreviewSdkVersion(), - // We don't have the API fingerprint available, just use the preview SDK version. - "ro.build.version.preview_sdk_fingerprint=" + ctx.Config().PlatformPreviewSdkVersion(), - "ro.build.version.codename=" + ctx.Config().PlatformSdkCodename(), - "ro.build.version.all_codenames=" + strings.Join(ctx.Config().PlatformVersionActiveCodenames(), ","), - "ro.build.version.min_supported_target_sdk=" + ctx.Config().PlatformMinSupportedTargetSdkVersion(), - "ro.build.version.base_os=" + ctx.Config().PlatformBaseOS(), - "ro.build.tags=robolectric", - "ro.build.fingerprint=robolectric", - "ro.build.characteristics=robolectric", - "", - "# for backwards-compatibility reasons, set CPUs to unknown/ARM", - "ro.product.cpu.abi=unknown", - "ro.product.cpu.abi2=unknown", - "ro.product.cpu.abilist=armeabi-v7a", - "ro.product.cpu.abilist32=armeabi-v7a,armeabi", - "ro.product.cpu.abilist64=armeabi-v7a,armeabi", - "", - "# temp fix for robolectric freezing issue b/150011638", - "persist.debug.new_insets=0", - } - - b.output = android.PathForModuleGen(ctx, "build.prop") - - rule := android.NewRuleBuilder(pctx, ctx) - - rule.Command().Text("rm").Flag("-f").Output(b.output) - for _, l := range lines { - rule.Command().Text("echo").Text("'" + l + "'").Text(">>").Output(b.output) - } - - rule.Build("build_prop", "robolectric build.prop") -} - -func buildPropsFactory() android.Module { - module := &buildProps{} - android.InitAndroidModule(module) - return module -} |