Skip to content

Commit

Permalink
chore: fix gradle files
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdebs committed Aug 1, 2023
1 parent 3d74168 commit e9f9023
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ apply from: rootProject.file('gradle/promote.gradle')
apply from: rootProject.file('gradle/codecov.gradle')
subprojects {
group GROUP
version getVersionName()
version getVersionName(VERSION_NAME)
}
2 changes: 1 addition & 1 deletion gradle/mvn-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publishing {
// we'll set up in a moment
groupId GROUP
artifactId POM_ARTIFACT_ID
version getVersionName()
version getVersionName(VERSION_NAME)
if (POM_PACKAGING == "aar") {
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
} else {
Expand Down
2 changes: 1 addition & 1 deletion gradle/promote.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply from: rootProject.file('gradle/versioning.gradle')

group GROUP
version getVersionName()
version getVersionName(VERSION_NAME)
//project.logger.info("Signing id: ${hasProperty("signing.keyId")}")
// Create variables with empty default values
ext["signing.keyId"] = ''
Expand Down
6 changes: 5 additions & 1 deletion gradle/versioning.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ def isReleaseBuild() {
}

def getVersionName() { // If not release build add SNAPSHOT suffix
return isReleaseBuild() ? VERSION_NAME : VERSION_NAME+"-SNAPSHOT"
return getVersionName(VERSION_NAME)
}
def getVersionName(version) { // If not release build add SNAPSHOT suffix
println("versioning call:$version")
return isReleaseBuild() ? version : version+"-SNAPSHOT"
}

ext {
Expand Down

0 comments on commit e9f9023

Please sign in to comment.