Last active
January 19, 2018 21:50
-
-
Save sebersole/3397d9afa7ec7dc0901eec5d1696c7cc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| provision { | |
| url = 'https://intranet.mycorp.com/dev/nexus' | |
| override( 'org.hibernate:core` ) { | |
| version = '5.3.0.Final' | |
| } | |
| override( 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api' ) { | |
| groupId = 'javax.persistence' | |
| artifactId = 'javax.persistence-api' | |
| version = '2.2' | |
| ) | |
| } |
This file contains hidden or 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
| class ProvisionOverride { | |
| private final String match; | |
| private String replacementGroupId; | |
| private String replacementArtifactId; | |
| private String replacementVersion; | |
| public String getVersion() { | |
| return replacementVersion; | |
| } | |
| public void setVersion(String version) { | |
| this.replacementVersion = version; | |
| } | |
| ... | |
| } |
This file contains hidden or 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
| class ProvisionTask { | |
| .... | |
| List<ProvisionOverride> overrides = new ...; | |
| public void override(String match, Closure closure) { | |
| ProvisionOverride override = new ProvisionOverride( match ); | |
| getProject().configure( override, closure ); | |
| overrides.add( override ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment