1/* 2 * Copyright 2023 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 org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType 27 28plugins { 29 id("AndroidXPlugin") 30} 31 32androidXMultiplatform { 33 androidLibrary { 34 namespace = "androidx.sqlite.driver.test" 35 withAndroidTestOnDeviceBuilder { 36 it.compilationName = "instrumentedTest" 37 it.defaultSourceSetName = "androidInstrumentedTest" 38 it.sourceSetTreeName = "test" 39 } 40 withAndroidTestOnJvmBuilder { 41 it.defaultSourceSetName = "androidUnitTest" 42 } 43 } 44 ios() 45 jvm() 46 linux() 47 mac() 48 49 sourceSets { 50 commonTest { 51 dependencies { 52 implementation(project(":sqlite:sqlite")) 53 implementation(project(":sqlite:sqlite-bundled")) 54 implementation(libs.kotlinStdlib) 55 implementation(libs.kotlinTest) 56 implementation(libs.kotlinCoroutinesTest) 57 implementation(project(":kruth:kruth")) 58 } 59 } 60 androidInstrumentedTest { 61 dependsOn(commonTest) 62 dependencies { 63 implementation(project(":sqlite:sqlite-framework")) 64 implementation(libs.kotlinTestJunit) 65 implementation(libs.testRunner) 66 implementation(libs.testCore) 67 } 68 } 69 jvmTest { 70 dependsOn(commonTest) 71 dependencies { 72 implementation(libs.kotlinTestJunit) 73 } 74 } 75 nativeTest { 76 dependsOn(commonTest) 77 dependencies { 78 implementation(project(":sqlite:sqlite-framework")) 79 } 80 } 81 targets.configureEach { target -> 82 if (target.platformType == KotlinPlatformType.native) { 83 target.compilations["test"].defaultSourceSet { 84 dependsOn(nativeTest) 85 } 86 } 87 } 88 } 89} 90 91 92androidx { 93 name = "SQLite Driver Coformance Base Tests" 94 inceptionYear = "2023" 95 description = "SQLite Kotlin driver coformance base tests" 96}