189 lines
6.1 KiB
Groovy
189 lines
6.1 KiB
Groovy
/*
|
|
* Copyright 2020 Shreyas Patil
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-kapt'
|
|
id 'dagger.hilt.android.plugin'
|
|
id 'dev.shreyaspatil.compose-compiler-report-generator'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion ProjectConfig.compileSdkVersion
|
|
|
|
defaultConfig {
|
|
applicationId "dev.shreyaspatil.noty.composeapp"
|
|
minSdkVersion ProjectConfig.minSdkVersion
|
|
targetSdkVersion ProjectConfig.targetSdkVersion
|
|
versionCode ProjectConfig.versionCode
|
|
versionName ProjectConfig.versionName
|
|
|
|
testInstrumentationRunner "dev.shreyaspatil.noty.composeapp.HiltComposeApplicationRunner"
|
|
}
|
|
|
|
packagingOptions {
|
|
resources {
|
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
testCoverageEnabled false
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion composeCompilerVersion
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
packagingOptions {
|
|
exclude 'META-INF/LICENSE.txt'
|
|
exclude 'META-INF/LICENSE.md'
|
|
exclude 'META-INF/NOTICE.txt'
|
|
exclude 'META-INF/NOTICE'
|
|
exclude 'META-INF/LICENSE'
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
}
|
|
namespace 'dev.shreyaspatil.noty.composeapp'
|
|
|
|
}
|
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
}
|
|
|
|
kapt {
|
|
correctErrorTypes true
|
|
}
|
|
|
|
dependencies {
|
|
// Kotlin Stdlib
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
|
|
|
|
// Core Module
|
|
implementation project(":core")
|
|
|
|
// Common App Module
|
|
implementation project(":app")
|
|
|
|
// Android
|
|
implementation "androidx.core:core-ktx:$coreKtxVersion"
|
|
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
|
|
|
implementation "androidx.constraintlayout:constraintlayout-compose:$composeConstraintLayoutVersion"
|
|
|
|
// Material Design
|
|
implementation "com.google.android.material:material:$materialDesignVersion"
|
|
|
|
// Lottie Compose
|
|
implementation "com.airbnb.android:lottie-compose:$lottieComposeVersion"
|
|
|
|
// Compose
|
|
implementation platform("androidx.compose:compose-bom:$composeBomVersion")
|
|
testImplementation platform("androidx.compose:compose-bom:$composeBomVersion")
|
|
androidTestImplementation platform("androidx.compose:compose-bom:$composeBomVersion")
|
|
implementation "androidx.activity:activity-compose:$activityVersion"
|
|
implementation "androidx.compose.runtime:runtime"
|
|
implementation "androidx.compose.ui:ui"
|
|
implementation "androidx.compose.foundation:foundation"
|
|
implementation "androidx.compose.foundation:foundation-layout"
|
|
implementation "androidx.compose.material:material"
|
|
implementation "androidx.compose.material:material-icons-core"
|
|
implementation "androidx.compose.material:material-icons-extended"
|
|
debugImplementation "androidx.compose.ui:ui-tooling"
|
|
implementation "androidx.compose.ui:ui-tooling-preview"
|
|
implementation "androidx.compose.runtime:runtime-livedata"
|
|
|
|
// Dagger + Hilt
|
|
implementation "com.google.dagger:hilt-android:$daggerHiltVersion"
|
|
kapt "com.google.dagger:hilt-android-compiler:$daggerHiltVersion"
|
|
|
|
// Hilt + Jetpack
|
|
implementation "androidx.hilt:hilt-work:$jetpackHiltVersion"
|
|
|
|
// Hilt + Navigation
|
|
implementation "androidx.hilt:hilt-navigation-fragment:$jetpackHiltVersion"
|
|
|
|
// WorkManager
|
|
implementation "androidx.work:work-runtime-ktx:$workmanagerVersion"
|
|
|
|
// Lifecycle
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion"
|
|
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
|
|
implementation "androidx.lifecycle:lifecycle-runtime-compose:$lifecycleVersion"
|
|
|
|
// Navigation
|
|
implementation "androidx.navigation:navigation-compose:$composeNavVersion"
|
|
|
|
// Hilt Compose Navigation
|
|
implementation "androidx.hilt:hilt-navigation-compose:$hiltComposeNavVersion"
|
|
|
|
// Capturable
|
|
implementation "dev.shreyaspatil:capturable:$capturableVersion"
|
|
|
|
// Testing
|
|
testImplementation "junit:junit:$jUnitVersion"
|
|
|
|
// Android Testing
|
|
androidTestImplementation "androidx.test:core:$androidTestCoreVersion"
|
|
androidTestImplementation "androidx.test:runner:$androidTestRunnerVersion"
|
|
androidTestImplementation "androidx.test.ext:junit:$androidJUnitVersion"
|
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
|
// Needed for createComposeRule, but not createAndroidComposeRule:
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
|
|
|
// Hilt for testing
|
|
androidTestImplementation "com.google.dagger:hilt-android-testing:$daggerHiltVersion"
|
|
kaptAndroidTest "com.google.dagger:hilt-android-compiler:$daggerHiltVersion"
|
|
|
|
// WorkManager for testing
|
|
androidTestImplementation "androidx.work:work-testing:$workmanagerVersion"
|
|
|
|
// Leak Canary
|
|
// Uncomment this when have to check for leaks
|
|
// debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
|
}
|
|
|
|
htmlComposeCompilerReport {
|
|
name = "NotyKT"
|
|
}
|