Skip to content

Commit

Permalink
[INJIMOB-890] Added dynamic file name code (#125)
Browse files Browse the repository at this point in the history
* [INJIMOB-890]: add dynamic name to release aar file

Signed-off-by: Ayushi Dey <ayushirakshitdey@gmail.com>

* [INJIMOB-890]: modified aar dynamic name

Signed-off-by: Ayushi Dey <ayushirakshitdey@gmail.com>

* [INJIMOB-890]: changed debug aar name

Signed-off-by: Ayushi Dey <ayushirakshitdey@gmail.com>

---------

Signed-off-by: Ayushi Dey <ayushirakshitdey@gmail.com>
  • Loading branch information
AyushiDey authored May 6, 2024
1 parent 57f64d3 commit cd7a064
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions android/publish-artifact.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ publishing {
repositories {
maven {
url = System.getenv("OSSRH_URL")
println("URL Value: $url")
name = "tuvali"
credentials {
username = System.getenv("OSSRH_USER")
Expand All @@ -14,7 +13,6 @@ publishing {
aar(MavenPublication) {
pom {
withXml {
//add license node ; add Developer Node
def dependenciesNode = asNode().appendNode('dependencies')
project.configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
Expand Down Expand Up @@ -82,7 +80,14 @@ publishing {
groupId = "io.mosip"
artifactId = "tuvali"
version = "1.0-SNAPSHOT"
artifact("build/outputs/aar/android-debug.aar")
if (project.gradle.startParameter.taskNames.any { it.contains('assembleRelease') }) {
artifacts {
aar {
archivesBaseName = "${artifactId}-${version}"
}
}
}
artifact("build/outputs/aar/${archivesBaseName}-release.aar")
}
}
}

0 comments on commit cd7a064

Please sign in to comment.