blob: 22e08ca521f673acb685c59ae9c1d8a9fcd3945b [file] [log] [blame]
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +01001/*
Jakub Gielzak8a666262019-10-30 15:50:45 +00002 * Copyright 2019 The Android Open Source Project
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +01003 *
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
Owen Gray74cc2592020-09-24 15:05:40 -040017import androidx.build.LibraryGroups
18import androidx.build.LibraryType
Dustin Lamc351bfc2020-03-11 20:32:42 -070019import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
20
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010021import static androidx.build.dependencies.DependenciesKt.*
Jakub Gielzak874198a2019-10-23 17:26:56 +010022
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010023plugins {
24 id("AndroidXPlugin")
25 id("com.android.library")
Jakub Gielzak71e1a692019-10-23 17:42:00 +010026 id("kotlin-android")
Sergey Vasilinets4e970562019-12-12 13:39:19 +000027 id("androidx.inspection")
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010028}
29
30dependencies {
Nick Anthonya3567762019-12-13 14:33:50 -050031 api("androidx.annotation:annotation:1.1.0")
Sergey Vasilinets95f91db2020-01-13 20:21:29 +000032 compileOnly(project(":inspection:inspection"))
Jakub Gielzak71e1a692019-10-23 17:42:00 +010033
Jakub Gielzak8a666262019-10-30 15:50:45 +000034 androidTestImplementation(project(":inspection:inspection-testing"))
Jakub Gielzak71e1a692019-10-23 17:42:00 +010035 androidTestImplementation(KOTLIN_STDLIB)
36 androidTestImplementation(ANDROIDX_TEST_RUNNER)
37 androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
38 androidTestImplementation(TRUTH)
Jakub Gielzak8a666262019-10-30 15:50:45 +000039 androidTestImplementation(KOTLIN_COROUTINES_ANDROID)
40 androidTestImplementation(KOTLIN_COROUTINES_TEST)
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010041}
42
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010043androidx {
44 name = "Android SQLite Inspector"
Owen Gray74cc2592020-09-24 15:05:40 -040045 type = LibraryType.IDE_PLUGIN
Rahul Ravikumar44198422019-11-18 11:18:09 -080046 // Decouple SQLITE_INSPECTOR because it depends on
47 // the inspection protocol, which is alpha
Rahul Ravikumar44198422019-11-18 11:18:09 -080048 mavenGroup = LibraryGroups.INSPECTION_EXTENSIONS
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010049 inceptionYear = "2019"
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010050 description = "The implementation of SQLite Inspector."
Sergey Vasilinets1cde9f62019-10-02 21:48:15 +010051}
Jakub Gielzak44a83b92019-10-29 12:47:35 +000052
53android {
Sergey Vasilinets8cf6fc52020-03-11 18:40:13 +000054 defaultConfig {
55 // studio pipeline works only starting with Android O
56 minSdkVersion 26
57 }
Sergey Vasilinets95f91db2020-01-13 20:21:29 +000058 sourceSets {
59 main.resources.srcDirs += "src/main/proto"
60 }
Jakub Gielzak44a83b92019-10-29 12:47:35 +000061}
Dustin Lamc351bfc2020-03-11 20:32:42 -070062
63// Allow usage of Kotlin's @OptIn.
64tasks.withType(KotlinCompile).configureEach {
65 kotlinOptions {
66 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
67 }
68}