Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d5de045 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Move the Compose Gallery to our vendor repository (2/2)

Bug: 247473910
Test: Builds
Change-Id: I665f351cda86dc6588946b8449fbb1c13fcba503
parent 13590497
Loading
Loading
Loading
Loading
+0 −86
Original line number Diff line number Diff line
// Copyright (C) 2022 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 "frameworks_base_packages_SystemUI_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}

android_library {
    name: "SystemUIComposeGalleryLib",
    manifest: "AndroidManifest.xml",

    srcs: [
        "src/**/*.kt",
        ":SystemUI-tests-utils",
    ],

    resource_dirs: [
        "res",
    ],

    static_libs: [
        "SystemUI-core",
        "SystemUIComposeCore",
        "SystemUIComposeFeatures",

        "androidx.compose.runtime_runtime",
        "androidx.compose.material3_material3",
        "androidx.compose.material_material-icons-extended",
        "androidx.activity_activity-compose",
        "androidx.navigation_navigation-compose",

        "androidx.appcompat_appcompat",

        // TODO(b/240431193): Remove the dependencies and depend on
        // SystemUI-test-utils directly.
        "androidx.test.runner",
        "mockito-target-extended-minus-junit4",
        "testables",
        "truth-prebuilt",
        "androidx.test.uiautomator",
        "kotlinx_coroutines_test",
    ],

    libs: [
        "android.test.mock",
    ],

    kotlincflags: ["-Xjvm-default=all"],
}

android_app {
    name: "SystemUIComposeGallery",
    defaults: ["platform_app_defaults"],
    manifest: "app/AndroidManifest.xml",

    static_libs: [
        "SystemUIComposeGalleryLib",
    ],

    platform_apis: true,
    system_ext_specific: true,
    certificate: "platform",
    privileged: true,

    optimize: {
        proguard_flags_files: ["proguard-rules.pro"],
    },

    dxflags: ["--multi-dex"],
}
+0 −55
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2022 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.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.systemui.compose.gallery">
    <!-- To emulate a display size and density. -->
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />

    <application
        android:name="android.app.Application"
        android:appComponentFactory="androidx.core.app.AppComponentFactory"
        tools:replace="android:name,android:appComponentFactory">
        <!-- Disable providers from SystemUI -->
        <provider android:name="com.android.systemui.keyguard.KeyguardSliceProvider"
            android:authorities="com.android.systemui.test.keyguard.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="com.google.android.systemui.keyguard.KeyguardSliceProviderGoogle"
            android:authorities="com.android.systemui.test.keyguard.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="com.android.keyguard.clock.ClockOptionsProvider"
            android:authorities="com.android.systemui.test.keyguard.clock.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="com.android.systemui.people.PeopleProvider"
            android:authorities="com.android.systemui.test.people.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="androidx.core.content.FileProvider"
            android:authorities="com.android.systemui.test.fileprovider.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove"/>
    </application>
</manifest>
+0 −15
Original line number Diff line number Diff line
{
  "presubmit": [
    {
      "name": "SystemUIComposeGalleryTests",
      "options": [
        {
          "exclude-annotation": "org.junit.Ignore"
        },
        {
          "exclude-annotation": "androidx.test.filters.FlakyTest"
        }
      ]
    }
  ]
}
 No newline at end of file
+0 −39
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2022 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.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.systemui.compose.gallery.app">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.SystemUI.Gallery"
        tools:replace="android:icon,android:theme,android:label">
        <activity
            android:name="com.android.systemui.compose.gallery.GalleryActivity"
            android:exported="true"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
+0 −21
Original line number Diff line number Diff line
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
 No newline at end of file
Loading