mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Move patches around
This commit is contained in:
76
patches/api/Convert-project-to-Gradle.patch
Normal file
76
patches/api/Convert-project-to-Gradle.patch
Normal file
@@ -0,0 +1,76 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle Wood <kyle@denwav.dev>
|
||||
Date: Thu, 10 Dec 2020 20:50:33 -0800
|
||||
Subject: [PATCH] Convert project to Gradle
|
||||
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -0,0 +0,0 @@
|
||||
+.gradle/
|
||||
+
|
||||
# Eclipse stuff
|
||||
/.classpath
|
||||
/.project
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@
|
||||
+plugins {
|
||||
+ `java-library`
|
||||
+ checkstyle
|
||||
+}
|
||||
+
|
||||
+java {
|
||||
+ withSourcesJar()
|
||||
+ withJavadocJar()
|
||||
+}
|
||||
+
|
||||
+dependencies {
|
||||
+ // api dependencies are listed transitively to API consumers
|
||||
+ api("commons-lang:commons-lang:2.6")
|
||||
+ api("com.google.guava:guava:21.0")
|
||||
+ api("com.google.code.gson:gson:2.8.0")
|
||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||
+ api("org.yaml:snakeyaml:1.29")
|
||||
+
|
||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.1")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.0")
|
||||
+
|
||||
+ val annotations = "org.jetbrains:annotations-java5:21.0.1"
|
||||
+ compileOnly(annotations)
|
||||
+ testCompileOnly(annotations)
|
||||
+
|
||||
+ testImplementation("junit:junit:4.13.1")
|
||||
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.1")
|
||||
+
|
||||
+ checkstyle("com.puppycrawl.tools:checkstyle:8.39")
|
||||
+}
|
||||
+
|
||||
+tasks.jar {
|
||||
+ manifest {
|
||||
+ attributes += mapOf(
|
||||
+ "Automatic-Module-Name" to "org.bukkit"
|
||||
+ )
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+tasks.withType<Javadoc>().configureEach {
|
||||
+ (options as StandardJavadocDocletOptions).links(
|
||||
+ "https://guava.dev/releases/21.0/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.27/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/20.1.0/",
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/"
|
||||
+ )
|
||||
+}
|
||||
+
|
||||
+checkstyle {
|
||||
+ configFile = file("checkstyle.xml")
|
||||
+ sourceSets = listOf(project.sourceSets.main.get(), project.sourceSets.test.get())
|
||||
+}
|
Reference in New Issue
Block a user