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

Commit f5c42ea6 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Adding some build rules in Launcher3

Bug: 182502086
Test: Presubmit
Change-Id: Ib2c18f1e252b3382030293fd3b873e840320301a
Merged-In: Ib2c18f1e252b3382030293fd3b873e840320301a
parent 2b30076a
Loading
Loading
Loading
Loading
+54 −26
Original line number Diff line number Diff line
@@ -94,27 +94,35 @@ java_library {
    min_sdk_version: "28",
}

//
// Build rule for Launcher3 dependencies lib.
//
// Library with all the dependencies for building Launcher3
android_library {
    name: "Launcher3CommonDepsLib",
    name: "Launcher3ResLib",
    srcs: [ ],
    resource_dirs: ["res"],
    static_libs: [
        "LauncherPluginLib",
        "launcher_quickstep_log_protos_lite",
        "androidx-constraintlayout_constraintlayout",
        "androidx.recyclerview_recyclerview",
        "androidx.dynamicanimation_dynamicanimation",
        "androidx.fragment_fragment",
        "androidx.preference_preference",
        "androidx.slice_slice-view",
        "androidx.cardview_cardview",
        "iconloader_base",
        "LauncherPluginLib",
        "launcher_quickstep_log_protos_lite"
    ],
    srcs: [
        "src_build_config/**/*.java",
    ],
    resource_dirs: ["res"],
    optimize: {
        enabled: false,
    },
    manifest: "AndroidManifest-common.xml",
    sdk_version: "current",
    min_sdk_version: "26",
}

//
// Build rule for Launcher3 dependencies lib.
//
android_library {
    name: "Launcher3CommonDepsLib",
    srcs: ["src_build_config/**/*.java"],
    static_libs: ["Launcher3ResLib"],
    sdk_version: "current",
    min_sdk_version: "26",
    manifest: "AndroidManifest-common.xml",
@@ -164,22 +172,42 @@ android_app {
    ],
}

//
// Launcher Robolectric test target.
//
java_library {
    name: "Launcher3TestCommon",
    libs: [
        "Launcher3CommonDepsLib",
// Library with all the dependencies for building quickstep
android_library {
    name: "QuickstepResLib",
    srcs: [ ],
    resource_dirs: [
        "quickstep/res",
        "quickstep/overview_ui_overrides/res",
    ],
    static_libs: [
        "Launcher3ResLib",
        "SystemUISharedLib",
        "SystemUI-statsd",
    ],
    manifest: "quickstep/AndroidManifest.xml",
    min_sdk_version: "28",
}


// Source code used for test helpers
filegroup {
    name: "launcher-src-ext-tests",
    srcs: ["ext_tests/src/**/*.java"],
}

// Common source files used to build launcher
filegroup {
    name: "launcher-src-no-build-config",
    srcs: [
        "src/**/*.java",
        "src_shortcuts_overrides/**/*.java",
        "src_ui_overrides/**/*.java",
        "ext_tests/src/**/*.java",
        "tests/src_common/**/*.java",
        "quickstep/src/**/*.java",
    ],
    target_sdk_version: "29",
    sdk_version: "current",
    min_sdk_version: "26",
}

// Proguard files for Launcher3
filegroup {
    name: "launcher-proguard-rules",
    srcs: ["proguard.flags"],
}

SharedLibWrapper/build.gradle

deleted100644 → 0
+0 −17
Original line number Diff line number Diff line
apply plugin: 'java'

final String ANDROID_TOP = "${rootDir}/../../.."
final String FRAMEWORK_PREBUILTS_DIR = "${ANDROID_TOP}/prebuilts/framework_intermediates/"

sourceSets {
    main {
        java.srcDirs = ["${ANDROID_TOP}/frameworks/lib/systemui/SharedLibWrapper/src"]
    }
}

sourceCompatibility = 1.8

dependencies {
    implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar')
    compileOnly fileTree(dir: "$ANDROID_TOP/prebuilts/fullsdk-${org.gradle.internal.os.OperatingSystem.current().isMacOsX() ? "darwin" : "linux"}/platforms/${COMPILE_SDK}", include: 'android.jar')
}

quickstep/Android.bp

0 → 100644
+19 −0
Original line number Diff line number Diff line
// Copyright (C) 2021 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.

filegroup {
    name: "launcher3-quickstep-robolectric-src",
    path: "robolectric_tests",
    srcs: ["robolectric_tests/src/**/*.java"],
}
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import org.robolectric.util.ReflectionHelpers;

@RunWith(RobolectricTestRunner.class)
@LooperMode(Mode.PAUSED)
@org.junit.Ignore
public class RecentsActivityTest {

    @Test
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ package com.android.quickstep.util;

import static android.view.Display.DEFAULT_DISPLAY;

import static org.mockito.Mockito.mock;

import android.content.Context;
import android.graphics.Rect;
import android.graphics.RectF;
@@ -29,6 +31,7 @@ import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.shadows.LShadowDisplay;
import com.android.launcher3.util.DisplayController;
import com.android.quickstep.LauncherActivityInterface;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat.SurfaceParams;

import org.hamcrest.Description;
@@ -162,7 +165,7 @@ public class TaskViewSimulatorTest {
        @Override
        public SurfaceParams[] createSurfaceParams(BuilderProxy proxy) {
            SurfaceParams.Builder builder = new SurfaceParams.Builder((SurfaceControl) null);
            proxy.onBuildTargetParams(builder, null, this);
            proxy.onBuildTargetParams(builder, mock(RemoteAnimationTargetCompat.class), this);
            return new SurfaceParams[] {builder.build()};
        }

Loading