build.gradle (2776B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 buildscript { 6 repositories { 7 gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository -> 8 maven { 9 url = repository 10 if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) { 11 allowInsecureProtocol = true 12 } 13 } 14 } 15 } 16 17 dependencies { 18 classpath libs.kotlin.serialization 19 } 20 } 21 22 apply plugin: 'com.android.library' 23 apply plugin: 'com.google.devtools.ksp' 24 apply plugin: 'kotlin-android' 25 apply plugin: 'kotlinx-serialization' 26 27 android { 28 defaultConfig { 29 ksp { 30 arg("room.schemaLocation", "$projectDir/schemas".toString()) 31 arg("room.generateKotlin", "true") 32 } 33 } 34 35 sourceSets { 36 test.assets.srcDirs += files("$projectDir/schemas".toString()) 37 androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) 38 } 39 40 buildFeatures { 41 buildConfig = true 42 } 43 44 namespace = 'mozilla.components.service.pocket' 45 } 46 47 dependencies { 48 implementation project(':components:concept-fetch') 49 implementation project(':components:support-base') 50 implementation project(':components:support-ktx') 51 52 implementation libs.androidx.core.ktx 53 implementation libs.androidx.room.runtime 54 ksp libs.androidx.room.compiler 55 implementation libs.androidx.work.runtime 56 implementation libs.kotlinx.coroutines 57 implementation libs.kotlinx.serialization.json 58 59 testImplementation project(':components:lib-fetch-httpurlconnection') 60 testImplementation project(':components:support-test') 61 62 testImplementation libs.androidx.arch.core.testing 63 testImplementation libs.androidx.concurrent 64 testImplementation libs.androidx.room.testing 65 testImplementation libs.androidx.test.core 66 testImplementation libs.androidx.test.junit 67 testImplementation libs.androidx.work.testing 68 testImplementation libs.kotlin.reflect 69 testImplementation libs.kotlinx.coroutines.test 70 testImplementation libs.robolectric 71 72 androidTestImplementation project(':components:support-android-test') 73 74 androidTestImplementation libs.androidx.arch.core.testing 75 androidTestImplementation libs.androidx.room.testing 76 androidTestImplementation libs.androidx.test.core 77 androidTestImplementation libs.androidx.test.rules 78 androidTestImplementation libs.androidx.test.runner 79 } 80 81 apply from: '../../../common-config.gradle' 82 apply from: '../../../publish.gradle' 83 ext.configurePublish(config.componentsGroupId, project.name, project.ext.description)