Skip to content

Commit

Permalink
use gradle plugin in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
be-hase committed Jun 27, 2024
1 parent 99a85a9 commit 5fd1268
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/spring-data-jdbc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("conventions.preset.base")
alias(libs.plugins.kotlin.spring)
alias(libs.plugins.spring.boot)
alias(libs.plugins.kuery.client)
}

description = "Example of spring-data-jdbc"
Expand All @@ -18,8 +19,6 @@ dependencies {
implementation("com.mysql:mysql-connector-j")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")

kotlinCompilerPluginClasspath(projects.kueryClientCompiler)

detektPlugins(projects.kueryClientDetekt)
}

Expand All @@ -28,6 +27,7 @@ detekt {
disableDefaultRuleSets = true
}

// Since they are dependent within the same project, I am writing it this way. There is no need to imitate this.
tasks.withType<Detekt> {
dependsOn(":${projects.kueryClientDetekt.name}:assemble")
}
4 changes: 2 additions & 2 deletions examples/spring-data-r2dbc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("conventions.preset.base")
alias(libs.plugins.kotlin.spring)
alias(libs.plugins.spring.boot)
alias(libs.plugins.kuery.client)
}

description = "Example of spring-data-r2dbc"
Expand All @@ -18,8 +19,6 @@ dependencies {
implementation("io.asyncer:r2dbc-mysql")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")

kotlinCompilerPluginClasspath(projects.kueryClientCompiler)

detektPlugins(projects.kueryClientDetekt)
}

Expand All @@ -28,6 +27,7 @@ detekt {
disableDefaultRuleSets = true
}

// Since they are dependent within the same project, I am writing it this way. There is no need to imitate this.
tasks.withType<Detekt> {
dependsOn(":${projects.kueryClientDetekt.name}:assemble")
}
5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ assertk = { module = "com.willowtreeapps.assertk:assertk-jvm", version = "0.28.1
detekt-api = { module = "io.gitlab.arturbosch.detekt:detekt-api", version.ref = "detekt" }
detekt-test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version.ref = "detekt" }
junit-bom = { module = "org.junit:junit-bom", version = "5.10.3" }
kotlin-compile-testing = {module="com.github.tschuchortdev:kotlin-compile-testing", version="1.6.0"}
kotlin-compile-testing = { module = "com.github.tschuchortdev:kotlin-compile-testing", version = "1.6.0" }
kotlin-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
kotlin-coroutines-reactor = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", version.ref = "kotlin-coroutines" }
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlin-coroutines" }
Expand All @@ -35,5 +35,6 @@ gradle-plugin-maven-publish = { module = "com.vanniktech:gradle-maven-publish-pl
[plugins]
buildconfig = { id = "com.github.gmazzo.buildconfig", version = "5.3.5" }
kotlin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin-core" }
plugin-publish = {id="com.gradle.plugin-publish", version="1.2.1"}
kuery-client = { id = "dev.hsbrysk.kuery-client", version = "0.4.1" } # for example code
plugin-publish = { id = "com.gradle.plugin-publish", version = "1.2.1" }
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }

0 comments on commit 5fd1268

Please sign in to comment.