Files
alfred-android/navi-alfred/build.gradle
2023-11-06 16:07:04 +05:30

118 lines
4.0 KiB
Groovy

plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'maven-publish'
id 'kotlin-parcelize'
}
def VERSION_NAME = "1.0.5.2"
android {
namespace 'com.navi.alfred'
compileSdk 32
defaultConfig {
minSdk 21
targetSdk 31
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "app"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
static def formatString(String value) {
return '"' + value + '"'
}
publishing {
repositories {
if (project.hasProperty('NEXUS_URL')) {
maven {
url = "$NEXUS_URL"
credentials {
username = "$NEXUS_USERNAME"
password = "$NEXUS_PASSWORD"
}
}
}
}
publications {
if (project.hasProperty('NEXUS_URL')) {
maven(MavenPublication) {
artifactId = "alfred"
groupId = "com.navi.android"
if ("$IS_SNAPSHOT" == "false") {
version = "$VERSION_NAME"
println("https://nexus.cmd.navi-tech.in/#browse/browse:maven-releases:com%2Fnavi%2Fandroid%2Falfred%2F$version")
} else {
version = "$VERSION_NAME-SNAPSHOT"
println("https://nexus.cmd.navi-tech.in/#browse/browse:maven-snapshots:com%2Fnavi%2Fandroid%2Falfred%2F$version")
}
artifact("build/outputs/aar/navi-alfred-release.aar")
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
dependencies {
implementation 'com.google.android.material:material:1.8.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.core:core-ktx:1.6.0'
implementation "androidx.appcompat:appcompat:1.5.1"
implementation "com.google.android.material:material:1.7.0"
// Timber for logging
implementation 'com.jakewharton.timber:timber:5.0.1'
// Gson
implementation 'com.google.code.gson:gson:2.9.0'
// Firebase SDK for Push Notification
api 'com.google.firebase:firebase-analytics-ktx'
// Firebase SDK for Google Analytics (Kotlin)
api 'com.google.firebase:firebase-crashlytics:18.3.6'
// Import the BoM for the Firebase platform
api platform('com.google.firebase:firebase-bom:30.1.0')
implementation "androidx.room:room-runtime:2.4.3"
// Kotlin + coroutines
implementation "androidx.work:work-runtime-ktx:2.7.1"
// To use Kotlin annotation processing tool (kapt)
kapt "androidx.room:room-compiler:2.4.3"
// optional - Kotlin Extensions and Coroutines support for Room
implementation "androidx.room:room-ktx:2.4.3"
api "com.squareup.retrofit2:retrofit:2.9.0"
api 'com.squareup.retrofit2:converter-gson:2.9.0'
api 'com.squareup.okhttp3:logging-interceptor:4.9.0'
debugImplementation 'com.github.chuckerteam.chucker:library:3.5.2'
releaseImplementation 'com.github.chuckerteam.chucker:library-no-op:3.5.2'
testImplementation "androidx.room:room-testing:2.4.3"
}