1/*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17import androidx.build.SoftwareType
18
19plugins {
20    id("AndroidXPlugin")
21    id("com.android.library")
22    id("androidx.stableaidl")
23    id("org.jetbrains.kotlin.android")
24}
25
26dependencies {
27    api(libs.jspecify)
28    api(libs.kotlinCoroutinesCore)
29
30    implementation(libs.kotlinStdlib)
31    implementation("androidx.exifinterface:exifinterface:1.3.2")
32    implementation("androidx.core:core:1.13.0")
33    implementation("androidx.customview:customview:1.2.0-alpha02")
34    implementation("androidx.annotation:annotation:1.7.0")
35    implementation("com.google.android.material:material:1.11.0")
36    implementation("com.google.errorprone:error_prone_annotations:2.30.0")
37
38    testImplementation(project(":pdf:pdf-viewer-fragment"))
39    testImplementation(libs.junit)
40    testImplementation(libs.testCore)
41    testImplementation(libs.testRunner)
42    testImplementation(libs.mockitoCore4)
43    testImplementation(libs.mockitoKotlin4)
44    testImplementation(libs.robolectric)
45    testImplementation(libs.truth)
46    testImplementation(libs.testExtTruth)
47    testImplementation(libs.testExtJunitKtx)
48    testImplementation("androidx.fragment:fragment-testing:1.7.1")
49    testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
50
51    androidTestImplementation(libs.testExtJunit)
52    androidTestImplementation(libs.junit)
53    androidTestImplementation(libs.testCore)
54    androidTestImplementation(libs.testRules)
55    androidTestImplementation(libs.testRunner)
56    androidTestImplementation(libs.mockitoCore)
57    androidTestImplementation(libs.dexmakerMockito)
58    androidTestImplementation(libs.truth)
59    androidTestImplementation(libs.espressoCore)
60    androidTestImplementation(libs.kotlinCoroutinesTest)
61    androidTestImplementation(libs.mockitoKotlin4)
62    androidTestImplementation(libs.espressoIntents)
63}
64
65android {
66    namespace = "androidx.pdf"
67
68    defaultConfig {
69        minSdk = 31
70        compileSdk = 35
71    }
72
73    buildFeatures {
74        aidl = true
75    }
76
77    buildTypes.configureEach {
78        stableAidl {
79            version = 1
80        }
81    }
82
83    sourceSets {
84        test {
85            assets {
86                srcDirs += ["src/test/assets"]
87            }
88            resources {
89                srcDirs += ["src/test/res"]
90            }
91        }
92    }
93}
94
95androidx {
96    name = "androidx.pdf:pdf-viewer"
97    type = SoftwareType.PUBLISHED_LIBRARY
98    inceptionYear = "2023"
99    description = "add pdf viewing to their apps."
100}
101