Skip to content

Commit

Permalink
Update plugin com.google.devtools.ksp to v1.9.21-1.0.16 (cortinico#220)
Browse files Browse the repository at this point in the history
* Update plugin com.google.devtools.ksp to v1.9.21-1.0.16

* Adapt the plugin to work with KSP 1.9.21

* Update changelog

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nicola Corti <[email protected]>
  • Loading branch information
renovate[bot] and cortinico authored Dec 15, 2023
1 parent 44b4101 commit ca3ef2e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Please add your entries according to this format.

## Unreleased

- Adapt the plugin to work with KSP 1.9.21
- Remove legacy `kotlin-compiler-embeddable` dependency to prevent potential Kotlin version conflicts
- Kotlin to 1.9.21

Expand Down
6 changes: 6 additions & 0 deletions example-kmp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
}

kotlin {
jvmToolchain(17)
jvm()
androidTarget()
}
Expand All @@ -21,3 +22,8 @@ android {
tasks.withType<Test> {
useJUnitPlatform()
}

dependencies {
testImplementation(platform(libs.junit.bom))
testImplementation(libs.jupiter)
}
6 changes: 5 additions & 1 deletion example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
plugins {
kotlin("jvm")
id("com.ncorti.ktfmt.gradle")
id("com.google.devtools.ksp") version "1.9.10-1.0.13"
id("com.google.devtools.ksp") version "1.9.21-1.0.16"
id("app.cash.sqldelight") version "2.0.1"
}

ktfmt {
kotlinLangStyle()
}

kotlin {
jvmToolchain(17)
}

dependencies {
testImplementation(platform(libs.junit.bom))
testImplementation(libs.jupiter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ internal object KtfmtPluginUtils {
charArray.concatToString()
}
val taskName = "$TASK_NAME_CHECK$capitalizedName"
val inputDirs = srcDir.toList()
return project.tasks.register(taskName, KtfmtCheckTask::class.java) {
it.description =
"Run Ktfmt formatter for sourceSet '$name' on project '${project.name}'"
it.setSource(srcDir)
it.setSource(inputDirs)
it.setIncludes(KtfmtPlugin.defaultIncludes)
it.setExcludes(KtfmtPlugin.defaultExcludes)
it.bean = ktfmtExtension.toBean()
Expand All @@ -107,10 +108,11 @@ internal object KtfmtPluginUtils {
charArray.concatToString()
}
val taskName = "$TASK_NAME_FORMAT$srcSetName"
val inputDirs = srcDir.toList()
return project.tasks.register(taskName, KtfmtFormatTask::class.java) {
it.description =
"Run Ktfmt formatter validation for sourceSet '$name' on project '${project.name}'"
it.setSource(srcDir)
it.setSource(inputDirs)
it.setIncludes(KtfmtPlugin.defaultIncludes)
it.setExcludes(KtfmtPlugin.defaultExcludes)
it.bean = ktfmtExtension.toBean()
Expand Down

0 comments on commit ca3ef2e

Please sign in to comment.