Coder Social home page Coder Social logo

gradle-scala-extras's Introduction

Gradle Scala Extras

This Gradle plugin aims to enhance the Scala Gradle core plugin with quality assurance tools and custom configurations.

Features

  • Support for Scalafix and Scalafmt with a default configuration that can be overridden following the How to use section.
    • Wartremover support is expected soon.
  • Configuration of Scala compiler options;
  • Aggressive Scala compiler option to treat warnings as errors is applied by default (still configurable).

Other features may come in the future.

How to use

plugins {
    id("io.github.tassiluca.gradle-scala-extras") version "<SELECT THE VERSION>"
}

The plugin is configurable through the scalaExtras extension:

scalaExtras {
    additionalCompilerOptions(setOf("-explain"))
    qa { 
        allWarningsAsErrors = false
        scalafix {
            configFile = "stringified path to the scalafix configuration"
        }
        scalafmt {
            configFile = "stringified path to the scalafmt configuration"
        } 
    }
}
  • additionalCompilerOptions allows to add more options to the Scala compiler (this is necessary because the core Scala plugin allow only to replace the default options and not setting them incrementally);
  • allWarningsAsErrors is a boolean property that allows to disable the aggressive compiler option to treat warnings as errors;
  • configFile is a string that allows to set the path to the Scalafix / Scalafmt configuration file;
    • if not set, the plugin will search for a .scalafix.conf / .scalafmt.conf file in the project root directory. If not found, the default configuration is applied;
    • Default configurations can be found here.

gradle-scala-extras's People

Contributors

tassiluca avatar semantic-release-bot avatar

Watchers

Lucian avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.