diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 06452783..d7f9785d 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -8,4 +8,5 @@ repositories { dependencies { implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.2.5' + implementation 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1' } diff --git a/buildSrc/src/main/groovy/iceaxe.java-conventions.gradle b/buildSrc/src/main/groovy/iceaxe.java-conventions.gradle index ac0cfe1e..b52e0412 100644 --- a/buildSrc/src/main/groovy/iceaxe.java-conventions.gradle +++ b/buildSrc/src/main/groovy/iceaxe.java-conventions.gradle @@ -3,6 +3,7 @@ plugins { id 'checkstyle' id 'com.github.spotbugs' + id 'com.github.hierynomus.license' } group = 'com.tsurugidb.iceaxe' @@ -116,3 +117,11 @@ task showTsubakuroManifest { print(version.asString()) } } + +license { + def confDir = 'buildSrc/src/main/resources' + header rootProject.file("$confDir/source-header.txt") + mapping('java', 'SLASHSTAR_STYLE') + include('**/*.java') + ignoreFailures true +} diff --git a/buildSrc/src/main/resources/source-header.txt b/buildSrc/src/main/resources/source-header.txt new file mode 100755 index 00000000..5263e8bd --- /dev/null +++ b/buildSrc/src/main/resources/source-header.txt @@ -0,0 +1,13 @@ +Copyright 2023-2024 Project Tsurugi. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file