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

ksp configurations do not resolve versions from gradle platform #1844

Open
serpro69 opened this issue Apr 17, 2024 · 0 comments
Open

ksp configurations do not resolve versions from gradle platform #1844

serpro69 opened this issue Apr 17, 2024 · 0 comments

Comments

@serpro69
Copy link

I have a bom that contains versions of all submodules in a project.
It seems that when adding dependencies to ksp or kspTest configurations, the bom is not being used to lookup versions.
E.g. this works :

// build.gradle.kts

dependencies {
        testImplementation(platform("io.github.serpro69:kotlin-faker-bom:2.0.0-rc.4"))
        testImplementation("io.github.serpro69:kotlin-faker")
        testImplementation("io.github.serpro69:kotlin-faker-kotest-property")
        kspTest("io.github.serpro69:kotlin-faker-kotest-property:2.0.0-rc.1")
        kspTest("io.github.serpro69:kotlin-faker-kotest-property-ksp:2.0.0-rc.1")
        kspTest("io.github.serpro69:kotlin-faker:2.0.0-rc.4")
}

Note that testImplementation dependencies don't declare versions and they're picked up from the bom.

However, something like this does not work:

dependencies {
        testImplementation(platform("io.github.serpro69:kotlin-faker-bom:2.0.0-rc.4"))
        testImplementation("io.github.serpro69:kotlin-faker")
        testImplementation("io.github.serpro69:kotlin-faker-kotest-property")
        kspTest("io.github.serpro69:kotlin-faker-kotest-property")
        kspTest("io.github.serpro69:kotlin-faker-kotest-property-ksp")
        kspTest("io.github.serpro69:kotlin-faker")
}

In this case I'm getting errors that artifacts couldn't be found:

Execution failed for task ':release:kspTestKotlin'.
> Could not resolve all files for configuration ':release:kspTestKotlinProcessorClasspath'.
   > Could not find io.github.serpro69:kotlin-faker-kotest-property:.
     Required by:
         project :release
   > Could not find io.github.serpro69:kotlin-faker-kotest-property-ksp:.
     Required by:
         project :release
   > Could not find io.github.serpro69:kotlin-faker:.
     Required by:
         project :release

I also tried to add platform dependency with the bom to kspTest configuration, but that didn't help.

Any chance this can be supported or are there any known workarounds?

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