Created
July 3, 2018 04:58
-
-
Save jeandersonbc/18c2029ba62a05a5c8aae46937345019 to your computer and use it in GitHub Desktop.
Jekyll environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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