\ No newline at end of file
diff --git a/HEADER b/HEADER
new file mode 100644
index 0000000..a92f6ee
--- /dev/null
+++ b/HEADER
@@ -0,0 +1,16 @@
+This file is part of PagineDown, licensed under the Apache License 2.0.
+
+ Copyright (c) William278
+ Copyright (c) contributors
+
+ 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.
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index f165196..c081f7b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,12 @@
plugins {
- id 'java'
+ id 'org.cadixdev.licenser' version '0.6.1'
id 'maven-publish'
+ id 'java'
}
group 'net.william278'
version '1.1'
+defaultTasks 'licenseFormat', 'build'
repositories {
mavenCentral()
@@ -13,23 +15,28 @@ repositories {
dependencies {
compileOnly 'de.themoep:minedown-adventure:1.7.1-SNAPSHOT'
- compileOnly 'org.jetbrains:annotations:23.0.0'
+ compileOnly 'org.jetbrains:annotations:24.0.1'
testImplementation 'de.themoep:minedown-adventure:1.7.1-SNAPSHOT'
- testImplementation 'net.kyori:adventure-platform-bukkit:4.1.2'
- testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
- testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
+ testImplementation 'net.kyori:adventure-platform-bukkit:4.3.0'
+ testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
+ testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
}
compileJava.options.encoding = 'UTF-8'
-tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
-java {
- withSourcesJar()
- withJavadocJar()
+logger.lifecycle("Building PagineDown ${version} by William278")
+version rootProject.version
+archivesBaseName = "${rootProject.name}"
+
+license {
+ header = rootProject.file('HEADER')
+ include '**/*.java'
+ newLine = true
}
javadoc {
@@ -37,6 +44,11 @@ javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}
+java {
+ withSourcesJar()
+ withJavadocJar()
+}
+
publishing {
publications {
shadow(MavenPublication) { publication ->
diff --git a/src/main/java/net/william278/paginedown/ListOptions.java b/src/main/java/net/william278/paginedown/ListOptions.java
index eafbd9d..434a5cb 100644
--- a/src/main/java/net/william278/paginedown/ListOptions.java
+++ b/src/main/java/net/william278/paginedown/ListOptions.java
@@ -1,3 +1,22 @@
+/*
+ * This file is part of PagineDown, licensed under the Apache License 2.0.
+ *
+ * Copyright (c) William278
+ * Copyright (c) contributors
+ *
+ * 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.
+ */
+
package net.william278.paginedown;
import org.jetbrains.annotations.NotNull;
diff --git a/src/main/java/net/william278/paginedown/PaginatedList.java b/src/main/java/net/william278/paginedown/PaginatedList.java
index 1c946ad..ff9398c 100644
--- a/src/main/java/net/william278/paginedown/PaginatedList.java
+++ b/src/main/java/net/william278/paginedown/PaginatedList.java
@@ -1,3 +1,22 @@
+/*
+ * This file is part of PagineDown, licensed under the Apache License 2.0.
+ *
+ * Copyright (c) William278
+ * Copyright (c) contributors
+ *
+ * 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.
+ */
+
package net.william278.paginedown;
diff --git a/src/main/java/net/william278/paginedown/PaginationException.java b/src/main/java/net/william278/paginedown/PaginationException.java
index a10ef65..5cffc5d 100644
--- a/src/main/java/net/william278/paginedown/PaginationException.java
+++ b/src/main/java/net/william278/paginedown/PaginationException.java
@@ -1,3 +1,22 @@
+/*
+ * This file is part of PagineDown, licensed under the Apache License 2.0.
+ *
+ * Copyright (c) William278
+ * Copyright (c) contributors
+ *
+ * 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.
+ */
+
package net.william278.paginedown;
public class PaginationException extends RuntimeException {
diff --git a/src/test/java/net/william278/paginedown/PaginatedListTests.java b/src/test/java/net/william278/paginedown/PaginatedListTests.java
index a051123..2acec76 100644
--- a/src/test/java/net/william278/paginedown/PaginatedListTests.java
+++ b/src/test/java/net/william278/paginedown/PaginatedListTests.java
@@ -1,3 +1,22 @@
+/*
+ * This file is part of PagineDown, licensed under the Apache License 2.0.
+ *
+ * Copyright (c) William278
+ * Copyright (c) contributors
+ *
+ * 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.
+ */
+
package net.william278.paginedown;
import org.junit.jupiter.api.Assertions;