Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@

build/
.gradle

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
apply plugin: 'git'
apply plugin: 'console'
apply plugin: 'github'
apply plguin: 'release'
apply plugin: 'release'
```

Please note that if you are applying 'github' or 'release', there is no need of adding 'git'.
Expand Down Expand Up @@ -66,7 +66,7 @@ project.git.push(File workDir, String url, String branch)
project.git.commit(String message)
```

### Github
### GitHub

Let you create draft release, publish wiki and github pages.

Expand Down Expand Up @@ -123,8 +123,8 @@ apply plugin: 'github'
github {
repo = 'git@github.com:trnl/mongo-java-driver.git'
credentials {
username = { console.prompt ('Please enter Github username:') }
password = { console.prompt ('Please enter Github password:') }
username = { console.prompt ('Please enter GitHub username:') }
password = { console.prompt ('Please enter GitHub password:') }
}
}
```
Expand Down Expand Up @@ -187,4 +187,4 @@ release {
dependsOn publishWiki
dependsOn draftGhRelease
}
```
```
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,14 @@ uploadArchives {

pom {
project {

name 'Github Gradle Release Plugins'
description ='Set of plugins that can help you to release your project on Github'
name 'GitHub Gradle Release Plugins'
description ='Set of plugins that can help you to release your project on GitHub'
url 'http://github.com/trnl/clirr-gradle-plugin'
scm {
url 'git@github.com:trnl/release-gradle-plugin.git'
connection 'scm:git:git@github.com:trnl/release-gradle-plugin.git'
developerConnection 'scm:git:git@github.com:trnl/release-gradle-plugin.git'

}

licenses {
license {
name 'The Apache Software License, Version 2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ class CredentialsSpec implements PasswordCredentials {
void setPassword(final String password) {
this.aPassword = password
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.gradle.api.GradleException
import org.gradle.api.tasks.TaskAction

class DraftReleaseTask extends DefaultTask {
public static final String GROUP_RELEASE = 'Github Release'
public static final String GROUP_RELEASE = 'GitHub Release'

DraftReleaseTask() {
group = GROUP_RELEASE
Expand All @@ -19,7 +19,7 @@ class DraftReleaseTask extends DefaultTask {
project.github.with {

if (!(project.git.remote ==~ 'git@github\\.com:(.+)\\/(.+)\\.git')) {
throw new GradleException("Github repo should match 'git@github.com:{user}/{repo}.git' pattern")
throw new GradleException("GitHub repo should match 'git@github.com:{user}/{repo}.git' pattern")
}

def path = project.git.remote.replaceAll(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class GithubPlugin implements Plugin<Project> {
private String prop(final String p) {
project.hasProperty(p) ? project.property(p) : null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.gradle.api.tasks.Copy

class PagesTask extends DefaultTask {

private static final String GROUP_PAGES = 'Github Pages'
private static final String GROUP_PAGES = 'GitHub Pages'

PagesTask() {
setDefaults()
Expand All @@ -25,7 +25,7 @@ class PagesTask extends DefaultTask {

private void setDefaults() {
group = GROUP_PAGES
description = 'Clone, process, commit and push Github Pages.'
description = 'Clone, process, commit and push GitHub Pages.'
}

def cleanPages() {
Expand All @@ -39,7 +39,7 @@ class PagesTask extends DefaultTask {

def commitPages() {
project.git.add(workingDir(), '.')
project.git.commit(workingDir(), 'Publish of github pages from Gradle')
project.git.commit(workingDir(), 'Publish of GitHub pages from Gradle')
}

def pushPages() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/groovy/org/gradle/api/plugins/github/WikiTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.gradle.api.tasks.Copy

class WikiTask extends DefaultTask {

private static final String GROUP_WIKI = 'Github Wiki'
private static final String GROUP_WIKI = 'GitHub Wiki'

final String remote;
final File workingDir;
Expand All @@ -16,7 +16,7 @@ class WikiTask extends DefaultTask {
setDefaults()
workingDir = new File(project.buildDir, 'wiki')
if (!(project.git.remote ==~ 'git@github\\.com:(.+)\\/(.+)\\.git')) {
throw new GradleException("Github repo should match 'git@github.com:{user}/{repo}.git' pattern")
throw new GradleException("GitHub repo should match 'git@github.com:{user}/{repo}.git' pattern")
}

remote = project.git.remote.replaceAll(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ class ReleasePlugin implements Plugin<Project> {
project.task( 'release', type: ReleaseTask)
}
}

Original file line number Diff line number Diff line change
@@ -1 +1 @@
implementation-class=org.gradle.api.plugins.console.ConsolePlugin
implementation-class=org.gradle.api.plugins.console.ConsolePlugin
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/gradle-plugins/git.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
implementation-class=org.gradle.api.plugins.git.GitPlugin
implementation-class=org.gradle.api.plugins.git.GitPlugin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
implementation-class=org.gradle.api.plugins.github.GithubPlugin
implementation-class=org.gradle.api.plugins.github.GithubPlugin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
implementation-class=org.gradle.api.plugins.release.ReleasePlugin
implementation-class=org.gradle.api.plugins.release.ReleasePlugin