/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * This file was created using the `create_project.py` script located in the
 * `<AndroidX root>/development/project-creator` directory.
 *
 * Please use that script when creating a new project, rather than copying an existing project and
 * modifying its settings.
 */


import androidx.build.KotlinTarget
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.konan.target.Family

plugins {
    id("AndroidXPlugin")
    id("com.android.library")
    id("androidx.stableaidl")
    id("com.google.devtools.ksp")
}


configurations {
    // Configuration for resolving shared archive file of androidx's SQLite compilation
    sqliteSharedArchive {
        canBeConsumed = false
        canBeResolved = true
        attributes {
            attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.NATIVE_LINK))
        }
    }
}

android {
    sourceSets {
        main {
            // Align AGP main source set root with KMP
            root = 'src/androidMain'
        }
    }
    buildFeatures {
        aidl = true
    }
    buildTypes.configureEach {
        consumerProguardFiles("proguard-rules.pro")
        stableAidl {
            version = 1
        }
    }
    namespace = "androidx.room"
    // TODO(b/345531033)
    experimentalProperties["android.lint.useK2Uast"] = false
}

androidXMultiplatform {
    android()
    ios() {
        // Link to sqlite3 available in iOS
        binaries.configureEach {
            linkerOpts += ["-lsqlite3"]
        }
    }
    jvm()
    linux()
    mac()

    defaultPlatform(PlatformIdentifier.ANDROID)

    // Source set structure:
    //                            ┌──────────────────┐
    //                            │    commonMain    │
    //                            └──────────────────┘
    //                                      │
    //                       ┌──────────────┴─────────────┐
    //                       │                            │
    //                       ▼                            ▼
    //             ┌──────────────────┐         ┌──────────────────┐
    //             │  jvmAndroidMain  │         │  jvmNativeMain   │
    //             └──────────────────┘         └──────────────────┘
    //                       │                            │
    //           ┌───────────┴──────────────┬─────────────┴───────────┐
    //           │                          │                         │
    //           ▼                          ▼                         ▼
    // ┌──────────────────┐       ┌──────────────────┐      ┌──────────────────┐
    // │   androidMain    │       │     jvmMain      │      │    nativeMain    │
    // └──────────────────┘       └──────────────────┘      └──────────────────┘
    sourceSets {
        commonMain {
            dependencies {
                api(libs.kotlinStdlib)
                api(project(":room:room-common"))
                api(project(":sqlite:sqlite"))
                api("androidx.collection:collection:1.4.2")
                api("androidx.annotation:annotation:1.8.1")
                api(libs.kotlinCoroutinesCore)
            }
        }
        commonTest {
            dependencies {
                implementation(libs.kotlinTest)
                implementation(libs.kotlinCoroutinesTest)
                implementation(project(":kruth:kruth"))
            }
        }
        jvmAndroidMain {
            dependsOn(commonMain)
        }
        jvmNativeMain {
            dependsOn(commonMain)
        }
        jvmMain {
            dependsOn(jvmAndroidMain)
            dependsOn(jvmNativeMain)
        }
        jvmTest {
            dependsOn(commonTest)
            dependencies {
                implementation(project(":sqlite:sqlite-bundled"))
                implementation(libs.kotlinTestJunit)
            }
        }
        androidMain {
            dependsOn(jvmAndroidMain)
            dependencies {
                api(project(":sqlite:sqlite-framework"))
                api(libs.kotlinCoroutinesAndroid)
                implementation("androidx.arch.core:core-runtime:2.2.0")
                compileOnly("androidx.lifecycle:lifecycle-livedata-core:2.0.0")
                compileOnly("androidx.paging:paging-common:2.0.0")
                implementation("androidx.annotation:annotation-experimental:1.4.1")
            }
        }
        androidUnitTest {
            dependsOn(commonTest)
            dependencies {
                implementation("androidx.arch.core:core-testing:2.2.0")
                implementation(libs.junit)
                implementation(libs.byteBuddy)
                implementation(libs.mockitoCore4)
                implementation(libs.mockitoKotlin4)
                implementation("androidx.lifecycle:lifecycle-livedata-core:2.0.0")
                implementation(libs.testRunner) // Needed for @FlakyTest and @Ignore
            }
        }
        androidInstrumentedTest {
            dependsOn(commonTest)
            dependencies {
                implementation(project(":sqlite:sqlite-bundled"))
                implementation(libs.junit)
                implementation(libs.testExtJunit)
                implementation(libs.testCore)
                implementation(libs.testRunner)
                implementation(libs.espressoCore)
                implementation(libs.mockitoCore)
                implementation(libs.dexmakerMockito)
                implementation(project(":internal-testutils-truth")) // for assertThrows
                implementation(project(":kruth:kruth"))
                implementation("androidx.arch.core:core-testing:2.2.0")
            }
        }
        nativeMain {
            dependsOn(jvmNativeMain)
            dependencies {
                api(project(":sqlite:sqlite-framework"))
                implementation(libs.atomicFu)
            }
        }
        nativeTest {
            dependsOn(commonTest)
            dependencies {
                implementation(project(":sqlite:sqlite-bundled"))
                implementation(libs.okio)
            }
        }
        targets.configureEach { target ->
            if (target.platformType == KotlinPlatformType.native) {
                target.compilations["main"].defaultSourceSet {
                    dependsOn(nativeMain)
                }
                def test = target.compilations["test"]
                test.defaultSourceSet {
                    dependsOn(nativeTest)
                }
                if (target.konanTarget.family == Family.LINUX) {
                    // For tests in Linux host, statically include androidx's compiled SQLite
                    // via a generated C interop definition
                    createCinteropFromArchiveConfiguration(test, configurations["sqliteSharedArchive"])
                } else if (target.konanTarget.family == Family.OSX) {
                    // For tests in Mac host, link to shared SQLite library included in MacOS
                    test.kotlinOptions.freeCompilerArgs += [
                            "-linker-options", "-lsqlite3"
                    ]
                }
            }
        }
    }
}

dependencies {
    lintChecks(project(":room:room-runtime-lint"))
    sqliteSharedArchive(project(":sqlite:sqlite-bundled"))
    add("kspAndroidAndroidTest", project(":room:room-compiler"))
}

androidx {
    name = "Room-Runtime"
    type = LibraryType.PUBLISHED_LIBRARY
    inceptionYear = "2017"
    description = "Android Room-Runtime"
    legacyDisableKotlinStrictApiMode = true
    metalavaK2UastEnabled = false
    // TODO: b/326456246
    optOutJSpecify = true
    kotlinTarget = KotlinTarget.KOTLIN_2_0
}

ksp {
    useKsp2 = true
}
