blob: ad4ece3b1bc47e95f4b59a833849585243c87be1 [file] [log] [blame]
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("app.cash.sqldelight")
id("com.google.dagger.hilt.android")
id("kotlin-kapt")
id("kotlin-parcelize")
}
ext {
compose_version = '1.4.3'
}
def gitSha() {
return 'git rev-parse --short HEAD'.execute().text.trim()
}
android {
namespace 'org.leakcanary'
compileSdk versions.compileSdk
defaultConfig {
applicationId "org.leakcanary"
// 21 required by Compose
minSdk 21
targetSdk versions.compileSdk
buildConfigField "String", "GIT_SHA", "\"${gitSha()}\""
// TODO Figure out versioning scheme. Should this follow LeakCanary releases?
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
debug
release {
// TODO Enable R8 minification
// minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// TODO Proper signing config
signingConfig signingConfigs.debug
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.7'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation projects.leakcanary.leakcanaryAppAidl
// TODO Move these to ./gradle/libs/versions/toml
implementation "app.cash.sqldelight:android-driver:2.0.0-alpha05"
implementation "app.cash.sqldelight:coroutines-extensions:2.0.0-alpha05"
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1'
implementation 'androidx.activity:activity-compose:1.5.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.compose.material3:material3:1.0.0-beta02'
implementation 'androidx.sqlite:sqlite-framework:2.2.0'
implementation 'me.saket.extendedspans:extendedspans:1.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
// TODO Split out what's included in debug vs the subset for release
implementation projects.leakcanary.leakcanaryAndroid
implementation 'com.google.dagger:hilt-android:2.43.2'
implementation libs.okio2
kapt 'com.google.dagger:hilt-compiler:2.43.2'
}
kapt {
correctErrorTypes true
}