Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kspKotlin depends on generateProto #694

Open
schmist opened this issue Apr 24, 2023 · 0 comments
Open

kspKotlin depends on generateProto #694

schmist opened this issue Apr 24, 2023 · 0 comments

Comments

@schmist
Copy link

schmist commented Apr 24, 2023

Please see the minimal example here: https://github.com/schmist/ksp-proto-minimal and my comment here: #624

The problem we face is that for some unknown (at least to me) reason, the kspKotlin Gradle tasks depends on the generateProto task as soon as the protobuf plugin is added to the module. Please run ./gradlew :workload:kspKotlin --dry-run in the provided minimal example to reproduce.

Strangly the dependency disappears when changing the main/java source set reference in the affected module, e.g., add

sourceSets {
    main {
        java {
            setSrcDirs(srcDirs)
        }
    }
}

to the workload build.gradle.kts file.

Is this expected behavior? Versions 0.8.x do not have this issue.

In our (more complicated) build we additionally enforce that proto buffers are generated before running ksp which leads to a cyclic task dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant