Skip to content

Commit

Permalink
🔨 Add jenkins-core to testAnnotationProcessor
Browse files Browse the repository at this point in the history
Supports plugins that define test-only Jenkins steps
  • Loading branch information
sghill committed Feb 17, 2025
1 parent 28ba18e commit 576c421
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public Set<DependencyFactory> find(String configuration, String jenkinsVersion)
deps.add(findbugs);
deps.add(servlet);
return deps;
case "testAnnotationProcessor":
deps.addAll(coreSet);
return deps;
case "testImplementation":
deps.addAll(coreSet);
deps.add(testHarness);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@ class DependencyLookupSpec extends Specification {
'2.479.2' | [jenkinsBom('2.479.2'), jenkinsCore('2.479.2'), SERVLET_5_0] as Set
}

@Unroll
def 'should get testAnnotationProcessor dependencies for #version'(String version, Set<DependencyFactory> expected) {
when:
def actual = this.lookup.find('testAnnotationProcessor', version)

then:
actual == expected

where:
version | expected
'2.0' | [jenkinsCore('2.0')] as Set
'2.222.3' | [jenkinsBom('2.222.3'), jenkinsCore('2.222.3')] as Set
'2.361.2-rc32710.c1a_5e8c179f6' | [jenkinsBom('2.361.2-rc32710.c1a_5e8c179f6'), jenkinsCore('2.361.2-rc32710.c1a_5e8c179f6')] as Set
'2.369-rc32854.076293e36922' | [jenkinsBom('2.369-rc32854.076293e36922'), jenkinsCore('2.369-rc32854.076293e36922')] as Set
'2.475' | [jenkinsBom('2.475'), jenkinsCore('2.475')] as Set
'2.479.2' | [jenkinsBom('2.479.2'), jenkinsCore('2.479.2')] as Set
}

@Unroll
def 'should get compileOnly dependencies for #version'(String version, Set<DependencyFactory> expected) {
when:
Expand Down

0 comments on commit 576c421

Please sign in to comment.