[Release Automation] Chaining the tasks into one complete release process.  Missing the dependency on the Nexus upload at the moment, which is only a tiny bit important.
[Release Automation] Chaining the tasks into one complete release process.  Missing the dependency on the Nexus upload at the moment, which is only a tiny bit important.

package org.mongodb.morphia.release

import org.gradle.api.Plugin
import org.gradle.api.Project

//requires nexus plugin
class ReleasePlugin implements Plugin<Project> {
    private Project project

    @Override
    void apply(final Project project) {
        this.project = project
        project.extensions.create('release', ReleasePluginExtension)
        project.task('prepareRelease', type: PrepareReleaseTask)
        // upload to nexus
        project.task('draftReleaseNotes', type: DraftReleaseNotesTask, dependsOn: 'prepareRelease')
//        project.task('draftReleaseNotes', type: DraftReleaseNotesTask)
        project.task('updateToNextVersion', type: UpdateToNextVersionTask, dependsOn: 'draftReleaseNotes')
        project.task('publishJavadoc', type: PublishJavadocTask, dependsOn: 'updateToNextVersion')
        project.task('release', dependsOn: 'publishJavadoc')
    }
}


package org.mongodb.morphia.release

import org.gradle.api.Plugin
import org.gradle.api.Project

class ReleasePlugin implements Plugin<Project> {
    private Project project

    @Override
    void apply(final Project project) {
        this.project = project
        project.extensions.create('release', ReleasePluginExtension)
        project.task('draftReleaseNotes', type: DraftReleaseNotesTask)
        project.task('prepareRelease', type: PrepareReleaseTask)
        project.task('pushToRemote', type: PushToRemoteTask)
        project.task('updateToNextVersion', type: UpdateToNextVersionTask)
        project.task('publishJavadoc', type: PublishJavadocTask)
    }
}

