Skip to content

Adding KSP dependencies in Project.afterEvaluate results in KSP tasks not being registered #1524

Open
@ZacSweers

Description

We sometimes have plugins that defer configuration until after buildscripts are evaluated to get a correct picture of the the project's setup. If we defer adding KSP dependencies until this, it appears that KSP's gradle plugin will end up incorrectly never registering KSP tasks if they're not added directly in the buildscript.

Example build file

plugins {
  kotlin("jvm")
  id("com.google.devtools.ksp")
}

afterEvaluate {
  dependencies.add("ksp", exampleDep)
}

The above will fail to register any KSP tasks even though a KSP processor dep was added eventually

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions