Skip to content

Commit

Permalink
Merge pull request #60 from 3flex/config-avoidance
Browse files Browse the repository at this point in the history
Avoid task configuration
  • Loading branch information
BreadMoirai authored Oct 11, 2023
2 parents 4baa4c3 + 514c167 commit 1a35ea4
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,11 @@ import org.slf4j.LoggerFactory

class GithubReleasePlugin implements Plugin<Project> {

private Project project
private GithubReleaseTask task

@Override
void apply(Project project) {
this.project = project

def ext = project.extensions.create('githubRelease', GithubReleaseExtension, project)

task = project.tasks.create('githubRelease', GithubReleaseTask) {
project.tasks.register('githubRelease', GithubReleaseTask) {
it.with {
setAuthorization ext.authorizationProvider
setOwner ext.ownerProvider
Expand All @@ -52,7 +47,7 @@ class GithubReleasePlugin implements Plugin<Project> {
setDryRun ext.dryRunProvider
setApiEndpoint ext.apiEndpointProvider
}
} as GithubReleaseTask
}
}

}

0 comments on commit 1a35ea4

Please sign in to comment.