hierynomus / license-gradle-plugin

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

Compatibility with Kotlin Script (.kts) files #177

Open utybo opened 5 years ago

utybo commented 5 years ago

Kotlin (.kt) files are correctly recognized. Kotlin Script files are essentially just Kotlin files and follow the exact same syntax. I believe that they should be added to the plugin as defaults. Do note that it is common for Kotlin Script files to have two extensions, like this: myfile.ext.kts. This is used for recognizing scripting templates, and they should also be recognized as just Kotlin files.

Gradle buildscripts that use the Kotlin DSL are also .kts files. They could probably be excluded by excluding anything that ends in .gradle.kts.

Unknown file extension: <something>\src\test\resources\<something>.story.kts
Updating license header in: <something>\src\test\kotlin\...\<something>.kt
elect86 commented 4 years ago

any news on this?

How can I define ext.year and ext.developers?

utybo commented 4 years ago

Hi, you might be able to use a custom task for this. I did this on another project to apply some licensing headers to things that weren't in regular sourcesets, see here