[go: nahoru, domu]

blob: aa6cbc11372d59d18e95f14c344645fa4d9d742d [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
Sergey5e1cddb2019-11-03 23:23:27 +04009
10plugins {
11 id("AndroidXPlugin")
12 id("com.android.library")
13 id("kotlin-android")
Ember Rosefd3cd932021-05-17 15:41:31 -040014 id("kotlin-kapt")
Sergey5e1cddb2019-11-03 23:23:27 +040015}
16
17dependencies {
Alan Viverettef4b17e72022-02-11 10:07:00 -050018 api("androidx.annotation:annotation:1.3.0")
Ian Lake2891a1d2024-04-23 19:34:14 +000019 api("androidx.core:core:1.13.0")
Sergey5e1cddb2019-11-03 23:23:27 +040020
Alan Viverettef1ceed02022-06-27 16:19:11 -040021 // Required to make activity 1.5.0-rc01 dependencies resolve.
Ian Lake2891a1d2024-04-23 19:34:14 +000022 implementation("androidx.core:core-ktx:1.13.0")
Jim Sprocha4e00b02022-07-07 15:04:40 -070023 implementation(libs.kotlinStdlib)
Alan Viverettef1ceed02022-06-27 16:19:11 -040024
Sean McQuillan7aeb2ea2023-03-23 10:04:49 -070025 implementation("androidx.emoji2:emoji2:1.3.0")
Jeremy Woods2091d732022-09-08 16:10:49 -070026 implementation("androidx.emoji2:emoji2-views-helper:1.2.0")
Sergey5e1cddb2019-11-03 23:23:27 +040027 implementation("androidx.collection:collection:1.0.0")
28 api("androidx.cursoradapter:cursoradapter:1.0.0")
sanura93dc6212023-03-16 01:59:33 +000029 api("androidx.activity:activity:1.7.0")
Jeremy Woods60843ad2022-11-07 15:09:01 -080030 api("androidx.fragment:fragment:1.5.4")
Sergey5e1cddb2019-11-03 23:23:27 +040031 api(project(":appcompat:appcompat-resources"))
32 api("androidx.drawerlayout:drawerlayout:1.0.0")
Jeremy Woodsae61d192023-04-28 19:59:17 +000033 implementation("androidx.lifecycle:lifecycle-runtime:2.6.1")
34 implementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
Chris Craikacb42522024-03-19 13:42:53 -070035 implementation("androidx.profileinstaller:profileinstaller:1.3.1")
Nick Anthony23f35622022-01-31 10:51:45 -050036 implementation("androidx.resourceinspection:resourceinspection-annotation:1.0.1")
Jeremy Woods078e4ef2023-03-09 23:39:33 +000037 api("androidx.savedstate:savedstate:1.2.1")
Sergey5e1cddb2019-11-03 23:23:27 +040038
Aurimas Liutikas4c1dac82022-08-26 23:25:50 +000039 kapt("androidx.resourceinspection:resourceinspection-processor:1.0.1")
Ember Rosefd3cd932021-05-17 15:41:31 -040040
Aurimas Liutikasb6af5fb2021-05-24 16:24:38 -070041 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 Woodsae61d192023-04-28 19:59:17 +000051 androidTestImplementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
52 androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.6.1", {
Chris Craik84ff6532023-01-27 15:11:33 -080053 // 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 Lam78aa5462023-01-03 17:13:38 +000059 })
Alan Viverettef1e35b92022-06-17 13:53:29 -040060 androidTestImplementation(project(":internal-testutils-runtime"))
Marcello Galhardo32de0cc2024-05-14 15:18:55 +010061 androidTestImplementation(project(":internal-testutils-lifecycle"))
Jim Sproch9e38b4f2021-01-06 14:21:06 -080062 androidTestImplementation(project(":internal-testutils-appcompat"), {
63 exclude group: "androidx.appcompat", module: "appcompat"
64 exclude group: "androidx.core", module: "core"
65 })
Oussama Ben Abdelbaki9a945cf2019-12-05 14:44:58 -050066
Aurimas Liutikasb6af5fb2021-05-24 16:24:38 -070067 testImplementation(libs.kotlinStdlib)
68 testImplementation(libs.testCore)
69 testImplementation(libs.junit)
70 testImplementation(libs.robolectric)
Chris Banes642cb9e2019-12-13 10:18:36 +110071
Kirill Grouchnikov1f6aefd2020-01-07 11:26:22 -050072 lintPublish project(":appcompat:appcompat-lint")
Sergey5e1cddb2019-11-03 23:23:27 +040073}
74
75android {
Sergey5e1cddb2019-11-03 23:23:27 +040076 defaultConfig {
77 // This disables the builds tools automatic vector -> PNG generation
78 generatedDensities = []
79 }
80
81 sourceSets {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080082 main.res.srcDirs += "src/main/res-public"
Sergey5e1cddb2019-11-03 23:23:27 +040083 }
84
85 aaptOptions {
86 additionalParameters "--no-version-vectors"
Jim Sproch9e38b4f2021-01-06 14:21:06 -080087 noCompress "ttf"
Sergey5e1cddb2019-11-03 23:23:27 +040088 }
89
90 testOptions {
91 animationsDisabled = true
Chris Banes642cb9e2019-12-13 10:18:36 +110092
93 unitTests {
94 includeAndroidResources = true
95 }
Sergey5e1cddb2019-11-03 23:23:27 +040096 }
97
Omar Ismail72444772024-05-14 14:55:28 +010098 buildTypes.configureEach {
Sergey5e1cddb2019-11-03 23:23:27 +040099 consumerProguardFiles("proguard-rules.pro")
100 }
Alan Viverette75ca35a2019-12-18 17:52:07 -0500101
Jim Sproch9e38b4f2021-01-06 14:21:06 -0800102 useLibrary "android.test.runner"
103 useLibrary "android.test.base"
104 useLibrary "android.test.mock"
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -0700105 namespace "androidx.appcompat"
Alan Viverettef1e35b92022-06-17 13:53:29 -0400106 testNamespace "androidx.appcompat.test"
Sergey5e1cddb2019-11-03 23:23:27 +0400107}
108
109androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -0400110 name = "AppCompat"
Omar Ismail86e66062024-05-03 16:10:50 +0100111 type = LibraryType.PUBLISHED_LIBRARY
Sergey5e1cddb2019-11-03 23:23:27 +0400112 inceptionYear = "2011"
Alan Viverettec9e1fd72023-05-08 17:36:59 -0400113 description = "Provides backwards-compatible implementations of UI-related Android SDK " +
114 "functionality, including dark mode and Material theming."
Sergey5e1cddb2019-11-03 23:23:27 +0400115 failOnDeprecationWarnings = false
Jinseong Jeon999075e2023-08-22 00:40:11 -0700116 metalavaK2UastEnabled = true
Sergey5e1cddb2019-11-03 23:23:27 +0400117}