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

How to specify regex in alias attribute of downloadLicenses section

Open kant111 opened this issue 6 years ago • 1 comments

Below is how the downloadLicenses section of my project look like

downloadLicenses {
        ext.apacheTwo = license('Apache License, Version 2.0', 'http://opensource.org/licenses/Apache-2.0')
        ext.bsd = license('BSD License', 'http://www.opensource.org/licenses/bsd-license.php')

        includeProjectDependencies = true
        aliases = [
                (apacheTwo) : [
                                'The Apache Software License, Version 2.0',
                                'The Apache License, Version 2.0',
                                'Apache Software License - Version 2.0',
                                'Apache License (v2.0)',
                                'Apache 2.0 License',
                                'Apache 2',
                                'Apache 2.0',
                                'Apache License Version 2.0',
                                'Apache License, Version 2.0',
                                'Apache License 2.0',
                                license('Apache License', 'http://www.apache.org/licenses/LICENSE-2.0')
                            ],
                (bsd) : [
                            'BSD',
                            'BSD License',
                            'The BSD License',
                            'BSD 2-Clause License',
                            'New BSD license',
                            'BSD 3-Clause',
                            'BSD 3-clause',
                            'The BSD 3-Clause License',
                            'New BSD License',
                            'The New BSD License',
                            license('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php')
                        ]
        ]
    }

Even a character or case change I have to add it to the list. is there a way to sepcify regex or something?

kant111 avatar Sep 03 '18 21:09 kant111

I created a PR to support regexes: https://github.com/hierynomus/license-gradle-plugin/pull/167

blagerweij avatar Nov 30 '18 22:11 blagerweij