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 |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 9 | |
| 10 | plugins { |
| 11 | id("AndroidXPlugin") |
| 12 | id("com.android.library") |
| 13 | id("kotlin-android") |
Ember Rose | fd3cd93 | 2021-05-17 15:41:31 -0400 | [diff] [blame] | 14 | id("kotlin-kapt") |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | dependencies { |
Alan Viverette | f4b17e7 | 2022-02-11 10:07:00 -0500 | [diff] [blame] | 18 | api("androidx.annotation:annotation:1.3.0") |
Ian Lake | 2891a1d | 2024-04-23 19:34:14 +0000 | [diff] [blame] | 19 | api("androidx.core:core:1.13.0") |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 20 | |
Alan Viverette | f1ceed0 | 2022-06-27 16:19:11 -0400 | [diff] [blame] | 21 | // Required to make activity 1.5.0-rc01 dependencies resolve. |
Ian Lake | 2891a1d | 2024-04-23 19:34:14 +0000 | [diff] [blame] | 22 | implementation("androidx.core:core-ktx:1.13.0") |
Jim Sproch | a4e00b0 | 2022-07-07 15:04:40 -0700 | [diff] [blame] | 23 | implementation(libs.kotlinStdlib) |
Alan Viverette | f1ceed0 | 2022-06-27 16:19:11 -0400 | [diff] [blame] | 24 | |
Sean McQuillan | 7aeb2ea | 2023-03-23 10:04:49 -0700 | [diff] [blame] | 25 | implementation("androidx.emoji2:emoji2:1.3.0") |
Jeremy Woods | 2091d73 | 2022-09-08 16:10:49 -0700 | [diff] [blame] | 26 | implementation("androidx.emoji2:emoji2-views-helper:1.2.0") |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 27 | implementation("androidx.collection:collection:1.0.0") |
| 28 | api("androidx.cursoradapter:cursoradapter:1.0.0") |
sanura | 93dc621 | 2023-03-16 01:59:33 +0000 | [diff] [blame] | 29 | api("androidx.activity:activity:1.7.0") |
Jeremy Woods | 60843ad | 2022-11-07 15:09:01 -0800 | [diff] [blame] | 30 | api("androidx.fragment:fragment:1.5.4") |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 31 | api(project(":appcompat:appcompat-resources")) |
| 32 | api("androidx.drawerlayout:drawerlayout:1.0.0") |
Jeremy Woods | ae61d19 | 2023-04-28 19:59:17 +0000 | [diff] [blame] | 33 | implementation("androidx.lifecycle:lifecycle-runtime:2.6.1") |
| 34 | implementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1") |
Chris Craik | acb4252 | 2024-03-19 13:42:53 -0700 | [diff] [blame] | 35 | implementation("androidx.profileinstaller:profileinstaller:1.3.1") |
Nick Anthony | 23f3562 | 2022-01-31 10:51:45 -0500 | [diff] [blame] | 36 | implementation("androidx.resourceinspection:resourceinspection-annotation:1.0.1") |
Jeremy Woods | 078e4ef | 2023-03-09 23:39:33 +0000 | [diff] [blame] | 37 | api("androidx.savedstate:savedstate:1.2.1") |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 38 | |
Aurimas Liutikas | 4c1dac8 | 2022-08-26 23:25:50 +0000 | [diff] [blame] | 39 | kapt("androidx.resourceinspection:resourceinspection-processor:1.0.1") |
Ember Rose | fd3cd93 | 2021-05-17 15:41:31 -0400 | [diff] [blame] | 40 | |
Aurimas Liutikas | b6af5fb | 2021-05-24 16:24:38 -0700 | [diff] [blame] | 41 | androidTestImplementation(libs.kotlinStdlib) |
| 42 | androidTestImplementation(libs.testExtJunit) |
| 43 | androidTestImplementation(libs.testCore) |
| 44 | androidTestImplementation(libs.testRunner) |
| 45 | androidTestImplementation(libs.testRules) |
| 46 | androidTestImplementation(libs.testUiautomator) |
| 47 | androidTestImplementation(libs.truth) |
| 48 | androidTestImplementation(libs.espressoCore, excludes.espresso) |
| 49 | androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker |
| 50 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker |
Jeremy Woods | ae61d19 | 2023-04-28 19:59:17 +0000 | [diff] [blame] | 51 | androidTestImplementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1") |
| 52 | androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.6.1", { |
Chris Craik | 84ff653 | 2023-01-27 15:11:33 -0800 | [diff] [blame] | 53 | // Needed to ensure that the same version of lifecycle-runtime-ktx |
| 54 | // is pulled into main and androidTest configurations. Otherwise, |
| 55 | // potentially leads to confusing errors about resolution |
| 56 | // ambiguity, especially from playground build which replaces |
| 57 | // project dependency with snapshot artifacts. |
| 58 | exclude group: "androidx.lifecycle", module: "lifecycle-runtime-ktx" |
Dustin Lam | 78aa546 | 2023-01-03 17:13:38 +0000 | [diff] [blame] | 59 | }) |
Alan Viverette | f1e35b9 | 2022-06-17 13:53:29 -0400 | [diff] [blame] | 60 | androidTestImplementation(project(":internal-testutils-runtime")) |
Marcello Galhardo | 32de0cc | 2024-05-14 15:18:55 +0100 | [diff] [blame] | 61 | androidTestImplementation(project(":internal-testutils-lifecycle")) |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 62 | androidTestImplementation(project(":internal-testutils-appcompat"), { |
| 63 | exclude group: "androidx.appcompat", module: "appcompat" |
| 64 | exclude group: "androidx.core", module: "core" |
| 65 | }) |
Oussama Ben Abdelbaki | 9a945cf | 2019-12-05 14:44:58 -0500 | [diff] [blame] | 66 | |
Aurimas Liutikas | b6af5fb | 2021-05-24 16:24:38 -0700 | [diff] [blame] | 67 | testImplementation(libs.kotlinStdlib) |
| 68 | testImplementation(libs.testCore) |
| 69 | testImplementation(libs.junit) |
| 70 | testImplementation(libs.robolectric) |
Chris Banes | 642cb9e | 2019-12-13 10:18:36 +1100 | [diff] [blame] | 71 | |
Kirill Grouchnikov | 1f6aefd | 2020-01-07 11:26:22 -0500 | [diff] [blame] | 72 | lintPublish project(":appcompat:appcompat-lint") |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | android { |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 76 | defaultConfig { |
| 77 | // This disables the builds tools automatic vector -> PNG generation |
| 78 | generatedDensities = [] |
| 79 | } |
| 80 | |
| 81 | sourceSets { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 82 | main.res.srcDirs += "src/main/res-public" |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | aaptOptions { |
| 86 | additionalParameters "--no-version-vectors" |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 87 | noCompress "ttf" |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | testOptions { |
| 91 | animationsDisabled = true |
Chris Banes | 642cb9e | 2019-12-13 10:18:36 +1100 | [diff] [blame] | 92 | |
| 93 | unitTests { |
| 94 | includeAndroidResources = true |
| 95 | } |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 96 | } |
| 97 | |
Omar Ismail | 7244477 | 2024-05-14 14:55:28 +0100 | [diff] [blame] | 98 | buildTypes.configureEach { |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 99 | consumerProguardFiles("proguard-rules.pro") |
| 100 | } |
Alan Viverette | 75ca35a | 2019-12-18 17:52:07 -0500 | [diff] [blame] | 101 | |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 102 | useLibrary "android.test.runner" |
| 103 | useLibrary "android.test.base" |
| 104 | useLibrary "android.test.mock" |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 105 | namespace "androidx.appcompat" |
Alan Viverette | f1e35b9 | 2022-06-17 13:53:29 -0400 | [diff] [blame] | 106 | testNamespace "androidx.appcompat.test" |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 110 | name = "AppCompat" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 111 | type = LibraryType.PUBLISHED_LIBRARY |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 112 | inceptionYear = "2011" |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 113 | description = "Provides backwards-compatible implementations of UI-related Android SDK " + |
| 114 | "functionality, including dark mode and Material theming." |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 115 | failOnDeprecationWarnings = false |
Jinseong Jeon | 999075e | 2023-08-22 00:40:11 -0700 | [diff] [blame] | 116 | metalavaK2UastEnabled = true |
Sergey | 5e1cddb | 2019-11-03 23:23:27 +0400 | [diff] [blame] | 117 | } |