-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
59 lines (47 loc) · 1.56 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import com.github.jrubygradle.JRubyExec
ext {
source = file(".").absolutePath
println source
destination = file("./_site").absolutePath
commonFlags = [ '--source', source, '--destination', destination ]
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.jruby-gradle:jruby-gradle-plugin:+"
}
}
apply plugin: 'com.github.jruby-gradle.base'
repositories {
jcenter()
}
dependencies {
jrubyExec 'rubygems:jekyll:3.7.4'
gems 'rubygems:bundler:+'
// adding jekyll plugins as defined here https://github.com/github/pages-gem/blob/master/lib/github-pages/dependencies.rb
jrubyExec 'rubygems:jekyll-sitemap:1.2.0'
jrubyExec 'rubygems:jekyll-feed:0.10.0'
jrubyExec 'rubygems:jekyll-paginate:1.1.0'
jrubyExec 'rubygems:jekyll-github-metadata:2.9.4'
}
task jekyllBuild(type: JRubyExec, group: 'Jekyll', description: 'Build your site.') {
// Enable task to be UP-TO-DATE.
//inputs.file source
// outputs.file destination
script "jekyll"
scriptArgs "build"
scriptArgs commonFlags
workingDir projectDir
// Consider enabling this to help us determine when pages need to be pushed to Nexus.
// A copy of .jekyll-metadata could be stored in the repo and then compared to the local file.
// See https://jekyllrb.com/docs/configuration/#incremental-regeneration
// scriptArgs "--incremental"
}
task jekyllServe(type: JRubyExec, group: 'Jekyll', description: 'serve your site.') {
script "jekyll"
scriptArgs "serve"
scriptArgs "--incremental"
scriptArgs commonFlags
}