summaryrefslogtreecommitdiff
path: root/photopicker/Android.bp
blob: a3d85d5c9f5b71a33c6d0aa4be83c4e4aca705f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package {
    // See: http://go/android-license-faq
    default_applicable_licenses: ["Android-Apache-2.0"],
}

android_library {
    name: "PhotopickerLib",
    manifest: "AndroidManifest.xml",
    srcs: [
        "src/**/*.kt",
        ":statslog-mediaprovider-java-gen",
    ],
    resource_dirs: ["res"],
    sdk_version: "module_current",
    min_sdk_version: "30",
    libs: [
        "framework-configinfrastructure.stubs.module_lib",
        "framework-connectivity.stubs.module_lib",
        "framework-media.stubs.module_lib",
        "framework-mediaprovider.impl",
        "framework-photopicker.impl",
        "framework-statsd.stubs.module_lib",
    ],
    javacflags: [
        "-Aroom.schemaLocation=packages/providers/MediaProvider/photopicker/schemas",
    ],
    kotlincflags: [
        "-Werror",
        "-Xjvm-default=all",
    ],
    static_libs: [
        "androidx.activity_activity-compose",
        "androidx.appcompat_appcompat",
        "androidx.compose.foundation_foundation",
        "androidx.compose.material3_material3",
        "androidx.compose.material3_material3-window-size-class",
        "androidx.compose.material_material-icons-extended",
        "androidx.compose.runtime_runtime",
        "androidx.compose.ui_ui",
        "androidx.core_core-ktx",
        "androidx.lifecycle_lifecycle-runtime-compose",
        "androidx.lifecycle_lifecycle-runtime-ktx",
        "androidx.hilt_hilt-navigation-compose",
        "androidx.navigation_navigation-compose",
        "androidx.navigation_navigation-runtime-ktx",
        "androidx.paging_paging-common",
        "androidx.paging_paging-common-ktx",
        "androidx.paging_paging-compose",
        "androidx.paging_paging-runtime",
        "androidx.room_room-runtime",
        "androidx.room_room-ktx",
        // glide and dependencies
        "androidx.exifinterface_exifinterface",
        "androidx.vectordrawable_vectordrawable-animated",
        "glide-prebuilt",
        "glide-ktx-prebuilt",
        "glide-integration-webpdecoder-prebuilt",
        "glide-gifdecoder-prebuilt",
        "glide-disklrucache-prebuilt",
        "glide-compose-prebuilt",
        "glide-annotation-and-compiler-prebuilt",
        //
        "hilt_android",
        "kotlin-stdlib",
        "kotlinx-coroutines-android",
        "kotlinx_coroutines",
        "mediaprovider_flags_java_lib",
        "modules-utils-build",
        "androidx.media3.media3-common",
        "androidx.media3.media3-exoplayer",
    ],
    apex_available: [
        "//apex_available:platform",
        "com.android.mediaprovider",
    ],
    plugins: [
        "glide-annotation-processor",
        "androidx.room_room-compiler-plugin",
    ],
    lint: {
        extra_check_modules: ["PhotopickerLintChecker"],
    },
}

android_app {
    name: "Photopicker",
    manifest: "AndroidManifest.xml",
    static_libs: [
        "PhotopickerLib",
    ],
    optimize: {
        // Optimize bytecode
        optimize: true,
        // Needed for removing unused icons from material-icons-extended
        shrink_resources: true,
    },
    plugins: [],
    kotlincflags: ["-Xjvm-default=all"],
    certificate: "media",
    privileged: true,
    privapp_allowlist: ":privapp_allowlist_com.android.photopicker.xml",
    sdk_version: "module_current",
    min_sdk_version: "30",
    apex_available: [
        "//apex_available:platform",
        "com.android.mediaprovider",
    ],
    updatable: true,

}