[go: nahoru, domu]

blob: a646db35542d6a3537a5e8e218db434abc54cee8 [file] [log] [blame]
Tiem Songee0da742024-01-03 14:08:46 -08001/**
2 * This file was created using the `create_project.py` script located in the
3 * `<AndroidX root>/development/project-creator` directory.
4 *
5 * Please use that script when creating a new project, rather than copying an existing project and
6 * modifying its settings.
7 */
Omar Ismail86e66062024-05-03 16:10:50 +01008import androidx.build.LibraryType
Aurimas Liutikas0c365e82019-05-30 14:17:11 -07009
10plugins {
11 id("AndroidXPlugin")
12 id("com.android.library")
13 id("kotlin-android")
Alan Viverettefacf40c2023-02-17 15:22:10 -050014 id("androidx.stableaidl")
Aurimas Liutikas0c365e82019-05-30 14:17:11 -070015}
16
17dependencies {
Alan Viverette63c50ee2023-03-20 13:30:19 -040018 // Atomically versioned.
Alan Viveretteced1c932022-04-27 13:05:32 -040019 constraints {
20 implementation(project(":core:core-ktx"))
Diego Vela67ad4e22023-03-21 22:02:17 +000021 implementation(project(":core:core-testing"))
Alan Viveretteced1c932022-04-27 13:05:32 -040022 }
23
Ian Lake666485e2024-05-06 20:30:58 +000024 api("androidx.annotation:annotation:1.8.0")
natnaelbelaya817dd92024-01-17 10:30:59 -050025 api("androidx.annotation:annotation-experimental:1.4.0")
Ian Lakee4b914d2023-10-17 20:09:07 +000026 api("androidx.lifecycle:lifecycle-runtime:2.6.2")
Alan Viveretteb27cfef2021-01-12 09:52:14 -050027 api("androidx.versionedparcelable:versionedparcelable:1.1.1")
Alan Viverette3aba4be2020-02-20 16:13:37 -050028 implementation("androidx.collection:collection:1.0.0")
Bessie Jiang98b8cc02021-07-06 17:53:00 +010029 implementation("androidx.concurrent:concurrent-futures:1.0.0")
Alex Vanyo723694c32022-06-10 21:45:40 +000030 implementation("androidx.interpolator:interpolator:1.0.0")
Alan Viverette3aba4be2020-02-20 16:13:37 -050031
Ian Lake6d251432023-10-11 20:26:51 +000032 api(libs.kotlinStdlib)
Alan Viverette8b6d6942021-05-27 12:44:38 -040033
Alan Viverette3aba4be2020-02-20 16:13:37 -050034 // We don't ship this as a public artifact, so it must remain a project-type dependency.
Alan Viverette63ba82e2022-04-25 11:24:03 -040035 annotationProcessor(projectOrArtifact(":versionedparcelable:versionedparcelable-compiler"))
Aurimas Liutikas0c365e82019-05-30 14:17:11 -070036
Aurimas Liutikasb20296a2021-12-21 15:56:47 -080037 androidTestImplementation(libs.junit)
Aurimas Liutikasb3483fd2021-06-04 16:56:37 -070038 androidTestImplementation(libs.kotlinStdlib)
39 androidTestImplementation(libs.testExtJunit)
40 androidTestImplementation(libs.testCore)
41 androidTestImplementation(libs.testRunner)
42 androidTestImplementation(libs.testRules)
43 androidTestImplementation(libs.truth)
44 androidTestImplementation(libs.espressoCore, excludes.espresso)
45 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it"s own MockMaker
Wilson Wucf81e462023-03-07 20:10:28 +080046 androidTestImplementation(libs.testUiautomator)
Winsonb309cde2020-09-23 10:52:42 -070047
Ian Lakee4b914d2023-10-17 20:09:07 +000048 androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.6.2")
Sanura N'Jaka87fcb4c2021-08-10 22:59:56 +000049
Winsonb309cde2020-09-23 10:52:42 -070050 // Including both dexmakers allows support for all API levels plus final mocking support on
51 // API 28+. The implementation is swapped based on the finality of the mock type. This
52 // delegation is handled manually inside androidx.core.util.mockito.CustomMockMaker.
Aurimas Liutikasb3483fd2021-06-04 16:56:37 -070053 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it"s own MockMaker
54 androidTestImplementation(libs.dexmakerMockitoInline, excludes.bytebuddy) // DexMaker has it"s own MockMaker
Ian Lake64c858b2019-09-27 14:34:08 -070055 androidTestImplementation("androidx.appcompat:appcompat:1.1.0") {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080056 exclude group: "androidx.core", module: "core"
Ian Lake19dc44d2019-08-22 12:51:11 -070057 }
Jim Sproch9e38b4f2021-01-06 14:21:06 -080058 androidTestImplementation(project(":internal-testutils-runtime"), {
59 exclude group: "androidx.core", module: "core"
60 })
Marcello Galhardo32de0cc2024-05-14 15:18:55 +010061 androidTestImplementation(project(":internal-testutils-lifecycle"))
Sean McQuillan1f602ac2022-06-29 12:38:11 -070062 androidTestImplementation(project(":internal-testutils-fonts"))
Jim Sproch9e38b4f2021-01-06 14:21:06 -080063 androidTestImplementation(project(":internal-testutils-mockito"))
Alan Viverette0d08d5a2019-12-02 12:45:33 -050064
Aurimas Liutikasb20296a2021-12-21 15:56:47 -080065 testImplementation(libs.junit)
Soonil Nagarkar15ac3822021-07-09 11:53:04 -070066 testImplementation(libs.testExtJunit)
Aurimas Liutikasb3483fd2021-06-04 16:56:37 -070067 testImplementation(libs.testCore)
68 testImplementation(libs.testRunner)
69 testImplementation(libs.truth)
70 testImplementation(libs.robolectric)
Aurimas Liutikas0c365e82019-05-30 14:17:11 -070071}
72
73android {
Aurimas Liutikas59d77d92020-03-27 17:29:44 -070074 buildFeatures {
75 aidl = true
76 }
Alan Viverette0d08d5a2019-12-02 12:45:33 -050077 testOptions.unitTests.includeAndroidResources = true
Aurimas Liutikas0c365e82019-05-30 14:17:11 -070078 aaptOptions {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080079 noCompress "ttf"
Aurimas Liutikas0c365e82019-05-30 14:17:11 -070080 }
Omar Ismail72444772024-05-14 14:55:28 +010081 buildTypes.configureEach {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080082 consumerProguardFiles "proguard-rules.pro"
Alan Viverettefacf40c2023-02-17 15:22:10 -050083
84 stableAidl {
85 version 1
86 }
Aurimas Liutikasb4f08492019-09-05 16:06:50 -070087 }
Winsonb309cde2020-09-23 10:52:42 -070088
89 packagingOptions {
90 // Drop the file from external dependencies, preferring the local file inside androidTest
91 pickFirsts = [
92 "mockito-extensions/org.mockito.plugins.MockMaker",
93 "mockito-extensions/org.mockito.plugins.StackTraceCleanerProvider"
94 ]
95 }
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070096 namespace "androidx.core"
Aurimas Liutikas0c365e82019-05-30 14:17:11 -070097}
98
99androidx {
Alan Viverettea46238ed2023-05-08 17:36:59 -0400100 name = "Core"
Omar Ismail86e66062024-05-03 16:10:50 +0100101 type = LibraryType.PUBLISHED_LIBRARY
Aurimas Liutikas0c365e82019-05-30 14:17:11 -0700102 mavenVersion = LibraryVersions.CORE
Aurimas Liutikas0c365e82019-05-30 14:17:11 -0700103 inceptionYear = "2015"
Alan Viverettea46238ed2023-05-08 17:36:59 -0400104 description = "Provides backward-compatible implementations of Android platform APIs and " +
105 "features."
Aurimas Liutikas0c365e82019-05-30 14:17:11 -0700106 failOnDeprecationWarnings = false
Jinseong Jeon999075e2023-08-22 00:40:11 -0700107 metalavaK2UastEnabled = true
Aurimas Liutikas5c5419a2024-05-29 15:26:58 -0700108 legacyDisableKotlinStrictApiMode = true
Aurimas Liutikas0c365e82019-05-30 14:17:11 -0700109}