Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alenkacz/gradle-scalastyle
Scalastyle plugin for Gradle
https://github.com/alenkacz/gradle-scalastyle
Last synced: about 6 hours ago
JSON representation
Scalastyle plugin for Gradle
- Host: GitHub
- URL: https://github.com/alenkacz/gradle-scalastyle
- Owner: alenkacz
- Created: 2015-10-10T09:05:39.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-17T10:00:03.000Z (about 9 years ago)
- Last Synced: 2023-03-12T07:37:14.465Z (over 1 year ago)
- Language: Groovy
- Size: 414 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scala Style Gradle Plugin
[![Build Status](https://travis-ci.org/alenkacz/gradle-scalastyle.svg)](https://travis-ci.org/alenkacz/gradle-scalastyle)
Originally forked from https://github.com/ngbinh/gradle-scalastyle-plugin
### Instructions
```
maven repo: http://jcenter.bintray.com/
groupId: org.github.ngbinh.scalastyle
artifactId: gradle-scalastyle-plugin_2.11
version: 0.7.2
```Use `artifactId: gradle-scalastyle-plugin_2.10` if you want to use with Scala `2.10`
```groovy
apply plugin: 'scalaStyle'
```Add following dependencies to your buildScript
```groovy
classpath "org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:0.7.2"
```Configure the plugin
```groovy
scalaStyle {
configLocation = "/path/to/scalaStyle.xml"
}```
Other optional properties are
```groovy
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
testConfigLocation //Separate configuration file to be used for test sources
inputEncoding //Default => UTF-8
source // Default => "/src/main/scala"
testSource // Default => "/src/test/scala"
```#### Full Buildscript Example
```groovy
apply plugin: 'scalaStyle'buildscript {
repositories {
jcenter() // only work after gradle 1.7
}dependencies {
classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:0.7.2'
}
}scalaStyle {
configLocation = "mega-project/sub-project/scalastyle_config.xml"
includeTestSourceDirectory = true
source = "src/main/scala"
testSource = "src/test/scala"
}
```