license-gradle-plugin icon indicating copy to clipboard operation
license-gradle-plugin copied to clipboard

Feature request: Allow for regex pattern in License template

Open RiRomain opened this issue 8 years ago • 2 comments

Using a license template with following copyright: Copyright (C) ${year} by Company, City, Country. All Rights Reserved. and following configuration:

license {  
        header = rootProject.file('LICENSE')
        ignoreFailures = true
        ext.year = Calendar.getInstance().get(Calendar.YEAR)
        includes(["**/*.java", "**/*.properties"])
        mapping {
            java='SLASHSTAR_STYLE'
        }
    }

Only file created in the current year aren't reported as missing a header.

Is there a way to accept any year with the actual implementation? Or a regex pattern as license template?

RiRomain avatar Apr 13 '16 07:04 RiRomain

Not yet, but I also recently ran into this with another project I work on indeed. Will definitely take this into consideration :)!

2016-04-13 9:52 GMT+02:00 RiRomain [email protected]:

Using a license template with following copyright: "Copyright (C) ${year} by Company, City, Country. All Rights Reserved." and following configuration:

license { header = rootProject.file('LICENSE') ignoreFailures = true ext.year = Calendar.getInstance().get(Calendar.YEAR) includes(["/*.java", "/*.properties"]) mapping { java='SLASHSTAR_STYLE' } }

Only file created in the current year aren't reported as missing a header.

Is there a way to accept any year with the actual implementation? Or a regex pattern as license template?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/hierynomus/license-gradle-plugin/issues/101

hierynomus avatar Apr 13 '16 07:04 hierynomus

Any news about this issue? Accepting any year would be very useful :-)

TheElectronWill avatar May 13 '17 17:05 TheElectronWill