diff options
author | David Rautureau <david.rautureau@sonarsource.com> | 2018-03-21 17:33:08 +0100 |
---|---|---|
committer | Janos Gyerik <janos.gyerik@sonarsource.com> | 2018-04-04 14:25:32 +0200 |
commit | c9e60ded9b8ffe4f97c73447c3ceda6919662a1e (patch) | |
tree | 63e1e5d45933b59563a699285f36dc0d316340c2 /build.gradle | |
parent | fc34c6d43e123cf7e789232b4cd40b470a18b33e (diff) | |
download | sonarqube-c9e60ded9b8ffe4f97c73447c3ceda6919662a1e.tar.gz sonarqube-c9e60ded9b8ffe4f97c73447c3ceda6919662a1e.zip |
BUILD-612 Implement the check of source headers
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle index 5d879535554..48bfe8e3e19 100644 --- a/build.gradle +++ b/build.gradle @@ -10,6 +10,7 @@ buildscript { classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.4' classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0' + classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0" classpath 'io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE' classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.6.2' classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2' @@ -56,6 +57,7 @@ allprojects { } subprojects { + apply plugin: "com.github.hierynomus.license" apply plugin: 'io.spring.dependency-management' apply plugin: 'java' // protobuf must be applied after java @@ -274,6 +276,21 @@ subprojects { } } } + + license { + header = rootProject.file('HEADER') + ext.year = Calendar.getInstance().get(Calendar.YEAR) + strictCheck true + mapping { + java = 'SLASHSTAR_STYLE' + js = 'SLASHSTAR_STYLE' + ts = 'SLASHSTAR_STYLE' + tsx = 'SLASHSTAR_STYLE' + css = 'SLASHSTAR_STYLE' + less = 'SLASHSTAR_STYLE' + } + excludes(["**/*.txt", "**/*.properties", "**/*.xml", "**/*.xsd", "**/*.html", "**/*.json", "**/*.sql", "**/*.rb", "**/*.vm"]) + } } artifactory { |