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
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 */
24
25
26import androidx.build.PlatformIdentifier
27import androidx.build.SoftwareType
28import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
29
30plugins {
31    id("AndroidXPlugin")
32    id("com.android.library")
33}
34
35androidXMultiplatform {
36    androidTarget()
37    ios()
38    jvm()
39    linux()
40    mac()
41
42    defaultPlatform(PlatformIdentifier.ANDROID)
43
44    sourceSets {
45        commonMain {
46            dependencies {
47                api(libs.kotlinStdlib)
48                api(project(":room:room-common"))
49                api(project(":room:room-runtime"))
50                api(project(":sqlite:sqlite"))
51                implementation(project(":room:room-migration"))
52            }
53        }
54        commonTest {
55            dependencies {
56                implementation(libs.kotlinTest)
57                implementation(project(":kruth:kruth"))
58            }
59        }
60        jvmMain {
61            dependsOn(commonMain)
62            dependencies {
63                api(libs.junit)
64            }
65        }
66        androidMain {
67            dependsOn(commonMain)
68            dependencies {
69                api(libs.junit)
70                api(project(":sqlite:sqlite-framework"))
71                implementation("androidx.arch.core:core-runtime:2.2.0")
72            }
73        }
74        nativeMain {
75            dependsOn(commonMain)
76            dependencies {
77                implementation(libs.okio)
78            }
79        }
80        targets.configureEach { target ->
81            if (target.platformType == KotlinPlatformType.native) {
82                target.compilations["main"].defaultSourceSet {
83                    dependsOn(nativeMain)
84                }
85            }
86        }
87    }
88}
89
90android {
91    namespace = "androidx.room.testing"
92}
93
94androidx {
95    name = "Room Testing"
96    type = SoftwareType.PUBLISHED_LIBRARY
97    inceptionYear = "2017"
98    description = "Android Room Testing"
99    legacyDisableKotlinStrictApiMode = true
100    metalavaK2UastEnabled = false
101}
102