Skip to content

pdolega/gradle-scalastyle-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala Style Gradle Plugin

Instructions

maven repo: http://dl.bintray.com/releashaus/release
groupId: org.github.mansur.scalastyle
artifactId:  gradle-scalastyle-plugin_2.10
version: 0.4.1
  apply plugin: 'scalaStyle'

Add following dependencies to your buildScript

     classpath "org.github.mansur.scalastyle:gradle-scalastyle-plugin_2.10:0.4.1"

Configure the plugin

  scalaStyle {
      configLocation = "/path/to/scalaStyle.xml"
      includeTestSourceDirectory = true
      source = "src/main/scala"
      testSource = "src/test/scala"
  }

Other optional properties are

        outputFile  //Default => $buildDir/scala_style_result.xml
        outputEncoding //Default => UTF-8
        failOnViolation //Default => true
        failOnWarning //Default => false
        skip  //Default => false
        verbose //Default => false
        quiet //Default => false
        includeTestSourceDirectory //Default => false
        inputEncoding //Default => UTF-8

Full Buildscript Example

apply plugin: 'scalaStyle'

buildscript {
  repositories {
    mavenLocal()
    mavenCentral()
    maven { url "http://dl.bintray.com/releashaus/release" }
  }

  dependencies {
    classpath 'org.github.mansur.scalastyle:gradle-scalastyle-plugin_2.10:0.4.1'
  }

}

scalaStyle {
  configLocation = "mega-project/sub-project/scalastyle_config.xml"
  includeTestSourceDirectory = true
  source = "src/main/scala"
  testSource = "src/test/scala"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 86.7%
  • Scala 13.3%