diff --git a/README.md b/README.md index 489534e..769927b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,13 @@ In order to use GradleMavenizer you have to add the line `apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/gradle-mavenizer.gradle'` -at the very bottom of the *build.gradle* file. +at the very bottom of the *build.gradle* file. Alternatively, to use a specific release version, add this property to the project (see Releases at the top of the Github page for released versions): + + mavPluginVersion = '1.0' + +and add this line to the very bottom of the *build.gradle* file: + + apply from: "https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/${project.mavPluginVersion}/gradle-mavenizer.gradle"` ## Customization GradleMavenizer is highly customizable. diff --git a/gradle-mavenizer.gradle b/gradle-mavenizer.gradle index a3350d3..88cbbdb 100644 --- a/gradle-mavenizer.gradle +++ b/gradle-mavenizer.gradle @@ -1,8 +1,10 @@ apply plugin: 'maven-publish' -apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/artifact-javadoc-handler.gradle' -apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/artifact-pom-manager.gradle' -apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/utils.gradle' +githubCommitIdentifier = project.hasProperty('mavPluginVersion') ? project.mavPluginVersion : 'master' + +apply from: "https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/${githubCommitIdentifier}/artifact-javadoc-handler.gradle" +apply from: "https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/${githubCommitIdentifier}/artifact-pom-manager.gradle" +apply from: "https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/${githubCommitIdentifier}/utils.gradle" project.afterEvaluate { publishing {