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

Can't find place of storing generated files by ksp #290

Open
Coolmanakov opened this issue Jun 22, 2022 · 2 comments
Open

Can't find place of storing generated files by ksp #290

Coolmanakov opened this issue Jun 22, 2022 · 2 comments

Comments

@Coolmanakov
Copy link

Coolmanakov commented Jun 22, 2022

Here is my code

val compilation = KotlinCompilation().apply {
sources = listOf(sourceFile)
symbolProcessorProviders = listOf(KspProvider())
inheritClassPath = true
kspWithCompilation = true
workingDir = File(testWorkingDir)
}
compilationResult = compilation.compile()

compilationResult.generatedFiles contains necessary files, but they are compiled equivalent of what I really need, that's why I can not compare them with expected
But I have generated files in build/generated/ksp/..., but KotlinCompilation.Result property sourcesGeneratedByAnnotationProcessor is empty. It means, that generating is working fine, but access to them impossible thing - in my experience.
How can I take the generated files while testing my processor?
My issue has the same problem as already opened issue #129

@Coolmanakov Coolmanakov changed the title Can't find place of storing generated files by kip Can't find place of storing generated files by ksp Jun 22, 2022
@micHar
Copy link

micHar commented Jun 24, 2022

See this for file location: #129
And this to access compiled classes: #72 (comment)

@micHar
Copy link

micHar commented Jun 24, 2022

My understanding is that this lib is not fully compatible with ksp yet. Methods and properties like generatedFiles work fine for kapt, but for ksp you need a little duct tape ;).

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

2 participants