Skip to content

Commit

Permalink
Merge pull request #41 from project-tsurugi/license-gradle-plugin
Browse files Browse the repository at this point in the history
build: introduce license-gradle-plugin
  • Loading branch information
hishidama authored Aug 28, 2024
2 parents a97872a + 4fe3a19 commit 66e3eba
Show file tree
Hide file tree
Showing 4 changed files with 26 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/tanzawa.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'
}

if (hasProperty('mavenLocal')) {
Expand Down Expand Up @@ -119,3 +120,11 @@ tasks.withType(Tar) { task ->
task.archiveExtension = 'tar.gz'
task.compression = Compression.GZIP
}

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.
3 changes: 3 additions & 0 deletions modules/tgsql/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ test {
systemProperty 'tanzawa.dot', findProperty('tanzawa.dot') ?: ''
}

tasks.licenseMain {
dependsOn 'generateJflex'
}

0 comments on commit 66e3eba

Please sign in to comment.