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

p2deps plugin put jars into multiple source sets #109

Open
nedtwigg opened this issue Mar 13, 2023 · 0 comments
Open

p2deps plugin put jars into multiple source sets #109

nedtwigg opened this issue Mar 13, 2023 · 0 comments
Labels
enhancement New feature or request plugin-gradle

Comments

@nedtwigg
Copy link
Collaborator

A pattern has emerged in how the p2deps plugin is used. In Solstice it's used to add one small set of jars onto the compile classpath, and then a larger set onto a testing classpath

into 'compileOnly', {
p2repo "https://download.eclipse.org/eclipse/updates/${VERSION}/"
install 'org.eclipse.ui.ide.application'
}
into 'testImplementation', {
p2repo "https://download.eclipse.org/eclipse/updates/${VERSION}/"
install 'org.eclipse.platform.ide.categoryIU'
addFilter 'multiple-ICompilationUnit', {
it.exclude 'org.apache.jasper.glassfish'
}
install 'org.eclipse.releng.java.languages.categoryIU'
p2repo 'https://download.eclipse.org/buildship/updates/e423/releases/3.x/3.1.6.v20220511-1359/'
install 'org.eclipse.buildship.feature.group'
}

And in Spotless it's used to add different things into multiple compileOnly classpaths

https://github.com/diffplug/spotless/blob/bc21f833c000b4095232bf211edacd8450a7ac2d/lib-extra/build.gradle#L71-L87

But we really want to add it into the testImplementation classpath too. e.g.

p2deps {
  into ['jdtCompileOnly', 'jdtTestImplementation'], {
    p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
    install 'org.eclipse.jdt.core'
    ...

So it would be nice if we could pass a List<String> for the configuration list, instead of needing to copy the block manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin-gradle
Projects
None yet
Development

No branches or pull requests

1 participant