I have a standard spring-boot project with org.springframework.boot:spring-boot-gradle-plugin
. i know i can override dependency version with e.g.
ext['slf4j.version'] = '1.7.5'
but how can i get the version currently imported by spring-boot plugin so i can use it later in the script? for example:
currentSlf4jVersion = xxx('slf4j.version')
In Spring boot application, you can easily obtain the info by altering the Spring Boot Maven/Gradle plugin configuration to generate the build. properties file and then accessing it through BuildProperties object.
Go to Android Studio -> Preferences -> Plugins (for Mac) and File -> Settings -> Plugins (for windows) and search “Check for Dependency updates plugin”. Install it and restart android studio. You will be able to see Dependencies tab on the right which will show if any dependency has a new update available.
You are going to need to update gradle, as newer spring boot versions are incompatible with older versions of gradle. You can either download the new gradle manually or use gradle wrapper to set the version for your project.
The dependency management plugin that Spring Boot's plugin applies for you provides programmatic access to the properties in imported boms.
You can get the value of the slf4j.version
property like this:
dependencyManagement.importedProperties['slf4j.version']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With