Using spring-boot Gradle plugin but getting spring boot version from dependency management -
i have gradle setup need hard code spring-boot version. possible dependency management instead? issue occurs in project module contains actual code. there need call :
springboot { requiresunpack = ["com.example:util"] } in order need apply spring-boot plugin. plugin available need have dependency "org.springframework.boot:spring-boot-gradle-plugin:${springbootversion}". , need specify springbootversion hard coded...
this parent gradle file:
buildscript { ext { springbootversion = '1.4.0.release' } repositories { mavencentral() jcenter() } dependencies { classpath "org.springframework.boot:spring-boot-gradle-plugin:${springbootversion}" classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.release' } } plugins { id "io.spring.dependency-management" version "0.6.0.release" } group 'test' repositories { mavencentral() } allprojects { apply plugin: 'java' apply plugin: 'io.spring.dependency-management' dependencymanagement { imports { // note these 2 bom's not easy combine, define cloud first , try find versions same version of spring-boot when upgrading. mavenbom 'org.springframework.cloud:spring-cloud-starter-parent:brixton.sr5' mavenbom 'io.spring.platform:platform-bom:2.0.7.release' } } } and module gradle file:
group = "test" apply plugin: 'spring-boot' apply plugin: 'io.spring.dependency-management' sourcecompatibility = 1.8 targetcompatibility = 1.8 // temporary fix jersey springboot { requiresunpack = ["com.example:util"] } if remove dependency spring-boot-gradle-plugin in parent gradle file, cannot use apply plugin: 'spring-boot' in module gradle file , without gradle dls method springboot { not defined...
can achieve without having hard code springbootversion = '1.4.0.release'in parent gradle file?
Comments
Post a Comment