Skip to content

p2deps plugin put jars into multiple source sets #109

@nedtwigg

Description

@nedtwigg

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions