Sumir Kataria | 2a5cd6d | 2017-09-11 12:30:51 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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 | |
Tiem Song | ee0da74 | 2024-01-03 14:08:46 -0800 | [diff] [blame] | 17 | /** |
| 18 | * This file was created using the `create_project.py` script located in the |
| 19 | * `<AndroidX root>/development/project-creator` directory. |
| 20 | * |
| 21 | * Please use that script when creating a new project, rather than copying an existing project and |
| 22 | * modifying its settings. |
| 23 | */ |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 24 | import androidx.build.LibraryType |
Sumir Kataria | 6d55d8c | 2017-12-07 13:37:42 -0800 | [diff] [blame] | 25 | |
Aurimas Liutikas | 2c28002 | 2021-05-04 14:05:28 -0700 | [diff] [blame] | 26 | import static androidx.inspection.gradle.InspectionPluginKt.packageInspector |
| 27 | |
Aurimas Liutikas | fcdb520 | 2017-11-07 03:41:32 +0000 | [diff] [blame] | 28 | plugins { |
Aurimas Liutikas | cdb9f9f | 2019-04-08 12:07:49 +0100 | [diff] [blame] | 29 | id("AndroidXPlugin") |
| 30 | id("com.android.library") |
Rahul Ravikumar | 19b1518 | 2019-04-30 17:27:38 -0700 | [diff] [blame] | 31 | id("kotlin-android") |
Sergey Vasilinets | 856d077 | 2021-12-07 02:26:53 +0000 | [diff] [blame] | 32 | id("com.google.devtools.ksp") |
Alan Viverette | 68e4fa2 | 2023-04-05 13:03:34 -0400 | [diff] [blame] | 33 | id("androidx.stableaidl") |
Aurimas Liutikas | fcdb520 | 2017-11-07 03:41:32 +0000 | [diff] [blame] | 34 | } |
Sumir Kataria | 2a5cd6d | 2017-09-11 12:30:51 -0700 | [diff] [blame] | 35 | |
| 36 | android { |
Rahul Ravikumar | 5cf566d | 2020-08-13 11:34:31 -0700 | [diff] [blame] | 37 | buildFeatures { |
| 38 | aidl = true |
| 39 | } |
Omar Ismail | 7244477 | 2024-05-14 14:55:28 +0100 | [diff] [blame] | 40 | buildTypes.configureEach { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 41 | consumerProguardFiles "proguard-rules.pro" |
Alan Viverette | 68e4fa2 | 2023-04-05 13:03:34 -0400 | [diff] [blame] | 42 | |
| 43 | stableAidl { |
| 44 | version 1 |
| 45 | } |
Sumir Kataria | 2a5cd6d | 2017-09-11 12:30:51 -0700 | [diff] [blame] | 46 | } |
Rahul Ravikumar | 18e0a7e | 2018-06-01 16:16:20 -0700 | [diff] [blame] | 47 | defaultConfig { |
Sergey Vasilinets | 9749456 | 2021-11-24 17:02:36 +0000 | [diff] [blame] | 48 | multiDexEnabled = true |
Rahul Ravikumar | 18e0a7e | 2018-06-01 16:16:20 -0700 | [diff] [blame] | 49 | javaCompileOptions { |
| 50 | annotationProcessorOptions { |
Rahul Ravikumar | 9f75a89 | 2019-10-09 12:55:17 -0700 | [diff] [blame] | 51 | arguments = [ |
| 52 | "room.incremental" : "true", |
| 53 | "room.expandProjection": "true", |
| 54 | "room.schemaLocation" : "$projectDir/src/schemas".toString() |
| 55 | ] |
Rahul Ravikumar | 18e0a7e | 2018-06-01 16:16:20 -0700 | [diff] [blame] | 56 | } |
| 57 | } |
| 58 | } |
| 59 | sourceSets { |
| 60 | androidTest.assets.srcDirs += files("$projectDir/src/schemas".toString()) |
| 61 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 62 | namespace "androidx.work" |
Sumir Kataria | 2a5cd6d | 2017-09-11 12:30:51 -0700 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | dependencies { |
Sergey Vasilinetc | c03a690 | 2023-12-14 15:27:40 +0000 | [diff] [blame] | 66 | ksp("androidx.room:room-compiler:2.6.1") |
| 67 | implementation("androidx.core:core:1.12.0") |
| 68 | implementation("androidx.room:room-ktx:2.6.1") |
Sergey Vasilinetc | 8556134 | 2024-02-13 10:51:51 +0000 | [diff] [blame] | 69 | implementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
natnaelbelay | a817dd9 | 2024-01-17 10:30:59 -0500 | [diff] [blame] | 70 | api("androidx.annotation:annotation-experimental:1.4.0") |
Aurimas Liutikas | 2c28002 | 2021-05-04 14:05:28 -0700 | [diff] [blame] | 71 | api(libs.guavaListenableFuture) |
Sergey Vasilinetc | c03a690 | 2023-12-14 15:27:40 +0000 | [diff] [blame] | 72 | api("androidx.lifecycle:lifecycle-livedata:2.6.2") |
Sergey Vasilinets | 25f4563 | 2023-02-03 12:06:42 +0000 | [diff] [blame] | 73 | api("androidx.startup:startup-runtime:1.1.1") |
Sergey Vasilinetc | c03a690 | 2023-12-14 15:27:40 +0000 | [diff] [blame] | 74 | implementation("androidx.lifecycle:lifecycle-service:2.6.2") |
Rahul Ravikumar | ba07ebd | 2024-04-03 17:42:25 -0700 | [diff] [blame] | 75 | implementation("androidx.tracing:tracing-ktx:1.2.0") |
Sergey Vasilinets | fb2892f | 2021-11-06 15:19:42 +0000 | [diff] [blame] | 76 | api(libs.kotlinStdlib) |
Sergey Vasilinets | 32ae1ff | 2023-05-18 15:40:35 +0100 | [diff] [blame] | 77 | api(libs.kotlinCoroutinesAndroid) |
Sergey Vasilinetc | 608d901 | 2024-02-14 17:46:41 +0000 | [diff] [blame] | 78 | androidTestImplementation(libs.kotlinCoroutinesTest) |
Sergey Vasilinets | 9749456 | 2021-11-24 17:02:36 +0000 | [diff] [blame] | 79 | androidTestImplementation(libs.multidex) |
| 80 | androidTestImplementation(libs.truth) |
Aurimas Liutikas | 2c28002 | 2021-05-04 14:05:28 -0700 | [diff] [blame] | 81 | androidTestImplementation(libs.testExtJunit) |
| 82 | androidTestImplementation(libs.testCore) |
Jeremy Woods | 5dc7b57 | 2023-05-01 22:46:22 +0000 | [diff] [blame] | 83 | androidTestImplementation("androidx.arch.core:core-testing:2.2.0") |
Rahul Ravikumar | 3a8279c | 2020-07-10 12:04:24 -0700 | [diff] [blame] | 84 | androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing")) |
Sergey Vasilinetc | c03a690 | 2023-12-14 15:27:40 +0000 | [diff] [blame] | 85 | androidTestImplementation("androidx.room:room-testing:2.6.1") |
Aurimas Liutikas | 2c28002 | 2021-05-04 14:05:28 -0700 | [diff] [blame] | 86 | androidTestImplementation(libs.testRunner) |
| 87 | androidTestImplementation(libs.espressoCore) |
| 88 | androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has its own MockMaker |
| 89 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has its own MockMaker |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 90 | androidTestImplementation(project(":internal-testutils-runtime")) |
Aurimas Liutikas | 2c28002 | 2021-05-04 14:05:28 -0700 | [diff] [blame] | 91 | testImplementation(libs.junit) |
Sergey Vasilinets | 4977cc7 | 2022-10-18 11:51:31 +0100 | [diff] [blame] | 92 | testImplementation(libs.truth) |
Sergey Vasilinetc | 45cba8b | 2023-11-10 16:46:37 +0000 | [diff] [blame] | 93 | testImplementation(libs.robolectric) |
| 94 | testImplementation(libs.testCoreKtx) |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 95 | lintPublish(project(":work:work-runtime-lint")) |
Sumir Kataria | 2a5cd6d | 2017-09-11 12:30:51 -0700 | [diff] [blame] | 96 | } |
| 97 | |
Yigit Boyar | c07a652 | 2022-01-27 21:55:09 +0000 | [diff] [blame] | 98 | packageInspector(project, ":work:work-inspection") |
Sergey Vasilinets | 3de099a | 2020-09-15 13:07:13 +0100 | [diff] [blame] | 99 | |
Sergey Vasilinets | 856d077 | 2021-12-07 02:26:53 +0000 | [diff] [blame] | 100 | // KSP does not support argument per flavor so we set it to global instead. |
| 101 | ksp { |
| 102 | arg("room.schemaLocation","$projectDir/src/schemas".toString()) |
| 103 | } |
| 104 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 105 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 106 | name = "WorkManager Runtime" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 107 | type = LibraryType.PUBLISHED_LIBRARY |
Sumir Kataria | 9ebb420 | 2018-04-23 16:59:57 -0700 | [diff] [blame] | 108 | inceptionYear = "2018" |
| 109 | description = "Android WorkManager runtime library" |
Sumir Kataria | dd06969 | 2018-04-20 10:18:58 -0700 | [diff] [blame] | 110 | failOnDeprecationWarnings = false |
Jinseong Jeon | 999075e | 2023-08-22 00:40:11 -0700 | [diff] [blame] | 111 | metalavaK2UastEnabled = true |
Aurimas Liutikas | 5c5419a | 2024-05-29 15:26:58 -0700 | [diff] [blame^] | 112 | legacyDisableKotlinStrictApiMode = true |
Sumir Kataria | 2a5cd6d | 2017-09-11 12:30:51 -0700 | [diff] [blame] | 113 | } |