Skip to content

Commit

Permalink
Merge pull request jbake-org#12 from ancho/feature/local-jbake-snapshot
Browse files Browse the repository at this point in the history
rename task jbake to bake and fix usage of jbake snapshot releases
  • Loading branch information
aalmiray committed Feb 28, 2016
2 parents ef7ca3f + 2772bab commit 66cc5cd
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ user.gradle
.settings
*.classpath
*.project

gradle.properties
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ buildscript {
}
dependencies {
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.2'
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.2.1'
}
}
apply plugin: 'me.champeau.jbake'
----

This will add a `jbake` task to your build, which will search for a standard http://www.jbake.org[JBake] source tree in
This will add a `bake` task to your build, which will search for a standard http://www.jbake.org[JBake] source tree in
`src/jbake` and generate content into `$buildDir/jbake` (typically `build/jbake`).

== Configuration
Expand Down
5 changes: 5 additions & 0 deletions atlassian-ide-plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<atlassian-ide-plugin>
<project-configuration id="1">
<servers id="2" />
</project-configuration>
</atlassian-ide-plugin>
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ repositories {
dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.github.zafarkhaja:java-semver:0.8.0'
provided 'org.jbake:jbake-core:2.3.2'
testCompile('org.spockframework:spock-core:0.7-groovy-2.0') {
exclude group:'org.codehaus.groovy'
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Oct 03 18:00:04 CEST 2014
#Sun May 03 12:39:37 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
7 changes: 5 additions & 2 deletions src/main/groovy/me/champeau/gradle/JBakePlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package me.champeau.gradle

import com.github.zafarkhaja.semver.Version
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
Expand All @@ -39,7 +40,7 @@ class JBakePlugin implements Plugin<Project> {

addDependenciesAfterEvaluate()

project.task('jbake', type: JBakeTask, group: 'Documentation', description: 'Bake a jbake project'){
project.task('bake', type: JBakeTask, group: 'Documentation', description: 'Bake a jbake project'){

classpath = configuration
conventionMapping.input = { project.file("$project.projectDir/$project.jbake.srcDirName") }
Expand All @@ -60,7 +61,9 @@ class JBakePlugin implements Plugin<Project> {
project.dependencies {
jbake("org.jbake:jbake-core:${extension.version}")

if ( new Version(extension.version) > new Version("2.3.0") ){
Version currentVersion = Version.valueOf(extension.version)
Version jbake2_3_0 = Version.valueOf("2.3.0")
if ( currentVersion.greaterThan( jbake2_3_0 ) ){
jbake("org.asciidoctor:asciidoctorj:${extension.asciidoctorjVersion}")
}
else {
Expand Down
51 changes: 0 additions & 51 deletions src/main/groovy/me/champeau/gradle/Version.groovy

This file was deleted.

10 changes: 5 additions & 5 deletions src/test/groovy/me/champeau/gradle/JBakePluginSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class JBakePluginSpec extends Specification {
def "should add a JBakeTask"(){

expect:
project.tasks.jbake instanceof JBakeTask
project.tasks.bake instanceof JBakeTask
}

def "should add jbake configuration"(){
Expand Down Expand Up @@ -114,7 +114,7 @@ class JBakePluginSpec extends Specification {
project.jbake.srcDirName = srcDirName

then:
project.tasks.jbake.input == expectedFile
project.tasks.bake.input == expectedFile
}

def "output dir should be configured by extension"(){
Expand All @@ -126,7 +126,7 @@ class JBakePluginSpec extends Specification {
project.jbake.destDirName = destDirName

then:
project.tasks.jbake.output == expectedFile
project.tasks.bake.output == expectedFile
}

def "clearcache should be configured by extension"(){
Expand All @@ -137,7 +137,7 @@ class JBakePluginSpec extends Specification {
project.jbake.clearCache = clearCache

then:
project.tasks.jbake.clearCache == clearCache
project.tasks.bake.clearCache == clearCache
}

def "should be configurable by extension"(){
Expand All @@ -149,7 +149,7 @@ class JBakePluginSpec extends Specification {
project.jbake.configuration = configuration

then:
project.tasks.jbake.configuration['render.tags'] == false
project.tasks.bake.configuration['render.tags'] == false
}

}
84 changes: 0 additions & 84 deletions src/test/groovy/me/champeau/gradle/VersionTest.groovy

This file was deleted.

0 comments on commit 66cc5cd

Please sign in to comment.