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

Buf plugin can't find "check" task #75

Closed
erawhctim opened this issue Jun 1, 2022 · 6 comments
Closed

Buf plugin can't find "check" task #75

erawhctim opened this issue Jun 1, 2022 · 6 comments

Comments

@erawhctim
Copy link

When I apply this plugin to a subproject, it fails with this error message:

Task with name 'check' not found in project

When I remove the plugin and run the check task manually, it works fine.

It seems the plugin tries to access the check task before its available, somehow? Any idea what I'm missing?

@andrewparmet
Copy link
Collaborator

Maybe the plugin is being applied before another plugin that creates the check task? That would be the Java plugin, Kotlin plugin, etc.?

Can you share any snippet of your configuration or an MVP that demonstrates the issue?

@erawhctim
Copy link
Author

It's an android project with a JVM-only sub-project where the buf plugin is applied:

plugins {
    id 'kotlin'
    id 'com.parmet.buf' version '0.6.2'
}

buf {
    checkSchemaAgainstLatestRelease = false
    enforceFormat = false
}

@andrewparmet
Copy link
Collaborator

andrewparmet commented Jun 2, 2022

Which Kotlin plugin is that, and which version? I vaguely remember using that notation in the past, but these days I think id 'org.jetbrains.kotlin.jvm' is the preferred notation. What happens if you use that plugin?

@erawhctim
Copy link
Author

That's a good question; I'm not sure why we're not using the newer plugin name.
Unfortunately I end up with the same result with the org.jetbrains.kotlin.jvm one 😞

I'll try and throw together a small repro. sample for you today

@andrewparmet
Copy link
Collaborator

andrewparmet commented Jun 3, 2022

I pushed a new version that should be more resilient to different plugin ordering. Try out 0.6.3 and let me know how it goes.

@andrewparmet
Copy link
Collaborator

Fixed by #79. Closing since this issue should be fixed. Feel free to re-open if you still run into trouble.

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