92 lines
2.9 KiB
Groovy
92 lines
2.9 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
}
|
|
|
|
android {
|
|
namespace 'com.alfred.demo'
|
|
compileSdk 32
|
|
|
|
defaultConfig {
|
|
minSdk 21
|
|
targetSdk 32
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
packagingOptions {
|
|
resources {
|
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
|
}
|
|
}
|
|
}
|
|
|
|
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.medici"
|
|
|
|
if ("$IS_SNAPSHOT" == "false") {
|
|
version = "$VERSION_NAME"
|
|
println("https://nexus.cmd.navi-tech.in/#browse/browse:maven-releases:com%2Fnavi%2Fmedici%2Falfred%2F$version")
|
|
} else {
|
|
version = "$VERSION_NAME-SNAPSHOT"
|
|
println("https://nexus.cmd.navi-tech.in/#browse/browse:maven-snapshots:com%2Fnavi%2Fmedici%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 'androidx.appcompat:appcompat:1.4.0'
|
|
implementation 'androidx.core:core-ktx:1.8.0'
|
|
implementation 'com.google.android.material:material:1.8.0'
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
|
|
implementation 'com.google.code.gson:gson:2.8.9'
|
|
|
|
testImplementation "junit:junit:4.13.2"
|
|
androidTestImplementation "androidx.test.ext:junit:1.1.4"
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
} |