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    alias(libs.plugins.kotlinSerialization)
33}
34
35androidXMultiplatform {
36    jvm()
37    mac()
38    linux()
39    ios()
40
41    defaultPlatform(PlatformIdentifier.JVM)
42
43    sourceSets {
44        commonMain {
45            dependencies {
46                api(libs.kotlinStdlib)
47                implementation(project(":room:room-common"))
48                implementation(libs.kotlinSerializationJson)
49            }
50        }
51        commonTest {
52            dependencies {
53                implementation(project(":kruth:kruth"))
54                implementation(libs.kotlinTest)
55            }
56        }
57        jvmMain {
58            dependsOn(commonMain)
59        }
60        jvmTest {
61            dependsOn(commonTest)
62            dependencies {
63                implementation(libs.kotlinTestJunit)
64            }
65        }
66        nativeMain {
67            dependsOn(commonMain)
68            dependencies {
69                api(libs.okio)
70                implementation(libs.kotlinSerializationJsonOkio)
71            }
72        }
73        targets.configureEach { target ->
74            if (target.platformType == KotlinPlatformType.native) {
75                target.compilations["main"].defaultSourceSet {
76                    dependsOn(nativeMain)
77                }
78            }
79        }
80    }
81}
82
83androidx {
84    name = "Room Migration"
85    type = SoftwareType.PUBLISHED_LIBRARY
86    inceptionYear = "2017"
87    description = "Android Room Migration"
88    legacyDisableKotlinStrictApiMode = true
89}
90