Use license-gradle-plugin

This commit is contained in:
yushijinhun
2018-12-08 21:00:23 +08:00
parent c371924dc0
commit e8757deb0d
2 changed files with 61 additions and 57 deletions

View File

@@ -1,37 +1,21 @@
/* buildscript {
* Hello Minecraft! Launcher. repositories {
* Copyright (C) 2018 huangyuhui <huanghongxun2008@126.com> jcenter()
* maven { url 'https://plugins.gradle.org/m2/' }
* This program is free software: you can redistribute it and/or modify }
* it under the terms of the GNU General Public License as published by dependencies {
* the Free Software Foundation, either version 3 of the License, or classpath 'org.tukaani:xz:1.8'
* (at your option) any later version. classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0'
* }
* This program is distributed in the hope that it will be useful, }
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
group 'org.jackhuang' group 'org.jackhuang'
version '3.0' version '3.0'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.tukaani:xz:1.8'
}
}
subprojects { subprojects {
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'com.github.hierynomus.license'
repositories { repositories {
mavenCentral() mavenCentral()
@@ -54,4 +38,9 @@ subprojects {
testCompile group: 'junit', name: 'junit', version: '4.12' testCompile group: 'junit', name: 'junit', version: '4.12'
} }
license {
header rootProject.file('license-header.txt')
strictCheck true
ext.year = Calendar.getInstance().get(Calendar.YEAR)
}
} }

15
license-header.txt Normal file
View File

@@ -0,0 +1,15 @@
Hello Minecraft! Launcher
Copyright (C) ${year} huangyuhui <huanghongxun2008@126.com> and contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.