ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
191 stars 28 forks source link

gradle build version number value not incrementing #192

Closed lalit-pralhad-choudhary-db closed 2 years ago

lalit-pralhad-choudhary-db commented 2 years ago

I am new to reckon plugin and I have setup reckon 0.13.2 version, I am facing two issues while running gradle build with reckon Issue 1) once my build completed succesfully it is creating file with below name example-1.1.0-SNAPSHOT-example.jar minor don't know from where it is taking SNAPSHOT name even it minor or major build

Issue 2) version numbers are not incrementing ./gradlew clean build reckonTagCreate publish -Preckon.scope=minor -Preckon.stage=final after running above command it always create example-1.1.0-SNAPSHOT-example.jar it should create example 1.2.0

could you please guide me to setup the reckon

versioning.gradle:

apply plugin: 'org.ajoberstar.grgit' apply plugin: 'org.ajoberstar.reckon'

// by default, increment patch number instead of minor if (!hasProperty('reckon.scope')) { ext.set('reckon.scope', 'patch') } if (gradle.startParameter.taskNames.contains('release')) { ext.set('reckon.stage', 'final') } else { ext.set('reckon.stage', 'SNAPSHOT') }

reckon { reckon.scopeFromProp() reckon.snapshotFromProp() }

task outputVersion { doLast { file('latest-build.version').text = project.version } }

build.dependsOn outputVersion

====== release.gradle task release

allprojects { reckonTagCreate.dependsOn build artifactoryPublish.dependsOn reckonTagPush release.dependsOn artifactoryPublish }