| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 1 | /* |
| Jakub Gielzak | 8a66626 | 2019-10-30 15:50:45 +0000 | [diff] [blame] | 2 | * Copyright 2019 The Android Open Source Project |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 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 | |
| Owen Gray | 74cc259 | 2020-09-24 15:05:40 -0400 | [diff] [blame] | 17 | import androidx.build.LibraryGroups |
| 18 | import androidx.build.LibraryType |
| Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 19 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 20 | |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 21 | import static androidx.build.dependencies.DependenciesKt.* |
| Jakub Gielzak | 874198a | 2019-10-23 17:26:56 +0100 | [diff] [blame] | 22 | |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 23 | plugins { |
| 24 | id("AndroidXPlugin") |
| 25 | id("com.android.library") |
| Jakub Gielzak | 71e1a69 | 2019-10-23 17:42:00 +0100 | [diff] [blame] | 26 | id("kotlin-android") |
| Sergey Vasilinets | 4e97056 | 2019-12-12 13:39:19 +0000 | [diff] [blame] | 27 | id("androidx.inspection") |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | dependencies { |
| Nick Anthony | a356776 | 2019-12-13 14:33:50 -0500 | [diff] [blame] | 31 | api("androidx.annotation:annotation:1.1.0") |
| Sergey Vasilinets | 95f91db | 2020-01-13 20:21:29 +0000 | [diff] [blame] | 32 | compileOnly(project(":inspection:inspection")) |
| Jakub Gielzak | 71e1a69 | 2019-10-23 17:42:00 +0100 | [diff] [blame] | 33 | |
| Jakub Gielzak | 8a66626 | 2019-10-30 15:50:45 +0000 | [diff] [blame] | 34 | androidTestImplementation(project(":inspection:inspection-testing")) |
| Jakub Gielzak | 71e1a69 | 2019-10-23 17:42:00 +0100 | [diff] [blame] | 35 | androidTestImplementation(KOTLIN_STDLIB) |
| 36 | androidTestImplementation(ANDROIDX_TEST_RUNNER) |
| 37 | androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT) |
| 38 | androidTestImplementation(TRUTH) |
| Jakub Gielzak | 8a66626 | 2019-10-30 15:50:45 +0000 | [diff] [blame] | 39 | androidTestImplementation(KOTLIN_COROUTINES_ANDROID) |
| 40 | androidTestImplementation(KOTLIN_COROUTINES_TEST) |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 41 | } |
| 42 | |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 43 | androidx { |
| 44 | name = "Android SQLite Inspector" |
| Owen Gray | 74cc259 | 2020-09-24 15:05:40 -0400 | [diff] [blame] | 45 | type = LibraryType.IDE_PLUGIN |
| Rahul Ravikumar | 4419842 | 2019-11-18 11:18:09 -0800 | [diff] [blame] | 46 | // Decouple SQLITE_INSPECTOR because it depends on |
| 47 | // the inspection protocol, which is alpha |
| Rahul Ravikumar | 4419842 | 2019-11-18 11:18:09 -0800 | [diff] [blame] | 48 | mavenGroup = LibraryGroups.INSPECTION_EXTENSIONS |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 49 | inceptionYear = "2019" |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 50 | description = "The implementation of SQLite Inspector." |
| Sergey Vasilinets | 1cde9f6 | 2019-10-02 21:48:15 +0100 | [diff] [blame] | 51 | } |
| Jakub Gielzak | 44a83b9 | 2019-10-29 12:47:35 +0000 | [diff] [blame] | 52 | |
| 53 | android { |
| Sergey Vasilinets | 8cf6fc5 | 2020-03-11 18:40:13 +0000 | [diff] [blame] | 54 | defaultConfig { |
| 55 | // studio pipeline works only starting with Android O |
| 56 | minSdkVersion 26 |
| 57 | } |
| Sergey Vasilinets | 95f91db | 2020-01-13 20:21:29 +0000 | [diff] [blame] | 58 | sourceSets { |
| 59 | main.resources.srcDirs += "src/main/proto" |
| 60 | } |
| Jakub Gielzak | 44a83b9 | 2019-10-29 12:47:35 +0000 | [diff] [blame] | 61 | } |
| Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 62 | |
| 63 | // Allow usage of Kotlin's @OptIn. |
| 64 | tasks.withType(KotlinCompile).configureEach { |
| 65 | kotlinOptions { |
| 66 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
| 67 | } |
| 68 | } |