Manuel Vivo | 7ec019c | 2022-05-20 12:07:33 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2022 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 | */ |
omarismail | 6700b61 | 2024-02-19 14:28:20 +0000 | [diff] [blame] | 24 | import androidx.build.LibraryType |
Marcello Galhardo | 91927fb | 2024-03-29 17:03:00 +0000 | [diff] [blame] | 25 | import androidx.build.PlatformIdentifier |
Manuel Vivo | 7ec019c | 2022-05-20 12:07:33 +0000 | [diff] [blame] | 26 | |
| 27 | plugins { |
| 28 | id("AndroidXPlugin") |
| 29 | id("com.android.library") |
| 30 | id("AndroidXComposePlugin") |
Manuel Vivo | 7ec019c | 2022-05-20 12:07:33 +0000 | [diff] [blame] | 31 | } |
| 32 | |
Marcello Galhardo | 91927fb | 2024-03-29 17:03:00 +0000 | [diff] [blame] | 33 | androidXMultiplatform { |
| 34 | android() |
| 35 | desktop() |
Manuel Vivo | 7ec019c | 2022-05-20 12:07:33 +0000 | [diff] [blame] | 36 | |
Marcello Galhardo | 91927fb | 2024-03-29 17:03:00 +0000 | [diff] [blame] | 37 | defaultPlatform(PlatformIdentifier.ANDROID) |
Manuel Vivo | 6ec2c4f | 2022-05-21 08:53:13 +0000 | [diff] [blame] | 38 | |
Marcello Galhardo | 91927fb | 2024-03-29 17:03:00 +0000 | [diff] [blame] | 39 | sourceSets { |
| 40 | commonMain { |
| 41 | dependencies { |
| 42 | api(projectOrArtifact(":lifecycle:lifecycle-runtime")) |
Prajakta Patil | 7875e36 | 2024-04-29 22:20:47 +0000 | [diff] [blame^] | 43 | api("androidx.annotation:annotation:1.8.0") |
Marcello Galhardo | 1cd99e7 | 2024-04-04 16:38:17 +0100 | [diff] [blame] | 44 | api("androidx.compose.runtime:runtime:1.6.5") |
Marcello Galhardo | 91927fb | 2024-03-29 17:03:00 +0000 | [diff] [blame] | 45 | } |
| 46 | } |
| 47 | |
| 48 | androidMain { |
| 49 | dependsOn(commonMain) |
Marcello Galhardo | e48e6e2 | 2024-03-29 17:03:31 +0000 | [diff] [blame] | 50 | dependencies { |
| 51 | // Although this artifact is empty, it ensures that upgrading |
| 52 | // `lifecycle-runtime-compose` also updates `lifecycle-runtime-ktx` |
| 53 | // in cases where our constraints fail (e.g., internally in AndroidX |
| 54 | // when using project dependencies). |
| 55 | api(projectOrArtifact(":lifecycle:lifecycle-runtime-ktx")) |
| 56 | } |
Marcello Galhardo | 91927fb | 2024-03-29 17:03:00 +0000 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | androidInstrumentedTest { |
| 60 | dependencies { |
| 61 | implementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing")) |
| 62 | implementation(projectOrArtifact(":compose:ui:ui-test-junit4")) |
| 63 | implementation(project(":compose:test-utils")) |
| 64 | implementation(libs.testRules) |
| 65 | implementation(libs.testRunner) |
| 66 | implementation(libs.junit) |
| 67 | implementation(libs.truth) |
| 68 | } |
| 69 | } |
| 70 | } |
Manuel Vivo | 7ec019c | 2022-05-20 12:07:33 +0000 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | androidx { |
| 74 | name = "Lifecycle Runtime Compose" |
omarismail | 6700b61 | 2024-02-19 14:28:20 +0000 | [diff] [blame] | 75 | type = LibraryType.PUBLISHED_KOTLIN_ONLY_LIBRARY |
Manuel Vivo | 7ec019c | 2022-05-20 12:07:33 +0000 | [diff] [blame] | 76 | inceptionYear = "2021" |
| 77 | description = "Compose integration with Lifecycle" |
Marcello Galhardo | 91927fb | 2024-03-29 17:03:00 +0000 | [diff] [blame] | 78 | samples(project(":lifecycle:lifecycle-runtime-compose:lifecycle-runtime-compose-samples")) |
Manuel Vivo | 7ec019c | 2022-05-20 12:07:33 +0000 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | android { |
| 82 | namespace "androidx.lifecycle.runtime.compose" |
| 83 | } |