Last active
August 16, 2019 08:09
-
-
Save jlafourc/379da4500d205ca88e151c3803f06ade to your computer and use it in GitHub Desktop.
Gradle scripts to generate a BOM and then consume that BOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "io.spring.dependency-management" version "1.0.0.RC2" | |
} | |
project.group = com.company | |
project.version = 1.0.0 | |
project.ext.name = company-project | |
dependencyManagement { | |
imports { | |
mavenBom('com.company:company-bom:1.0.0') { | |
bomProperty 'spring.version', '4.0.4.RELEASE' | |
} | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "io.spring.dependency-management" version "1.0.0.RC2" | |
} | |
apply plugin: 'maven-publish' | |
project.group = com.company | |
project.version = 1.0.0 | |
project.ext.name = company-bom | |
dependencyManagement { | |
properties { | |
property 'spring.version:4.1.1.RELEASE' | |
} | |
dependencies { | |
dependency 'org.springframework:spring-core:${spring.version}' | |
dependency group:'commons-logging', name:'commons-logging', version:'1.1.2' | |
} | |
} | |
publishing { | |
publications { | |
mavenJava(MavenPublication) { | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "io.spring.dependency-management" version "1.0.0.RC2" | |
} | |
apply plugin: 'maven-publish' | |
project.group = com.company | |
project.version = 1.0.0 | |
project.ext.name = company-bom | |
dependencyManagement { | |
dependencies { | |
dependency 'org.springframework:spring-core:${spring.version}' // where do I specify a default spring.version ? | |
dependency group:'commons-logging', name:'commons-logging', version:'1.1.2' | |
} | |
} | |
publishing { | |
publications { | |
mavenJava(MavenPublication) { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting versions from project properties is broken in 1.0.6.RELEASE version of plugin. spring-gradle-plugins/dependency-management-plugin#17 Seems regression.