compose-lobsters/app/build.gradle
Harsh Shandilya b3ee3f44c4
build: commonize application of kotlin-android plugin
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-23 17:19:11 +05:30

77 lines
3.1 KiB
Groovy

plugins {
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
final def keystorePropertiesFile = rootProject.file("keystore.properties")
android {
defaultConfig {
applicationId "dev.msfjarvis.lobsters"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions.coreLibraryDesugaringEnabled = true
buildFeatures.compose = true
composeOptions {
kotlinCompilerVersion "${kotlin_version}"
kotlinCompilerExtensionVersion "${compose_version}"
}
if (keystorePropertiesFile.exists()) {
final def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile rootProject.file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes.release.signingConfig = signingConfigs.release
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += ["-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check", "-Xopt-in=kotlin.RequiresOptIn"]
}
}
dependencies {
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
implementation(project(":data"))
implementation(project(":lobsters-api"))
implementation(project(":model"))
implementation 'androidx.core:core-ktx:1.5.0-alpha03'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
implementation "androidx.compose.foundation:foundation:$compose_version"
implementation "androidx.compose.foundation:foundation-layout:$compose_version"
implementation "androidx.compose.foundation:foundation-text:$compose_version"
implementation "androidx.compose.runtime:runtime:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose:compose-compiler:$compose_version"
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-text:$compose_version"
implementation "androidx.compose.ui:ui-text-android:$compose_version"
implementation "androidx.compose.ui:ui-unit:$compose_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-alpha07"
implementation "androidx.ui:ui-tooling:$compose_version"
implementation 'com.google.android.material:material:1.3.0-alpha02'
implementation "com.google.dagger:hilt-android:$hilt_version"
androidTestImplementation "com.google.dagger:hilt-android-testing:$hilt_version"
testImplementation 'junit:junit:4.13'
androidTestImplementation "androidx.ui:ui-test:$compose_version"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.0.10"
}