xref: /aosp_15_r20/external/leakcanary2/leakcanary-android-release/build.gradle (revision d9e8da70d8c9df9a41d7848ae506fb3115cae6e6)
1plugins {
2  id("com.android.library")
3  id("org.jetbrains.kotlin.android")
4  id("com.vanniktech.maven.publish")
5}
6
7dependencies {
8  api projects.sharkAndroid
9  api projects.leakcanaryAndroidUtils
10
11  implementation libs.kotlin.stdlib
12  implementation libs.okio2
13}
14
15def gitSha() {
16  return 'git rev-parse --short HEAD'.execute().text.trim()
17}
18
19android {
20  resourcePrefix 'leak_canary_'
21  compileSdk versions.compileSdk
22  defaultConfig {
23    minSdk 16
24    buildConfigField "String", "LIBRARY_VERSION", "\"${rootProject.ext.VERSION_NAME}\""
25    buildConfigField "String", "GIT_SHA", "\"${gitSha()}\""
26    consumerProguardFiles 'consumer-proguard-rules.pro'
27  }
28  lintOptions {
29    disable 'GoogleAppIndexingWarning'
30    error 'ObsoleteSdkInt'
31    checkOnly 'Interoperability'
32  }
33}
34