Skip to content

Commit

Permalink
build: introduce license-gradle-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
akirakw committed Aug 27, 2024
1 parent 37214e2 commit 5dc78fb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
9 changes: 9 additions & 0 deletions buildSrc/src/main/groovy/iceaxe.java-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'checkstyle'

id 'com.github.spotbugs'
id 'com.github.hierynomus.license'
}

group = 'com.tsurugidb.iceaxe'
Expand Down Expand Up @@ -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
}
13 changes: 13 additions & 0 deletions buildSrc/src/main/resources/source-header.txt
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 5dc78fb

Please sign in to comment.