Fix version info

This commit is contained in:
Aleksandar Vidakovic
2022-01-09 06:18:44 +08:00
committed by Petri Tuomola
parent 34d11adbe6
commit 2ce901329c
3 changed files with 19 additions and 19 deletions
+6 -6
View File
@@ -59,10 +59,10 @@ plugins {
id 'com.github.jk1.dependency-license-report' version '2.0' apply false
id 'org.openapi.generator' version '4.3.1' apply false
id 'org.zeroturnaround.gradle.jrebel' version '1.1.11' apply false
id 'org.springframework.boot' version '2.6.1' apply false
id 'org.springframework.boot' version '2.6.2' apply false
id 'net.ltgt.errorprone' version '2.0.2' apply false
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.1.11' apply false
id 'com.gorylenko.gradle-git-properties' version '2.3.1' apply false
id 'com.gorylenko.gradle-git-properties' version '2.3.2' apply false
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
id 'org.asciidoctor.jvm.epub' version '3.3.2' apply false
@@ -108,8 +108,8 @@ allprojects {
// https://github.com/spring-gradle-plugins/dependency-management-plugin
dependencyManagement {
imports {
mavenBom 'org.springframework:spring-framework-bom:5.3.12'
mavenBom 'org.springframework.boot:spring-boot-dependencies:2.6.1'
mavenBom 'org.springframework:spring-framework-bom:5.3.14'
mavenBom 'org.springframework.boot:spring-boot-dependencies:2.6.2'
mavenBom 'org.junit:junit-bom:5.8.1'
}
@@ -149,7 +149,6 @@ allprojects {
dependency 'org.mock-server:mockserver-junit-jupiter:5.11.2'
dependency 'org.webjars.npm:swagger-ui-dist:4.0.1'
dependency 'org.webjars:webjars-locator-core:0.48'
dependency 'org.springframework.boot:spring-boot-starter-mail:2.6.1'
dependency 'com.icegreen:greenmail-junit5:1.6.5'
// fineract client dependencies
@@ -226,7 +225,7 @@ allprojects {
spotless {
format 'misc', {
target '**/*.md', '**/*.properties', '**/.gitignore', '**/.openapi-generator-ignore', '**/*.yml', '**/*.xml', '**/**.json', '**/*.sql'
targetExclude '**/build/**', '**/bin/**', '**/.settings/**', '**/.idea/**', '**/.gradle/**', '**/gradlew.bat', '**/licenses/**'
targetExclude '**/build/**', '**/bin/**', '**/.settings/**', '**/.idea/**', '**/.gradle/**', '**/gradlew.bat', '**/licenses/**', '**/banner.txt'
indentWithSpaces(4)
endWithNewline()
trimTrailingWhitespace()
@@ -257,6 +256,7 @@ allprojects {
"**/keystore.jks",
"**/static/swagger-ui/**",
"**/api-docs/**",
"**/banner.txt",
])
strictCheck true
}
+3 -13
View File
@@ -98,22 +98,15 @@ compileJava.doLast {
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
import org.apache.tools.ant.filters.ReplaceTokens
task prepareInputYaml(dependsOn: 'generateGitProperties') {
task prepareInputYaml {
outputs.file('config/swagger/fineract-input.yaml')
doLast {
def versionForSwagger
if(project.ext.properties.containsKey("gitProps"))
versionForSwagger = project.ext.gitProps['git.commit.id.describe']
else
versionForSwagger = "unknown"
copy {
from file('config/swagger/fineract-input.yaml.template')
into file('config/swagger')
rename { String filename -> return 'fineract-input.yaml' }
filter(ReplaceTokens, tokens: [VERSION: versionForSwagger])
filter(ReplaceTokens, tokens: [VERSION: "${project.version}".toString()])
}
}
}
@@ -258,7 +251,7 @@ springBoot {
bootJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher', 'Implementation-Title': 'Apache Fineract', 'Implementation-Version': archiveVersion
}
dependsOn resolve
classifier = ''
@@ -427,11 +420,8 @@ gitProperties {
dateFormat = "yyyy-MM-dd'T'HH:mmZ"
dateFormatTimeZone = "GMT"
failOnNoGitDirectory = false
extProperty = 'gitProps'
}
processResources.dependsOn generateGitProperties
// make sure the generateGitProperties task always executes (even when git.properties is not changed)
generateGitProperties.outputs.upToDateWhen { false }
@@ -0,0 +1,10 @@
_ _ _____ _ _
/ \ _ __ __ _ ___| |__ ___ | ___(_)_ __ ___ _ __ __ _ ___| |_
/ _ \ | '_ \ / _` |/ __| '_ \ / _ \ | |_ | | '_ \ / _ \ '__/ _` |/ __| __|
/ ___ \| |_) | (_| | (__| | | | __/ | _| | | | | | __/ | | (_| | (__| |_
/_/ \_\ .__/ \__,_|\___|_| |_|\___| |_| |_|_| |_|\___|_| \__,_|\___|\__|
|_|
${AnsiStyle.FAINT}${AnsiColor.WHITE}Powered by Spring Boot ${spring-boot.version}${AnsiColor.BLACK}