hierynomus / license-gradle-plugin

Manage your license(s)
http://www.javadude.nl
Other
409 stars 114 forks source link

Add ability to add custom header definitions #132

Closed arnarpall closed 7 years ago

arnarpall commented 7 years ago

I added a way to define custom header definitions through the gradle dsl

Adding header definitions can be done throught he license extension This more or less fits with the way it was done in the maven plugin http://code.mycila.com/license-maven-plugin/#changing-header-style-definitions

license {
    headerDefinitions {
        custom_definition {
          firstLine = "//"
          endLine   = "//"
          firstLineDetectionPattern = "//"
          lastLineDetectionPattern  = "//"
          allowBlankLines = false
          skipLinePattern = "//"
          isMultiline = false
        }
    }
}
hierynomus commented 7 years ago

Wow, great thanks! On first glance, only some styling issues. In some places you put the open-curly on a new line and other places you (correctly) didn't. If you could reformat that to match the style of the rest of the project, I think we're good to go!

arnarpall commented 7 years ago

No problem, i'll get that fixed

hierynomus commented 7 years ago

Thanks!