-
-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Velocity buildscripts to Kotlin DSL (#918)
Spiritually indebted to #518 and @alexstaeding. There's a minor break - we're going up to 3.2.0-SNAPSHOT as the API now compiles against Java 11. But this is more academic in practice.
- Loading branch information
Showing
300 changed files
with
2,880 additions
and
2,169 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
plugins { | ||
`java-library` | ||
`maven-publish` | ||
} | ||
|
||
license { | ||
header(project.file("HEADER.txt")) | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
|
||
sourceSets["main"].java { | ||
srcDir("src/ap/java") | ||
} | ||
} | ||
|
||
val gsonVersion: String by project.extra | ||
val guiceVersion: String by project.extra | ||
val guavaVersion: String by project.extra | ||
val adventureVersion: String by project.extra | ||
val slf4jVersion: String by project.extra | ||
val checkerFrameworkVersion: String by project.extra | ||
val configurateVersion: String by project.extra | ||
|
||
dependencies { | ||
api("com.google.code.gson:gson:$gsonVersion") | ||
api("com.google.guava:guava:$guavaVersion") | ||
|
||
// DEPRECATED: Will be removed in Velocity Polymer | ||
api("com.moandjiezana.toml:toml4j:0.7.2") | ||
|
||
api(platform("net.kyori:adventure-bom:${adventureVersion}")) | ||
api("net.kyori:adventure-api") | ||
api("net.kyori:adventure-text-serializer-gson") | ||
api("net.kyori:adventure-text-serializer-legacy") | ||
api("net.kyori:adventure-text-serializer-plain") | ||
api("net.kyori:adventure-text-minimessage") | ||
|
||
api("org.slf4j:slf4j-api:$slf4jVersion") | ||
api("com.google.inject:guice:$guiceVersion") | ||
api("org.checkerframework:checker-qual:${checkerFrameworkVersion}") | ||
api("com.velocitypowered:velocity-brigadier:1.0.0-SNAPSHOT") | ||
|
||
api("org.spongepowered:configurate-hocon:${configurateVersion}") | ||
api("org.spongepowered:configurate-yaml:${configurateVersion}") | ||
api("org.spongepowered:configurate-gson:${configurateVersion}") | ||
} | ||
|
||
tasks { | ||
jar { | ||
manifest { | ||
attributes["Automatic-Module-Name"] = "com.velocitypowered.api" | ||
} | ||
} | ||
withType<Javadoc> { | ||
exclude("com/velocitypowered/api/plugin/ap/**") | ||
|
||
val o = options as StandardJavadocDocletOptions | ||
o.encoding = "UTF-8" | ||
o.source = "8" | ||
|
||
o.links( | ||
"https://www.slf4j.org/apidocs/", | ||
"https://guava.dev/releases/$guavaVersion/api/docs/", | ||
"https://google.github.io/guice/api-docs/$guiceVersion/javadoc/", | ||
"https://docs.oracle.com/en/java/javase/11/docs/api/", | ||
"https://jd.adventure.kyori.net/api/$adventureVersion/" | ||
) | ||
|
||
// Disable the crazy super-strict doclint tool in Java 8 | ||
o.addStringOption("Xdoclint:none", "-quiet") | ||
|
||
// Remove "undefined" from search paths when generating javadoc for a non-modular project (JDK-8215291) | ||
if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) { | ||
o.addBooleanOption("-no-module-directories", true) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
KamillaovaJan 3, 2023
•
edited
Loading