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

Feature: Gradle Plugin samples runner #38

Open
eriwen opened this issue Dec 10, 2018 · 1 comment
Open

Feature: Gradle Plugin samples runner #38

eriwen opened this issue Dec 10, 2018 · 1 comment

Comments

@eriwen
Copy link
Contributor

eriwen commented Dec 10, 2018

As a Gradle plugin author, I'd like to inject the Gradle plugin under test into the samples test.

Expected Behavior

Provide a GradlePluginSamplesRunner that configures withPluginClasspath() on TestKit.

Current Behavior

Context

There's now 2 plugins that want this. Be cool to provide this.

@britter
Copy link
Contributor

britter commented Feb 21, 2021

Bonus if this also provides a way to have the samples in a different (documentation) module of the build. This is currently not easily possible and requires some boilerplate and has some limitations. I've done it in one of my pet projects:

Limitations with this approach:

  • Does only work for a single plugin module. If one documentation module should have sample tests for plugins coming from several modules, the individual pluginUnderTestMetadata files would need to be merged in order to construct the classpath
  • Publishing pluginUnderTestMetadata breaks plugin publication (see Plugin publication fails if project contains additional configurations with outgoing artifacts gradle#13980)
  • The solution is coupled to the way the plugin development plugin works (e.g. the existence and output of the PluginUnderTestMetadata task)

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