Files
alfred-android/navi-alfred/build.gradle

119 lines
3.4 KiB
Groovy
Raw Normal View History

2023-04-19 18:14:20 +05:30
plugins {
2024-01-04 17:55:52 +05:30
alias libs.plugins.android.library
alias libs.plugins.kotlin.android
alias libs.plugins.kotlin.parcelize
alias libs.plugins.ksp
2023-04-27 15:43:35 +05:30
id 'maven-publish'
2023-04-19 18:14:20 +05:30
}
def VERSION = "1.0.20"
2023-04-27 15:43:35 +05:30
2023-04-19 18:14:20 +05:30
android {
namespace 'com.navi.alfred'
compileSdk 34
2023-04-19 18:14:20 +05:30
defaultConfig {
minSdk 21
targetSdk 33
2023-04-19 18:14:20 +05:30
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildFeatures {
buildConfig true
}
2023-04-19 18:14:20 +05:30
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
2023-04-19 18:14:20 +05:30
}
kotlinOptions {
jvmTarget = '17'
2023-04-19 18:14:20 +05:30
}
}
2023-04-27 15:28:25 +05:30
publishing {
repositories {
if (project.hasProperty('NEXUS_URL')
&& project.hasProperty('NEXUS_USERNAME')
&& project.hasProperty('NEXUS_PASSWORD')) {
2023-04-27 15:28:25 +05:30
maven {
url = "$NEXUS_URL"
credentials {
username = "$NEXUS_USERNAME"
password = "$NEXUS_PASSWORD"
}
}
}
}
2023-04-27 15:43:35 +05:30
publications {
if (project.hasProperty('NEXUS_URL')) {
maven(MavenPublication) {
artifactId = "alfred"
2023-10-18 15:24:28 +05:30
groupId = "com.navi.android"
2023-04-27 15:30:58 +05:30
2023-04-27 15:43:35 +05:30
if ("$IS_SNAPSHOT" == "false") {
version = "$VERSION"
2023-10-18 15:24:28 +05:30
println("https://nexus.cmd.navi-tech.in/#browse/browse:maven-releases:com%2Fnavi%2Fandroid%2Falfred%2F$version")
2023-04-27 15:43:35 +05:30
} else {
version = "$VERSION-SNAPSHOT"
2023-10-18 15:24:28 +05:30
println("https://nexus.cmd.navi-tech.in/#browse/browse:maven-snapshots:com%2Fnavi%2Fandroid%2Falfred%2F$version")
2023-04-27 15:43:35 +05:30
}
2023-04-27 15:28:25 +05:30
2023-04-27 15:43:35 +05:30
artifact("build/outputs/aar/navi-alfred-release.aar")
2023-04-27 15:28:25 +05:30
2023-04-27 15:43:35 +05:30
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)
}
2023-04-27 15:28:25 +05:30
}
}
}
}
}
2023-04-19 18:14:20 +05:30
dependencies {
2024-01-04 17:55:52 +05:30
api platform(libs.firebase.bom)
implementation libs.android.material
implementation libs.androidx.appcompat
implementation libs.androidx.core.ktx
implementation libs.androidx.room.ktx
implementation libs.androidx.room.runtime
implementation libs.androidx.workRuntime.ktx
implementation libs.gson
implementation libs.jakewharton.timber
debugImplementation libs.chucker.library
releaseImplementation libs.chucker.libraryNoOp
api libs.firebase.analytics
api libs.firebase.crashlytics
api libs.logging.interceptor
api libs.retrofit.converter.gson
api libs.retrofit.retrofit
ksp libs.androidx.room.compiler
androidTestImplementation libs.androidx.test.espresso.core
androidTestImplementation libs.androidx.test.junit
testImplementation libs.androidx.room.testing
testImplementation libs.junit
}