Package-level declarations

Types

Link copied to clipboard

A class to represent a semantic version (example: 1.19.2)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun Project.addBuildShadowTask()

Adds the task that makes gradle build run gradle shadowJar

Link copied to clipboard
fun Project.addCompilerArgs(vararg args: String)

Adds the specified compiler arguments to the project

Link copied to clipboard
fun Project.addJavadocSourcesJars(javadocClassifier: String? = null, sourcesClassifier: String? = null)

Adds the task that generates the Javadoc and sources jar files

Link copied to clipboard
fun Project.addPlatformsResourceFileTask(platforms: Map<PluginPlatform, String>): TaskProvider<Task>
Link copied to clipboard
fun Project.addReplacementsTask(files: Set<String> = setOf("plugin.yml"), replacements: Map<String, String> = getDefaultReplacements())

Configures the processResources and processTestResources tasks to add replacements

Link copied to clipboard
fun Project.adventure(vararg dependencies: AdventureDependency, configurationAll: String? = null)
Link copied to clipboard
fun Project.annoyingAPI(config: DependencyConfig, block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>
Link copied to clipboard
fun <T : ModuleDependency> Project.dependencyRelocate(dependency: T, relocateFrom: String, relocateTo: String = ".libs.", configuration: String = "implementation", configurationAction: T.() -> Unit = {}): T
fun Project.dependencyRelocate(dependency: String, relocateFrom: String = dependency.split(":").first(), relocateTo: String = ".libs.", configuration: String = "implementation", configurationAction: ExternalModuleDependency.() -> Unit = {}): ExternalModuleDependency
Link copied to clipboard

Replaces all dots in the string with {}

Link copied to clipboard
fun Project.generateAnnoyingApiRuntimeLibraryEnum(libraries: Collection<RuntimeLibrary>, generateRuntimeLibraryEnumConfig: GenerateRuntimeLibraryEnumConfig = GenerateRuntimeLibraryEnumConfig(), annoyingMetadata: AnnoyingMetadata? = null)
Link copied to clipboard

Gets the metadata for the Annoying API with the specified version

Link copied to clipboard

Returns the default replacements map for addReplacementsTask

Link copied to clipboard

Gets the environment variable with the specified name

Link copied to clipboard
fun Project.getJavaExtension(): JavaPluginExtension

Gets the Java plugin extension

Link copied to clipboard
fun getJavaVersionForMC(minecraftVersion: String): JavaVersion

Returns the correct Java version that is required for the Minecraft version

Link copied to clipboard
fun Project.getPackage(): String

Gets the main package of the project

Link copied to clipboard
fun Project.getPublishing(): PublishingExtension
Link copied to clipboard

Returns the version string with -R0.1-SNAPSHOT appended to it

Link copied to clipboard

Checks if the application plugin is applied

Link copied to clipboard
fun Project.hasJavaPlugin(): Boolean

Checks if the java plugin is applied

Link copied to clipboard
Link copied to clipboard
fun Project.hasPublishPlugin(): Boolean

Checks if the maven-publish plugin is applied

Link copied to clipboard
fun Project.hasShadowPlugin(): Boolean

Checks if the Shadow plugin is applied

Link copied to clipboard
fun Project.jda(config: DependencyConfig, block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>
Link copied to clipboard
fun Project.lazyLibrary(config: DependencyConfig, block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>
Link copied to clipboard
fun Project.magicMongo(config: DependencyConfig, block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>
Link copied to clipboard

Makes the given package path safe to use

Link copied to clipboard
fun Project.mockBukkit(config: DependencyConfig, mockBukkitConfig: MockBukkitConfig = MockBukkitConfig(), block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>
Link copied to clipboard
fun Project.paper(config: DependencyConfig, spigotConfig: SpigotConfig = SpigotConfig(), block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>
Link copied to clipboard

Removes {package}.libs. and runs dotsToBrackets

Link copied to clipboard
fun Project.processRuntimeLibraries(libraries: Collection<RuntimeLibrary>, runtimeLibrariesConfig: RuntimeLibrariesConfig = RuntimeLibrariesConfig())

Processes the specified runtime libraries

Link copied to clipboard
fun Project.relocate(from: String, to: String = ".libs.", action: SimpleRelocator.() -> Unit = {})

Relocates the specified package to the specified package

Link copied to clipboard
fun Project.setJavaVersion(version: JavaVersion = JavaVersion.VERSION_1_8)

Sets the Java version for the project

Link copied to clipboard
fun Project.setMainClass(mainClassName: String? = null)

Sets the main class for the project

Link copied to clipboard
fun Project.setShadowArchiveClassifier(classifier: String = "")

Sets the artifact/archive classifier for the JAR and Shadow JAR tasks

Link copied to clipboard
fun Project.setTextEncoding(encoding: String = "UTF-8")

Sets the text encoding for the project

Link copied to clipboard
fun Project.setupAnnoyingAPI(javaSetupConfig: JavaSetupConfig = JavaSetupConfig(), mcSetupConfig: MCSetupConfig = MCSetupConfig(), annoyingAPIConfig: DependencyConfig, annoyingSetupConfig: AnnoyingSetupConfig = AnnoyingSetupConfig(), metadataConfig: MetadataConfig = MetadataConfig(), customRuntimeLibrariesConfig: CustomRuntimeLibrariesConfig = CustomRuntimeLibrariesConfig(), publishingPlatformConfig: PublishingPlatformConfig = PublishingPlatformConfig(mapOf())): AnnoyingMetadata?

Sets up the project using Annoying API. The root project's name must be the same as the one in plugin.yml!

Link copied to clipboard
fun Project.setupJava(config: JavaSetupConfig = JavaSetupConfig())

Sets up the project for a simple Java project

Link copied to clipboard
fun Project.setupJda(javaSetupConfig: JavaSetupConfig = JavaSetupConfig(), jdaSetupConfig: JdaSetupConfig = JdaSetupConfig(), jdaConfig: DependencyConfig)

Sets up the project using JDA (Java-Discord API)

Link copied to clipboard
fun Project.setupLazyLibrary(javaSetupConfig: JavaSetupConfig = JavaSetupConfig(), jdaSetupConfig: JdaSetupConfig = JdaSetupConfig(), jdaConfig: DependencyConfig, lazyLibraryConfig: DependencyConfig)

Sets up the project using Lazy Library

Link copied to clipboard
fun Project.setupMC(javaSetupConfig: JavaSetupConfig = JavaSetupConfig(), mcSetupConfig: MCSetupConfig = MCSetupConfig())

Sets up the project for Minecraft development

Link copied to clipboard
fun Project.setupMockBukkit(junitBomConfig: DependencyConfig, mockBukkitDependencyConfig: DependencyConfig, mockBukkitConfig: MockBukkitConfig = MockBukkitConfig(), block: Test.() -> Unit = {}): TaskProvider<Test>

Sets up the project for testing with JUnit and MockBukkit

Link copied to clipboard
fun Project.setupPublishingEnv(simpleConfig: PublishingSimpleConfig = PublishingSimpleConfig(this), envConfig: PublishingEnvConfig = PublishingEnvConfig()): MavenPublication

Sets up a bit more advanced publishing configuration using environment variables and a custom repository

Link copied to clipboard

Sets up publishing for project platforms (GitHub, Modrinth, CurseForge)

Link copied to clipboard
fun Project.setupPublishingSimple(config: PublishingSimpleConfig = PublishingSimpleConfig(this), configuration: MavenPublication.() -> Unit = {}): MavenPublication

Sets up a simple publishing configuration

Link copied to clipboard
fun Project.setupTesting(junitBomConfig: DependencyConfig, block: Test.() -> Unit = {}): TaskProvider<Test>

Sets up the project for testing with JUnit

Link copied to clipboard

Silences missing JavaDoc warnings

Link copied to clipboard
fun Project.spigotAPI(config: DependencyConfig, spigotConfig: SpigotConfig = SpigotConfig(), block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>
Link copied to clipboard
fun Project.spigotNMS(config: DependencyConfig, spigotConfig: SpigotConfig = SpigotConfig(), block: ExternalModuleDependency.() -> Unit = {}): List<ExternalModuleDependency>