Tiem Song | ee0da74 | 2024-01-03 14:08:46 -0800 | [diff] [blame] | 1 | /** |
| 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 Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 8 | import androidx.build.LibraryType |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 9 | |
| 10 | plugins { |
| 11 | id("AndroidXPlugin") |
| 12 | id("com.android.library") |
| 13 | id("kotlin-android") |
Alan Viverette | facf40c | 2023-02-17 15:22:10 -0500 | [diff] [blame] | 14 | id("androidx.stableaidl") |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | dependencies { |
Alan Viverette | 63c50ee | 2023-03-20 13:30:19 -0400 | [diff] [blame] | 18 | // Atomically versioned. |
Alan Viverette | ced1c93 | 2022-04-27 13:05:32 -0400 | [diff] [blame] | 19 | constraints { |
| 20 | implementation(project(":core:core-ktx")) |
Diego Vela | 67ad4e2 | 2023-03-21 22:02:17 +0000 | [diff] [blame] | 21 | implementation(project(":core:core-testing")) |
Alan Viverette | ced1c93 | 2022-04-27 13:05:32 -0400 | [diff] [blame] | 22 | } |
| 23 | |
Ian Lake | 666485e | 2024-05-06 20:30:58 +0000 | [diff] [blame] | 24 | api("androidx.annotation:annotation:1.8.0") |
natnaelbelay | a817dd9 | 2024-01-17 10:30:59 -0500 | [diff] [blame] | 25 | api("androidx.annotation:annotation-experimental:1.4.0") |
Ian Lake | e4b914d | 2023-10-17 20:09:07 +0000 | [diff] [blame] | 26 | api("androidx.lifecycle:lifecycle-runtime:2.6.2") |
Alan Viverette | b27cfef | 2021-01-12 09:52:14 -0500 | [diff] [blame] | 27 | api("androidx.versionedparcelable:versionedparcelable:1.1.1") |
Alan Viverette | 3aba4be | 2020-02-20 16:13:37 -0500 | [diff] [blame] | 28 | implementation("androidx.collection:collection:1.0.0") |
Bessie Jiang | 98b8cc0 | 2021-07-06 17:53:00 +0100 | [diff] [blame] | 29 | implementation("androidx.concurrent:concurrent-futures:1.0.0") |
Alex Vanyo | 723694c3 | 2022-06-10 21:45:40 +0000 | [diff] [blame] | 30 | implementation("androidx.interpolator:interpolator:1.0.0") |
Alan Viverette | 3aba4be | 2020-02-20 16:13:37 -0500 | [diff] [blame] | 31 | |
Ian Lake | 6d25143 | 2023-10-11 20:26:51 +0000 | [diff] [blame] | 32 | api(libs.kotlinStdlib) |
Alan Viverette | 8b6d694 | 2021-05-27 12:44:38 -0400 | [diff] [blame] | 33 | |
Alan Viverette | 3aba4be | 2020-02-20 16:13:37 -0500 | [diff] [blame] | 34 | // We don't ship this as a public artifact, so it must remain a project-type dependency. |
Alan Viverette | 63ba82e | 2022-04-25 11:24:03 -0400 | [diff] [blame] | 35 | annotationProcessor(projectOrArtifact(":versionedparcelable:versionedparcelable-compiler")) |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 36 | |
Aurimas Liutikas | b20296a | 2021-12-21 15:56:47 -0800 | [diff] [blame] | 37 | androidTestImplementation(libs.junit) |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 38 | 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 Wu | cf81e46 | 2023-03-07 20:10:28 +0800 | [diff] [blame] | 46 | androidTestImplementation(libs.testUiautomator) |
Winson | b309cde | 2020-09-23 10:52:42 -0700 | [diff] [blame] | 47 | |
Ian Lake | e4b914d | 2023-10-17 20:09:07 +0000 | [diff] [blame] | 48 | androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.6.2") |
Sanura N'Jaka | 87fcb4c | 2021-08-10 22:59:56 +0000 | [diff] [blame] | 49 | |
Winson | b309cde | 2020-09-23 10:52:42 -0700 | [diff] [blame] | 50 | // 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 Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 53 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it"s own MockMaker |
| 54 | androidTestImplementation(libs.dexmakerMockitoInline, excludes.bytebuddy) // DexMaker has it"s own MockMaker |
Ian Lake | 64c858b | 2019-09-27 14:34:08 -0700 | [diff] [blame] | 55 | androidTestImplementation("androidx.appcompat:appcompat:1.1.0") { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 56 | exclude group: "androidx.core", module: "core" |
Ian Lake | 19dc44d | 2019-08-22 12:51:11 -0700 | [diff] [blame] | 57 | } |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 58 | androidTestImplementation(project(":internal-testutils-runtime"), { |
| 59 | exclude group: "androidx.core", module: "core" |
| 60 | }) |
Marcello Galhardo | 32de0cc | 2024-05-14 15:18:55 +0100 | [diff] [blame] | 61 | androidTestImplementation(project(":internal-testutils-lifecycle")) |
Sean McQuillan | 1f602ac | 2022-06-29 12:38:11 -0700 | [diff] [blame] | 62 | androidTestImplementation(project(":internal-testutils-fonts")) |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 63 | androidTestImplementation(project(":internal-testutils-mockito")) |
Alan Viverette | 0d08d5a | 2019-12-02 12:45:33 -0500 | [diff] [blame] | 64 | |
Aurimas Liutikas | b20296a | 2021-12-21 15:56:47 -0800 | [diff] [blame] | 65 | testImplementation(libs.junit) |
Soonil Nagarkar | 15ac382 | 2021-07-09 11:53:04 -0700 | [diff] [blame] | 66 | testImplementation(libs.testExtJunit) |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 67 | testImplementation(libs.testCore) |
| 68 | testImplementation(libs.testRunner) |
| 69 | testImplementation(libs.truth) |
| 70 | testImplementation(libs.robolectric) |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | android { |
Aurimas Liutikas | 59d77d9 | 2020-03-27 17:29:44 -0700 | [diff] [blame] | 74 | buildFeatures { |
| 75 | aidl = true |
| 76 | } |
Alan Viverette | 0d08d5a | 2019-12-02 12:45:33 -0500 | [diff] [blame] | 77 | testOptions.unitTests.includeAndroidResources = true |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 78 | aaptOptions { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 79 | noCompress "ttf" |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 80 | } |
Omar Ismail | 7244477 | 2024-05-14 14:55:28 +0100 | [diff] [blame] | 81 | buildTypes.configureEach { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 82 | consumerProguardFiles "proguard-rules.pro" |
Alan Viverette | facf40c | 2023-02-17 15:22:10 -0500 | [diff] [blame] | 83 | |
| 84 | stableAidl { |
| 85 | version 1 |
| 86 | } |
Aurimas Liutikas | b4f0849 | 2019-09-05 16:06:50 -0700 | [diff] [blame] | 87 | } |
Winson | b309cde | 2020-09-23 10:52:42 -0700 | [diff] [blame] | 88 | |
| 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 Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 96 | namespace "androidx.core" |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | androidx { |
Alan Viverette | a46238ed | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 100 | name = "Core" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 101 | type = LibraryType.PUBLISHED_LIBRARY |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 102 | mavenVersion = LibraryVersions.CORE |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 103 | inceptionYear = "2015" |
Alan Viverette | a46238ed | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 104 | description = "Provides backward-compatible implementations of Android platform APIs and " + |
| 105 | "features." |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 106 | failOnDeprecationWarnings = false |
Jinseong Jeon | 999075e | 2023-08-22 00:40:11 -0700 | [diff] [blame] | 107 | metalavaK2UastEnabled = true |
Aurimas Liutikas | 5c5419a | 2024-05-29 15:26:58 -0700 | [diff] [blame] | 108 | legacyDisableKotlinStrictApiMode = true |
Aurimas Liutikas | 0c365e8 | 2019-05-30 14:17:11 -0700 | [diff] [blame] | 109 | } |