Skip to content

Commit

Permalink
Merge pull request #15 from alpaca0984/build-work-with-ksp
Browse files Browse the repository at this point in the history
build: declare dependency from KSP
  • Loading branch information
gaelmarhic authored Dec 16, 2023
2 parents cee8ce6 + 51d2a4f commit 23b6984
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "org.jetbrains.kotlin.jvm" version "1.4.0"
id "com.gradle.plugin-publish" version "0.11.0"
id 'java-gradle-plugin'
id "maven"
id "maven-publish"
}

repositories {
Expand Down Expand Up @@ -35,10 +35,10 @@ compileTestKotlin {
group = "com.gaelmarhic"
version = "1.7"

uploadArchives {
publishing {
repositories {
mavenDeployer {
repository(url: uri('mavenrepo'))
maven {
url = uri('mavenrepo')
}
}
}
Expand Down
9 changes: 7 additions & 2 deletions src/main/kotlin/com/gaelmarhic/quadrant/QuadrantPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,13 @@ class QuadrantPlugin : Plugin<Project> {

private fun BaseExtension.sourceSet(name: String) = sourceSets.getByName(name)

private fun <T : BaseVariant> Task.isCompileKotlinTask(variant: T) =
name == "compile${variant.name.capitalize()}Kotlin"
private fun <T : BaseVariant> Task.isCompileKotlinTask(variant: T): Boolean {
val variantName = variant.name.capitalize()
return name in listOf(
"compile${variantName}Kotlin",
"ksp${variantName}Kotlin",
)
}

companion object {

Expand Down

0 comments on commit 23b6984

Please sign in to comment.