Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Merge jbake-gradle-plugin into main JBake repo #749

Open
wants to merge 164 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
9a20972
Initial commit
melix Jan 29, 2014
c9114e3
Add IRC notification
melix Jan 29, 2014
53223a5
Integrate with Bintray
melix Jan 29, 2014
db8e90d
Remove extension and migrate configuration to task
melix Jan 31, 2014
9d9633f
Add default values for input/output
melix Feb 3, 2014
25f23dd
Update Travis CI urls
melix Feb 3, 2014
b45a264
Initial take at the JBake Preview task for Gradle
jmcgarr Apr 8, 2014
fd9c5f7
Change the logging level of the preview task to display message
jmcgarr Apr 8, 2014
a5367ae
Update docs; fix preview task inputs; change task dependencies
jmcgarr Apr 9, 2014
06551c1
Fixing doc code examples
jmcgarr Apr 9, 2014
4466c3a
Updating the gitignore file
jmcgarr Apr 17, 2014
dab9df6
Release 0.1
melix May 23, 2014
ea014cc
Bump version to 0.2-SNAPSHOT
melix May 23, 2014
19c32cf
Merging upstream changes
jmcgarr May 26, 2014
fc9645b
Improve deployment process
melix Jun 11, 2014
9c5435f
Merge branch 'master' into feature/add-jbake-preview
jmcgarr Jun 15, 2014
8bd6485
apply base plugin. adds clean Task to the project.
ancho Oct 3, 2014
1d7a48d
First attempt to make jbake version configuration dynamic
ancho Oct 12, 2014
38ac04d
added freemaker, pegdown and asciidoctor version into Extension
ancho Oct 13, 2014
9c82b01
switch asciidoctor dependency if jbake version > 2.3.0
ancho Oct 13, 2014
cefe3d1
configure output and input via coventionMapping and extension properties
ancho Oct 13, 2014
39d0ccc
configure clearCache via coventionMapping and extension properties
ancho Oct 13, 2014
7b7cf11
jbake configurable by extension configuration per reflection \o/
ancho Oct 13, 2014
fad1555
bumped jbake version to 2.3.2. Extended Readme.
ancho Oct 14, 2014
a980995
Update README.adoc
Dec 30, 2014
8a6a89f
Merge pull request #8 from alexanderklein/patch-1
melix Dec 30, 2014
5bb777a
Merge pull request #7 from ancho/feature/configurable-jbake-version
melix Dec 30, 2014
b7eb20b
use jsemver to compare versions
ancho Feb 16, 2015
d7c1eb3
renamed task jbake to bake
ancho May 3, 2015
2772bab
Update gradle wrapper to 2.3. Fix execution permission.
ancho May 3, 2015
24a634d
Saving work
jmcgarr Aug 4, 2015
18b0e38
merge updates from upstream
jmcgarr Aug 5, 2015
c18f2d1
adding jbake preview tasks to updated pluging code
jmcgarr Aug 9, 2015
ef7ca3f
Added some example sites.
jonbullock Aug 16, 2015
e7b3ae0
Merge branch 'master' into feature/add-jbake-preview
jmcgarr Oct 6, 2015
66cc5cd
Merge pull request #12 from ancho/feature/local-jbake-snapshot
aalmiray Feb 28, 2016
67fdec9
Update gradle wrapper to 2.11
aalmiray Feb 28, 2016
7aaa897
Update build settings:
aalmiray Feb 28, 2016
e074b62
Use standard Gradle plugin publishing.
pledbrook Apr 25, 2016
940837d
Update README for publishing changes.
pledbrook Apr 25, 2016
e0e3eb1
Adjust group and artifact IDs for plugin.
pledbrook Apr 26, 2016
b75cc74
Update gradle wrapper to 2.13
aalmiray Apr 27, 2016
2de825a
Merge pull request #20 from pledbrook/plugin-publish-p1
aalmiray Apr 27, 2016
ec3547f
Tweak publishing setup
aalmiray Apr 27, 2016
0b3120b
Update extension dependencies
aalmiray Apr 27, 2016
ca87ced
Updat readme
aalmiray Apr 27, 2016
f93ce4d
Fix broken tests
aalmiray Apr 27, 2016
cb9fd3a
Mention compatibility breakage in readme
aalmiray Apr 27, 2016
85d9180
Remove usage of custom provided scope as we have since Gradle 2.12
aalmiray Apr 27, 2016
4a95a15
Fix publishing coordinates
aalmiray Apr 27, 2016
bfa02be
Add aggregate publishing task
aalmiray Apr 27, 2016
f5b97e3
Rearrange publishing settings
aalmiray Apr 27, 2016
77e6055
Rearrange publishing settings (2)
aalmiray Apr 27, 2016
9e5751a
Rearrange publishing settings (3)
aalmiray Apr 27, 2016
ee29b0c
Add project coordinates
aalmiray Apr 27, 2016
1c20c30
Apply license format
aalmiray Apr 27, 2016
9f741cc
Saving local work from an old laptop
jmcgarr Aug 28, 2016
0ee6689
make bintray repo and organization configurable
ancho Sep 14, 2016
8944f4e
added integration test with gradle TestKit.
ancho Sep 16, 2016
aa54cff
removed annoying debug output
ancho Sep 22, 2016
5b978dd
update gradle wrapper to 3.1
ancho Sep 22, 2016
892209e
Upgraded to jbake version 2.5
danielkocot Oct 17, 2016
91f35d2
now with correct specification :)
danielkocot Oct 17, 2016
a884597
Merge pull request #26 from danielgrycman/master
aalmiray Oct 17, 2016
2d9471e
added new template engines thymeleaf, jade4j and groovy MTE
ancho Oct 17, 2016
4da8e72
Merge pull request #22 from ancho/feature/prepare-bintray-publishing
aalmiray Dec 8, 2016
c88b14a
Update Travis settings
aalmiray Dec 8, 2016
4108e2b
Merge pull request #27 from ancho/feature/add-new-engines
aalmiray Dec 8, 2016
3a01a09
Merge pull request #23 from ancho/feature/gradle-integration-tests
aalmiray Dec 8, 2016
ed72510
Update build dependencies
aalmiray Dec 8, 2016
ff6504e
Set verbose output when running tests
aalmiray Dec 8, 2016
b9c92c0
Cosmetic changes to integration tests. Add more gradle versions for t…
aalmiray Dec 8, 2016
b245726
Conditionally include default repositories.
aalmiray Dec 8, 2016
c607ae3
Activate jacoco and coveralls
aalmiray Dec 8, 2016
d64e191
dependencies needed for changed version of JBake
danielkocot Mar 14, 2017
9092b05
changed README.adoc
danielkocot Mar 14, 2017
63ffef9
Merge branch 'master' into master
danielkocot Mar 14, 2017
65c8b66
Merge pull request #28 from danielgrycman/master
aalmiray Mar 15, 2017
3e6a24b
update jbake dependcies which changed with 2.5.1
ancho Mar 15, 2017
87e4ee1
Upgrade to latest Gradle wrapper
aalmiray Apr 6, 2017
091e53d
Update project dependencies
aalmiray Apr 6, 2017
c93331a
Refactor build settings
aalmiray Apr 6, 2017
e6e5ab9
Update license headers
aalmiray Apr 6, 2017
237fd5a
Change plugin id to . Related to #21
aalmiray Apr 6, 2017
8ca4883
Merge branch 'master' into feature/update-2.5.1
ancho Apr 9, 2017
431b5c0
Merge pull request #29 from ancho/feature/update-2.5.1
aalmiray Apr 20, 2017
4e9018b
Update to Gradle 3.5
aalmiray Apr 20, 2017
9ed3bb4
Getting ready for release
aalmiray Apr 20, 2017
aa92541
Update readme before release
aalmiray Apr 20, 2017
e83df3b
Update to JBake Version 2.6
danielk77 Mar 4, 2018
4171488
Merge remote-tracking branch 'upstream/master'
danielk77 Mar 4, 2018
62231b1
align version with JBake 2.6
danielk77 Mar 5, 2018
5e059a8
align all versions with JBake 2.6 and updated tests
danielk77 Mar 5, 2018
d33f81e
fix jdk7 build. added openjdk8. gradle wrapper 4.6
ancho Mar 6, 2018
1096ba9
Merge pull request #35 from ancho/feature/fix-travis-build
aalmiray Mar 6, 2018
adcbd61
Merge branch 'master' into master
aalmiray Mar 6, 2018
21beea5
Merge pull request #34 from danielkocot/master
aalmiray Mar 6, 2018
f88971c
Update license headers
aalmiray Mar 7, 2018
b5c1417
Update dependencies
aalmiray Mar 7, 2018
051e305
Fix version
aalmiray Mar 7, 2018
16c6869
Must bump version due to publishing problems with 0.8.0/1.1.0
aalmiray Mar 7, 2018
c58d3aa
Align with jbake 2.6.1
ancho Apr 16, 2018
69cf1fe
fix skip message
ancho Apr 16, 2018
2625a88
Merge pull request #39 from ancho/feature/jbake-2.6.1-update
aalmiray Apr 16, 2018
cd0c08e
Bump to next version
aalmiray Apr 18, 2018
be466e4
Merge branch 'feature/add-jbake-preview' of https://github.com/jmcgar…
aalmiray Oct 4, 2018
9706045
Manually merged #2
aalmiray Oct 4, 2018
b4f1b4b
Getting ready for next release
aalmiray Oct 4, 2018
a520ce5
Skip building with openjdk7 in Travis
aalmiray Oct 4, 2018
b16b3e1
Let the bake task fail if there are errors. Fix for #41
aalmiray Oct 4, 2018
dbd44e9
Fixing issue #42
jmcgarr Oct 6, 2018
5f88455
Merge pull request #43 from jmcgarr/bug/preview-inputs
aalmiray Oct 6, 2018
8642867
Add an init task. Fix for #30
aalmiray Oct 6, 2018
6841e1c
Upgrade to Jbake 2.6.2. Fix for #44
aalmiray Oct 7, 2018
15ee14d
align flexmark version with 2.6.2 dependencies
ancho Oct 7, 2018
1a22cfc
Allow a custom templateUrl to be specified for bakeInit
aalmiray Oct 7, 2018
1b677ab
Update dependencies
aalmiray Oct 7, 2018
5a8b751
Getting ready for next release
aalmiray Oct 7, 2018
55761ae
Merge pull request #45 from ancho/feature/flexmark-version
aalmiray Oct 7, 2018
4fa664c
update to jbake 2.6.3
ancho Oct 16, 2018
c9c4735
added openjdk 10 and 11 to travis build matrix
ancho Oct 16, 2018
5046648
Merge pull request #48 from ancho/feature/update-v2.6.3
aalmiray Oct 17, 2018
d67d53f
update jbake to 2.6.4
ancho Jan 27, 2019
cbfdc86
Merge pull request #50 from ancho/feature/update-2.6.4
aalmiray Jan 29, 2019
38ad088
Apply kordamp-gradle plugins. Bump version to 5.0.0
aalmiray Jan 29, 2019
e2d5a34
Skip openjdk11 because Spock doesn't work
aalmiray Jan 29, 2019
8c85dc5
Small build tweaks
aalmiray Jan 29, 2019
914a991
Prepare for next release
aalmiray Jan 29, 2019
f91d438
Modify bintray publication settings
aalmiray Jan 29, 2019
60d66f0
Fix broken build
aalmiray Jan 29, 2019
e9f33dd
Update build settings
aalmiray Dec 1, 2019
f18b338
Fix plugin links
aalmiray Dec 1, 2019
9eda5d6
Update build settings
Jan 4, 2020
bd77d3e
Update license headers
Jan 4, 2020
db055ed
Use lazy property API
Jan 4, 2020
3186bcf
update jbake to 2.6.5 and gradle wrapper to 6.3
ancho Apr 20, 2020
50cfee6
skip gradle integration test if gradle version is not compatible with…
ancho Apr 23, 2020
808fb2e
Merge pull request #52 from ancho/update/jbake-2.6.5
aalmiray Apr 23, 2020
5d78a80
Update build & dependencies; preparing for release
Apr 26, 2020
168aaa5
Prepare for release
May 9, 2020
b9b9621
Use the worker API for Gradle 5.6 and above
lacasseio Jun 27, 2020
f334a84
Remove semi-colon
lacasseio Jun 28, 2020
15b49b8
Add author tags
lacasseio Jun 28, 2020
2649460
Revert "Add author tags"
lacasseio Jun 28, 2020
b8a99f1
Merge pull request #57 from lacasseio/lacasseio/improve-memory-usage-…
aalmiray Jul 19, 2020
1ed65a4
Prepare for release
Jul 19, 2020
a042a78
update to jbake 2.6.6
ancho Apr 15, 2021
e666b6c
fix license check
ancho Apr 15, 2021
8233bdf
Merge pull request #61 from ancho/feature/update-jbake-2.6.6
aalmiray Apr 17, 2021
8ac5254
Update gradle wrapper
aalmiray Apr 17, 2021
6ea4a3d
Remove jcenter/bintray
aalmiray Apr 17, 2021
a211833
Update github workflow
aalmiray Apr 17, 2021
13215cb
Prepare for release
aalmiray Apr 17, 2021
69b1033
Fix github workflow
aalmiray Apr 17, 2021
a7a4aed
Update readme
aalmiray Apr 17, 2021
f8a9f0b
update jbake to 2.6.7
ancho May 15, 2021
b96ce35
Merge pull request #62 from ancho/feature/update-jbake-2.6.7
aalmiray May 15, 2021
130c2df
Prepare fore release
aalmiray May 19, 2021
4ee9401
Remove bintray plugin from settings
aalmiray May 19, 2021
219d5a7
Cleanup and use jbakeconfig to initialize jbake (#64)
ancho Jan 2, 2022
ccea530
Update license headers
aalmiray Jan 2, 2022
a487864
Remove license headers from example-project -> fixes build breakage
aalmiray Jan 2, 2022
48c0d5e
Add 'jbake-gradle-plugin/' from commit 'a487864b7c395cc0b8e438702cc24…
jonbullock Feb 11, 2022
c2d094c
Start of merging in gradle plugin build into overall build.
jonbullock Feb 11, 2022
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
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ mavenVersion = 3.8.4
mavenAnnotationsVersion = 3.6.2
sparkVersion = 2.9.3

# jbake-gradle-plugin dependencies
kordampPluginVersion = 0.45.0
kordampBuildVersion = 2.4.0

org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand = true
Expand Down
2 changes: 2 additions & 0 deletions jbake-gradle-plugin/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
patreon: aalmiray
github: aalmiray
53 changes: 53 additions & 0 deletions jbake-gradle-plugin/.github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2014-2022 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Build

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 1.8

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-

- name: Build
run: ./gradlew build -S

12 changes: 12 additions & 0 deletions jbake-gradle-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
target
build
out
*~
.gradle
*.iml
*.ipr
*.iws
.idea
.settings
*.classpath
*.project
21 changes: 21 additions & 0 deletions jbake-gradle-plugin/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: java

jdk: openjdk8

install: true

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
directories:
- $HOME/.m2/
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

before_script:
- ./gradlew --version

script: ./gradlew build -S

env: TERM=dumb
13 changes: 13 additions & 0 deletions jbake-gradle-plugin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

161 changes: 161 additions & 0 deletions jbake-gradle-plugin/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
= JBake plugin for Gradle
:linkattrs:
:jbake-version: 2.6.7
:plugin-version: 5.5.0
:project-group: org.jbake
:plugin-id: org.jbake.site
:project-name: jbake-gradle-plugin

image:http://img.shields.io/travis/jbake-org/{project-name}/master.svg["Build Status", link="https://travis-ci.org/jbake-org/{project-name}"]
image:http://img.shields.io/coveralls/jbake-org/{project-name}/master.svg["Coverage Status", link="https://coveralls.io/r/jbake-org/{project-name}"]
image:http://img.shields.io/badge/license-ASF2-blue.svg["Apache License 2", link="http://www.apache.org/licenses/LICENSE-2.0.txt"]
image:https://img.shields.io/maven-metadata/v?label=Plugin%20Portal&metadataUrl=https://plugins.gradle.org/m2/org/jbake/site/{plugin-id}.gradle.plugin/maven-metadata.xml["Gradle Plugin Portal, link="https://plugins.gradle.org/plugin/{plugin-id}"]

---

This plugin allows rendering a site using http://www.jbake.org[JBake] directly from http://www.gradle.org[Gradle].

== Requirements

* Java 8
* Gradle 6+

== Examples

A few of the sites that use the plugin and serve as a good example are:

* https://github.com/melix/blog
* https://github.com/danhyun/blog
* https://github.com/msgilligan/msgilligan.github.io

== Usage

*This is work in progress*

[source,groovy]
[subs="attributes"]
----
plugins {
id 'org.jbake.site' version '{plugin-version}'
}
----

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`).

WARNING: versions prior to `1.0.0` had a task named `jbake`. This task has been renamed to `bake` since `1.0.0`.

=== Init

You can initialise the project structure by running the following command:

----
gradle bakeInit
----

The default template is set to `groovy`. You may change this setting by updating the `template` property of the `jbake`
configuration. Accepted values are `freemarker`, `groovy`, `groovy-mte`, thymeleaf`, `jade`.

Alternatively you may define a value for `templateUrl` that points to a custom template, for example

[source,groovy]
----
bakeInit {
templateUrl = 'http://server.acme.com/path/to/template.zip'
}
----

=== Previewing

You can preview your content by running the following command:

----
gradle bake bakePreview
----

This will start up a jetty container and serve your baked site on http://localhost:8080 by default. You can change the
port by adding this to your build file.

[source,groovy]
----
bakePreview {
port = '8090'
}
----

The `bakePreview` task is configured to server the output of the `bake` task. Should you need to render a different set
of files then specify a value for the `input` property, like so

[source,groovy]
----
bakePreview {
input = project.file('path/to/content')
}
----

== Configuration
=== Plugin configuration

The default input and output directories can be changed using the `jbake` configuration block:

[source,groovy]
----
jbake {
srcDirName = 'jbake-sources'
destDirName = 'output'
}
----
The generated output can then be found at `$buildDir/output`.

The Version could be changed too:

[source,groovy]
----
jbake {
version = '2.6.5'
}
----

The default is {jbake-version}.

=== Render Engine configuration

Jbake uses several engines. The library versions could be changed too:

[source,groovy]
----
jbake {
pegdownVersion = '1.6.0'
flexmarkVersion = '0.62.2' // since jbake 2.6.0
freemarkerVersion = '2.3.31'
groovyTemplatesVersion = '3.0.7'
jade4jVersion = '1.2.7'
thymeleafVersion = '3.0.12.RELEASE'
pebbleVersion = '3.1.5' // since jbake 2.6.5
asciidoctorJavaIntegrationVersion = '0.1.4' //pre jbake 2.3.1
asciidoctorjVersion = '2.4.3' //since jbake 2.3.1
jettyVersion = '9.4.36.v20210114'
}
----

Notice the `asciidoctorJavaIntegrationVersion` and `asciidoctorjVersion`. Since Version 2.3.1 jbake has changed
to the asciidoctorj library.

This plugin handles this change internally. If you use a Version > 2.3.0 of jbake, the dependency switch to the new one.

Since Version 2.6.0 jbake uses https://github.com/vsch/flexmark-java[flexmark] as replacement for https://github.com/sirthias/pegdown[pegdown].

=== JBake configuration

There are several options to configure http://www.jbake.org[JBake]. One is to have the regular `jbake.properties` file
into the source directory. The other is to use the plugin configuration block:

[source,groovy]
----
jbake {
configuration['template.post.file'] = 'mypost.ftl'
}
----



5 changes: 5 additions & 0 deletions jbake-gradle-plugin/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>
Loading