From dac59966aab503ea5e9a7b7ad607f02d864af058 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 24 Sep 2018 13:52:59 +0100 Subject: [PATCH] Setup gradle license format check --- LICENSE_HEADER.txt | 22 +++++++++++++++++++ build.gradle | 21 ++++++++++++++++++ .../implementation/StorageImplementation.java | 2 +- .../implementation/split/SplitStorage.java | 2 +- .../split/SplitStorageType.java | 2 +- .../common/storage/misc/DataConstraints.java | 2 +- .../storage/misc/PlayerSaveResultImpl.java | 2 +- .../storage/misc/StorageCredentials.java | 2 +- .../common/utils/ThrowingRunnable.java | 2 +- .../common/utils/gson/GsonProvider.java | 2 +- .../service/permission/SubjectReference.java | 1 + 11 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 LICENSE_HEADER.txt diff --git a/LICENSE_HEADER.txt b/LICENSE_HEADER.txt new file mode 100644 index 00000000..73eabd07 --- /dev/null +++ b/LICENSE_HEADER.txt @@ -0,0 +1,22 @@ +This file is part of LuckPerms, licensed under the MIT License. + + Copyright (c) lucko (Luck) + Copyright (c) contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. \ No newline at end of file diff --git a/build.gradle b/build.gradle index af7c7df6..7c185ce8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,21 @@ +buildscript { + repositories { + maven { + url 'https://plugins.gradle.org/m2' + } + } + + dependencies { + classpath 'gradle.plugin.net.minecrell:licenser:0.4.1' + } +} + +defaultTasks 'licenseFormat', 'build' + subprojects { apply plugin: 'java' apply plugin: 'maven' + apply plugin: 'net.minecrell.licenser' group = 'me.lucko.luckperms' version = '4.3-SNAPSHOT' @@ -36,6 +51,12 @@ subprojects { project.ext.patchVersion = determinePatchVersion() project.ext.fullVersion = project.ext.majorVersion + '.' + project.ext.minorVersion + '.' + project.ext.patchVersion + license { + header = rootProject.file('LICENSE_HEADER.txt') + include '**/*.java' + newLine = true + } + repositories { //mavenLocal() mavenCentral() diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/StorageImplementation.java b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/StorageImplementation.java index b1818a71..5c374fb5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/StorageImplementation.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/StorageImplementation.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorage.java b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorage.java index 481ab205..b77e026b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorage.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorage.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorageType.java b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorageType.java index 81126ba3..9ccf842a 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorageType.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/split/SplitStorageType.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/misc/DataConstraints.java b/common/src/main/java/me/lucko/luckperms/common/storage/misc/DataConstraints.java index ebf2b6e1..8032beff 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/misc/DataConstraints.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/misc/DataConstraints.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/misc/PlayerSaveResultImpl.java b/common/src/main/java/me/lucko/luckperms/common/storage/misc/PlayerSaveResultImpl.java index 1b47c08f..6f344a8e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/misc/PlayerSaveResultImpl.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/misc/PlayerSaveResultImpl.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/misc/StorageCredentials.java b/common/src/main/java/me/lucko/luckperms/common/storage/misc/StorageCredentials.java index 9a6e6b57..8ec73eb2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/misc/StorageCredentials.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/misc/StorageCredentials.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/utils/ThrowingRunnable.java b/common/src/main/java/me/lucko/luckperms/common/utils/ThrowingRunnable.java index 585e2023..478d9c8d 100644 --- a/common/src/main/java/me/lucko/luckperms/common/utils/ThrowingRunnable.java +++ b/common/src/main/java/me/lucko/luckperms/common/utils/ThrowingRunnable.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/utils/gson/GsonProvider.java b/common/src/main/java/me/lucko/luckperms/common/utils/gson/GsonProvider.java index b7e93e32..a85f29ca 100644 --- a/common/src/main/java/me/lucko/luckperms/common/utils/gson/GsonProvider.java +++ b/common/src/main/java/me/lucko/luckperms/common/utils/gson/GsonProvider.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/sponge/sponge-service-api6/src/main/java/org/spongepowered/api/service/permission/SubjectReference.java b/sponge/sponge-service-api6/src/main/java/org/spongepowered/api/service/permission/SubjectReference.java index c3e8026a..03929c5a 100644 --- a/sponge/sponge-service-api6/src/main/java/org/spongepowered/api/service/permission/SubjectReference.java +++ b/sponge/sponge-service-api6/src/main/java/org/spongepowered/api/service/permission/SubjectReference.java @@ -22,6 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ + package org.spongepowered.api.service.permission; import java.util.concurrent.CompletableFuture;