From 2cad9a2c094382414a4f9a2088214861a95436b4 Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Thu, 4 Oct 2018 00:29:34 -0700 Subject: [PATCH] Switch to a license plugin for headers --- HEADER.txt | 16 ++++++++ build.gradle | 38 ++++++++++++------- config/checkstyle/checkstyle.xml | 7 ---- config/checkstyle/header.txt | 18 --------- .../bukkit/BukkitImplementationTester.java | 1 + .../internal/annotation/Direction.java | 1 - .../worldedit/forge/ForgeItemRegistry.java | 1 + 7 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 HEADER.txt delete mode 100644 config/checkstyle/header.txt diff --git a/HEADER.txt b/HEADER.txt new file mode 100644 index 000000000..a429eca27 --- /dev/null +++ b/HEADER.txt @@ -0,0 +1,16 @@ +WorldEdit, a Minecraft world manipulation toolkit +Copyright (C) sk89q +Copyright (C) WorldEdit team and contributors + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Lesser 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 Lesser General Public License +for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see . diff --git a/build.gradle b/build.gradle index 35db0c9c2..6b63f5caf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,3 @@ -println """ -******************************************* - You are building WorldEdit! - - If you encounter trouble: - 1) Read COMPILING.md if you haven't yet - 2) Try running 'build' in a separate Gradle run - 3) Use gradlew and not gradle - 4) If you still need help, ask on IRC! irc.esper.net #sk89q - - Output files will be in [subproject]/build/libs -******************************************* -""" - buildscript { repositories { mavenCentral() @@ -33,6 +19,24 @@ buildscript { } } +plugins { + id 'net.minecrell.licenser' version '0.4.1' apply false +} + +println """ +******************************************* + You are building WorldEdit! + + If you encounter trouble: + 1) Read COMPILING.md if you haven't yet + 2) Try running 'build' in a separate Gradle run + 3) Use gradlew and not gradle + 4) If you still need help, ask on IRC! irc.esper.net #sk89q + + Output files will be in [subproject]/build/libs +******************************************* +""" + allprojects { group = 'com.sk89q.worldedit' version = '7.0.0-SNAPSHOT' @@ -84,6 +88,7 @@ subprojects { apply plugin: 'checkstyle' apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'com.jfrog.artifactory' + apply plugin: 'net.minecrell.licenser' ext.internalVersion = version + ";" + gitCommitHash @@ -148,4 +153,9 @@ subprojects { artifactoryPublish { publishConfigs('archives') } + + license { + header = rootProject.file("HEADER.txt") + include '**/*.java' + } } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index cd403cf91..7872f45bc 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -53,11 +53,4 @@ - - - - - - - diff --git a/config/checkstyle/header.txt b/config/checkstyle/header.txt deleted file mode 100644 index 24392ded4..000000000 --- a/config/checkstyle/header.txt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * WorldEdit, a Minecraft world manipulation toolkit - * Copyright (C) sk89q - * Copyright (C) WorldEdit team and contributors - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser 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 Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ \ No newline at end of file diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitImplementationTester.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitImplementationTester.java index 186365a9b..1345f6a81 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitImplementationTester.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitImplementationTester.java @@ -16,6 +16,7 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ + package com.sk89q.worldedit.bukkit; /** diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/annotation/Direction.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/annotation/Direction.java index 6a8d96ccf..eac88237c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/annotation/Direction.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/annotation/Direction.java @@ -17,7 +17,6 @@ * along with this program. If not, see . */ - package com.sk89q.worldedit.internal.annotation; import com.sk89q.worldedit.Vector; diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeItemRegistry.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeItemRegistry.java index 216657581..c87033075 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeItemRegistry.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeItemRegistry.java @@ -16,6 +16,7 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ + package com.sk89q.worldedit.forge; import com.sk89q.worldedit.blocks.BaseItem;