GithubHelp home page GithubHelp logo

sbt-license-plugin's Introduction

OUTDATED

sbt-license-plugin

This is a simple-build-tool plugin for inserting/updating license headers in your source files. It was developed for ease of use and general laziness.

sbt-header

We don't use this project anymore internally, so we might be a bit slower to get fixes out. There's also sbt-header that seems to work in a similar fashion as this project.

Installation

The sbt-license-plugin is published over on our bintray repository.

Read more about plugins here and here.

Usage

formatLicenseHeaders is a task that is called from the sbt console. In the default LicenseSettings, it is part of the normal compile cycle.

  1. To get the formatLicenseHeaders task that adds customizable header text, import the plugin's keys, and add the LicenseSettings setting to your build definition. Invoking formatLicenseHeaders will add the license to all of your main sources files. Optionally, you can remove any pre-existing header by setting the removeExistingHeaderBlock setting to true.

    i.e. in build.sbt:

      import com.banno.license.Plugin.LicenseKeys._
    
      licenseSettings
    
      removeExistingHeaderBlock := true
    
      name := "example"
    
      version := "0.1"
    
      organization := "com.banno"
    
  2. To add an apache2 or mit license with a custom copyright line, import the licenses as well and set the license setting like so:

    i.e. in build.sbt:

      import com.banno.license.Plugin.LicenseKeys._
      import com.banno.license.Licenses._
    
      licenseSettings
    
      license := apache2("Copyright 2013")
    
      removeExistingHeaderBlock := true
    
      name := "example"
    
      version := "0.1"
    
      organization := "com.banno"
    

Testing

Ensure that things are working properly by testing the plugin with the scripted task, however, note that the scripted-plugin only works with sbt launcher versions 0.12-0.12.3. Learn more about testing plugins here.

Contributing

Fork away, commit, and send a pull request. Make sure that the tests pass before you submit your pull request.

Copyright (C) Banno 2011-2014

sbt-license-plugin's People

Contributors

adamdecaf avatar anthony2025 avatar brharrington avatar dustinchaloupka avatar julianpeeters avatar lamdor avatar mrico avatar nicolasrouquette avatar trentio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbt-license-plugin's Issues

Why only scalaSource ?

Gj for your plugin. It's pretty usefull.

Your plugin add header only on scala sources. It may be cool to work with java sources too. In fact, it may be cooler if it could work with any source file.

problems formatting license headers on windows.

This plugin has been working fine for my development (MacOSX).
A colleague began using my project which is configured to use this plugin to format our sources. His development machine runs Windows7 64bit.
We checked out the project from SVN and when we ran SBT (0.13.7), the formatting of the licenses erased the file contents; afterwards, there is just the license header itself.

Has anyone experienced this peculiar behavior on windows?

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.