Skip to content

Instantly share code, notes, and snippets.

@jeandersonbc
Created July 3, 2018 04:58
Show Gist options
  • Save jeandersonbc/18c2029ba62a05a5c8aae46937345019 to your computer and use it in GitHub Desktop.
Save jeandersonbc/18c2029ba62a05a5c8aae46937345019 to your computer and use it in GitHub Desktop.
Jekyll environment
def properties = [
"projectName": "myblog"
]
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.jruby-gradle:jruby-gradle-plugin:1.5.0"
}
}
apply plugin: "com.github.jruby-gradle.base"
import com.github.jrubygradle.JRubyExec
dependencies {
jrubyExec "rubygems:bundler:1.16.2"
jrubyExec "rubygems:jekyll:3.8.3"
}
task bootstrap(type: JRubyExec) {
script "jekyll"
scriptArgs "new", properties.projectName
doFirst {
if (new File(properties.projectName).exists())
throw new GradleException("${properties.projectName} already exists")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment