Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.get

class JavaConventionPlugin : Plugin<Project> {
/**
* Configures a Gradle project with Java conventions: applies the Java plugin, sets the Java toolchain language version to 25, and makes the `compileOnly` configuration extend from `annotationProcessor`.
*
* @param project The target Gradle project to configure.
*/
override fun apply(project: Project) {
project.pluginManager.apply(JavaPlugin::class)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.get

class JavaLibraryConventionPlugin : Plugin<Project> {
/**
* Configures the given Gradle project as a Java library: applies the Java Library plugin, sets the Java toolchain language version to 25, and makes the `compileOnly` configuration extend from `annotationProcessor`.
*
* @param project The target Gradle project to configure.
*/
override fun apply(project: Project) {
project.pluginManager.apply(JavaLibraryPlugin::class)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.withType

class KotlinConventionPlugin : Plugin<Project> {
/**
* Configures the project with Kotlin plugins and a consistent Kotlin compiler configuration.
*
* Applies the Kotlin JVM, Kotlin Spring and Kotlin JPA plugins, and configures all KotlinCompile
* tasks to enable strict nullability checks, enable extra warnings, treat all warnings as errors,
* and target JVM 25.
*/
override fun apply(project: Project) {
project.pluginManager.apply("org.jetbrains.kotlin.jvm")
project.pluginManager.apply("org.jetbrains.kotlin.plugin.spring")
Expand Down
Loading