Skip to content

This plugin provides tasks for Scalate in Gradle build script.

Notifications You must be signed in to change notification settings

ryo-murai/gradle-scalate-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradle Scalate plugin

This plugin provides tasks for Scalate in Gradle build script. Currently, task for precompile of templates is supported.

Note: Scalate already provides its official plugins to Precompile Templates for Maven and SBT. Use of the official plugin in Maven or SBT is strongly recommended. Use this plugin ** only when ** you somehow have to precompile your scalate templates in Gradle build and unable to change it to Maven or SBT.

Prerequired

  • The plugin depends on 'scala' plugin. Include below in your build script.
    apply plugin: 'scala'
        dependencies {
            compile 'org.fusesource.scalate:scalate-core:1.5.3'
        }

Usage

To use the plugin, include in your build script:

    apply plugin: 'scalate'

The plugin JAR is needed in the classpath of your build script. You need cloudbees repository aside from central. Below script snippet is an example on how to retrieve the plugin jar.

    buildscript {
        repositories {
            mavenCentral()
            maven {
                url "http://repository-rmci.forge.cloudbees.com/release/"
            }
        }

        dependencies {
            classpath 'murtools:gradle-scalate-plugin:0.0.2'
        }
    }

Tasks

The plugin defines the following tasks:

  • scalatePreCompile: precompile your templates of ssp, scaml etc. Below properties are defined for this task.
  • templateSrcDir: (File) root directory where your scalate templates located. Default is src/main/webapp.
  • workingDirectory: (File) directory where generated .scala files will be located.
  • targetDirectory: (File) directrory where compiled .class files will be located. Default is build/classes/main
  • templates: (File) path of additional template file aside from the templateSrcDir
  • contextClass: (String) class name of RenderContext to precompile. Default is ServletRenderContext
  • bootClassName: (String) boot class name

Todo

About

This plugin provides tasks for Scalate in Gradle build script.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published