Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

Commit

Permalink
Experimental release plugin for semver-vcs
Browse files Browse the repository at this point in the history
Intended to meet #120
  • Loading branch information
ajoberstar committed Aug 20, 2015
1 parent 749dcee commit 7d87e24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ajoberstar.gradle.git.release.base
package org.ajoberstar.gradle.git.release.experimental

import org.gradle.api.GradleException
import org.gradle.api.Plugin
Expand All @@ -23,7 +23,9 @@ import org.slf4j.Logger
import org.slf4j.LoggerFactory

/**
*
* Experimental release plugin that removes some previous coupling to extensions.
* Inteded to support semver-vcs, but may serve as a better minimal base.
* @since 1.3.0
*/
class SemverVcsReleasePlugin implements Plugin<Project> {
private static final Logger logger = LoggerFactory.getLogger(SemverVcsReleasePlugin)
Expand All @@ -32,11 +34,11 @@ class SemverVcsReleasePlugin implements Plugin<Project> {

void apply(Project project) {
project.plugins.apply('org.ajoberstar.grgit')
addPrepareTask(project, extension)
addReleaseTask(project, extension)
addPrepareTask(project)
addReleaseTask(project)
}

private void addPrepareTask(Project project, ReleasePluginExtension extension) {
private void addPrepareTask(Project project) {
project.tasks.create(PREPARE_TASK_NAME) {
description = 'Verifies that the project could be released.'
doLast {
Expand All @@ -56,7 +58,7 @@ class SemverVcsReleasePlugin implements Plugin<Project> {
}
}

private void addReleaseTask(Project project, ReleasePluginExtension extension) {
private void addReleaseTask(Project project) {
project.tasks.create(RELEASE_TASK_NAME) {
description = 'Releases this project.'
dependsOn PREPARE_TASK_NAME
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=org.ajoberstar.gradle.git.release.experimental.ExperimentalReleasePlugin

0 comments on commit 7d87e24

Please # to comment.