Skip to content

Commit

Permalink
Replace deprecated github-pages plugin with git-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras authored and marcphilipp committed Apr 9, 2017
1 parent bae2768 commit 34cdfab
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ buildscript {
dependencies {
classpath 'com.diffplug.spotless:spotless-plugin-gradle:3.2.0'
classpath 'org.ajoberstar:gradle-git:1.7.0'
classpath 'org.ajoberstar:gradle-git-publish:0.2.1'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-SNAPSHOT'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.14.0'
}
Expand Down Expand Up @@ -427,7 +428,7 @@ subprojects { subproj ->
configure(rootProject) {
description = 'JUnit 5'

apply plugin: "org.ajoberstar.github-pages"
apply plugin: "org.ajoberstar.git-publish"

jar.enabled = false
uploadArchives.enabled = false
Expand Down Expand Up @@ -552,24 +553,20 @@ configure(rootProject) {

createCurrentDocsFolder.onlyIf { project.hasProperty('replaceCurrentDocs') }

githubPages {
gitPublish {
repoUri = 'https://github.com/junit-team/junit5.git'
branch = 'gh-pages'

credentials {
username = project.hasProperty('githubToken') ? project.githubToken : ''
password = ''
}

pages {
contents {
from docsDir
into "docs"
}

deleteExistingFiles = false
preserve { include '**/*' }
}

prepareGhPages.dependsOn(prepareDocsForUploadToGhPages)
prepareGhPages.dependsOn(createCurrentDocsFolder)
gitPublishCommit.dependsOn(prepareDocsForUploadToGhPages)
gitPublishCommit.dependsOn(createCurrentDocsFolder)

task wrapper(type: Wrapper) {
description = 'Generates gradlew and gradlew.bat scripts'
Expand Down

0 comments on commit 34cdfab

Please sign in to comment.