Provides standard defaults for MythicDrops Gradle-based projects.
The dev.mythicdrops.gradle.project
plugin applies all the below plugins when applied to your root project.
Replace x.y.z
in the snippet below with the version you want to use.
plugins {
id("dev.mythicdrops.gradle.project") version "x.y.z"
}
The dev.mythicdrops.gradle.project.root
plugin will configure the following when applied to your root project:
- Applies the
org.shipkit.shipkit-auto-version
Gradle plugin
Replace x.y.z
in the snippet below with the version you want to use.
plugins {
id("dev.mythicdrops.gradle.project.root") version "x.y.z"
}
The dev.mythicdrops.gradle.project.base
plugin will configure the following when applied to any project:
- Applies the
nebula.project
Gradle plugin - Applies the
com.adarshr.test-logger
Gradle plugin- Configures the
com.adarshr.test-logger
plugin to use the Mocha theme
- Configures the
- Configures all test tasks to use JUnit Jupiter
Replace x.y.z
in the snippet below with the version you want to use.
plugins {
id("dev.mythicdrops.gradle.project.base") version "x.y.z"
}
The dev.mythicdrops.gradle.release.github
plugin will configure the following when applied to your root project:
- Applies the
org.shipkit.shipkit-changelog
Gradle plugin - Applies the
org.shipkit.shipkit-github-release
Gradle plugin
Replace x.y.z
in the snippet below with the version you want to use.
plugins {
id("dev.mythicdrops.gradle.release.github") version "x.y.z"
}
Configure the repository you're running the project in by adding this snippet to your root build.gradle.kts
:
mythicDropsRelease {
repository = "GitHubOrganization/GitHubRepository"
}
The dev.mythicdrops.gradle.convention.java
plugin will configure the following when applied to any project that also
has the java
plugin applied:
- Configures the project to compile targeting JDK 17
- Configures the project to pass the
-parameters
javac flag when compiling - Applies the
jacoco
Gradle plugin- Configures the
jacoco
plugin to use JaCoCo 0.8.7
- Configures the
- Configures test tasks to be finalized by running a JaCoCo code coverage report
Replace x.y.z
in the snippet below with the version you want to use.
plugins {
id("dev.mythicdrops.gradle.convention.java") version "x.y.z"
}
You can override the JDK version the same way you'd override it in a normal Java project:
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
The dev.mythicdrops.gradle.conventions.kotlin.jvm
plugin will configure the following when applied to any project that
also has the org.jetbrains.kotlin.jvm
plugin applied:
- Configures the project to compile targeting JDK 16
- Configures the project to pass the
-parameters
javac flag when compiling - Applies the
detekt
Gradle plugin - Applies the
ktlint
Gradle plugin- Configures the
ktlint
plugin to use KTLint 0.43.0
- Configures the
- Applies the
dokka
Gradle plugin - Configures Javadoc JARs to include dokka output
Replace x.y.z
in the snippet below with the version you want to use.
plugins {
id("dev.mythicdrops.gradle.convention.kotlin.jvm") version "x.y.z"
}
The dev.mythicdrops.gradle.conventions.maven-publish
plugin will configure the following when applied to any project
that also has the maven-publih
plugin applied:
- Configures published Maven POMs to include
compileOnly
dependencies asprovided
- Configures published Maven POMs to have an MIT License
- Configures the project to publish to Sonatype OSSRH if
SONATYPE_USER
andSONATYPE_PWD
environment variables are available - Configures the project to sign published artifacts with GPG if
PGP_KEY
andPGP_PWD
environment variables are available
Replace x.y.z
in the snippet below with the version you want to use.
plugins {
id("dev.mythicdrops.gradle.convention.kotlin.jvm") version "x.y.z"
}