i tried updating sonarqube version dynamically in jenkins by adding sonar.projectVersion=${project.version} suggested at https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle or sonar.projectVersion=${$APP_BUILD_NUMBER} here APP_BUILD_NUMBER environmental variable but no use it considered as is version name.
Full Analysis property
# required metadata
sonar.projectKey=myproject
sonar.projectName=myproject
sonar.projectVersion=2.0.2
sonar.sourceEncoding=UTF-8
# path to source directories (required)
sonar.sources=src/main/java
# List of the module identifiers
sonar.modules=app,ui
ui.sonar.projectBaseDir=ui
# Properties can obviously be overriden for
# each module - just prefix them with the module ID
app.sonar.projectName=App
# Uncomment this line to analyse a project which is not a java project.
# The value of the property must be the key of the language.
sonar.language=java
# java version used by source files:
sonar.java.source=1.8