|
1 | 1 | apply plugin: 'io.spring.convention.spring-module'
|
2 | 2 |
|
3 | 3 | configurations {
|
4 |
| - opensaml4Main { extendsFrom(optional, provided) } |
5 |
| - opensaml5Main { extendsFrom(optional, provided) } |
6 |
| - opensaml4Test { extendsFrom(opensaml4Main, tests) } |
7 |
| - opensaml5Test { extendsFrom(opensaml5Main, tests) } |
| 4 | + opensamlFiveMain { extendsFrom(optional, provided) } |
| 5 | + opensamlFiveTest { extendsFrom(opensamlFiveMain, testImplementation) } |
8 | 6 | }
|
9 | 7 |
|
10 | 8 | sourceSets {
|
11 | 9 | opensaml4Main {
|
12 | 10 | java {
|
13 |
| - compileClasspath += main.output + configurations.opensaml4Main |
| 11 | + compileClasspath += main.output |
14 | 12 | srcDir 'src/opensaml4Main/java'
|
15 | 13 | }
|
16 | 14 | }
|
17 | 15 | opensaml5Main {
|
18 | 16 | java {
|
19 |
| - compileClasspath += main.output + configurations.opensaml5Main |
| 17 | + compileClasspath = main.output + configurations.opensamlFiveMain |
20 | 18 | srcDir 'src/opensaml5Main/java'
|
21 | 19 | }
|
22 | 20 | }
|
23 | 21 | opensaml4Test {
|
24 | 22 | java {
|
25 |
| - compileClasspath += main.output + test.output + opensaml4Main.output + configurations.opensaml4Test |
| 23 | + compileClasspath += main.output + test.output + opensaml4Main.output + test.compileClasspath |
| 24 | + runtimeClasspath += main.output + test.output + opensaml4Main.output + test.runtimeClasspath |
26 | 25 | srcDir 'src/opensaml4Test/java'
|
27 | 26 | }
|
28 | 27 | }
|
29 | 28 | opensaml5Test {
|
30 | 29 | java {
|
31 |
| - compileClasspath += main.output + test.output + opensaml5Main.output + configurations.opensaml5Test |
| 30 | + compileClasspath = main.output + test.output + opensaml5Main.output + configurations.opensamlFiveTest |
| 31 | + runtimeClasspath = main.output + test.output + opensaml5Main.output + configurations.opensamlFiveTest |
32 | 32 | srcDir 'src/opensaml5Test/java'
|
33 | 33 | }
|
34 | 34 | }
|
@@ -88,20 +88,18 @@ sourceSets.configureEach { set ->
|
88 | 88 | dependencies {
|
89 | 89 | management platform(project(":spring-security-dependencies"))
|
90 | 90 | api project(':spring-security-web')
|
91 |
| - api 'org.opensaml:opensaml-core' |
| 91 | + |
92 | 92 | api ('org.opensaml:opensaml-saml-api') {
|
93 | 93 | exclude group: 'commons-logging', module: 'commons-logging'
|
94 | 94 | }
|
95 | 95 | api ('org.opensaml:opensaml-saml-impl') {
|
96 | 96 | exclude group: 'commons-logging', module: 'commons-logging'
|
97 | 97 | }
|
98 | 98 |
|
99 |
| - opensaml5MainImplementation libs.org.opensaml.opensaml5.core.api |
100 |
| - opensaml5MainImplementation libs.org.opensaml.opensaml5.core.impl |
101 |
| - opensaml5MainImplementation (libs.org.opensaml.opensaml5.saml.api) { |
| 99 | + opensamlFiveMain (libs.org.opensaml.opensaml5.saml.api) { |
102 | 100 | exclude group: 'commons-logging', module: 'commons-logging'
|
103 | 101 | }
|
104 |
| - opensaml5MainImplementation (libs.org.opensaml.opensaml5.saml.impl) { |
| 102 | + opensamlFiveMain (libs.org.opensaml.opensaml5.saml.impl) { |
105 | 103 | exclude group: 'commons-logging', module: 'commons-logging'
|
106 | 104 | }
|
107 | 105 |
|
@@ -139,22 +137,23 @@ testJar {
|
139 | 137 | }
|
140 | 138 |
|
141 | 139 | javadoc {
|
142 |
| - classpath += sourceSets.opensaml4Main.runtimeClasspath + sourceSets.opensaml5Main.runtimeClasspath |
143 |
| - source += sourceSets.opensaml4Main.allJava + sourceSets.opensaml5Main.allJava |
| 140 | + classpath += configurations.opensamlFiveMain |
| 141 | + source = sourceSets.main.allJava + sourceSets.opensaml4Main.allJava + sourceSets.opensaml5Main.allJava |
144 | 142 | }
|
145 | 143 |
|
146 | 144 | tasks.register("opensaml4Test", Test) {
|
147 | 145 | useJUnitPlatform()
|
148 |
| - classpath += sourceSets.opensaml4Test.output |
| 146 | + testClassesDirs = sourceSets.opensaml4Test.output.classesDirs |
| 147 | + classpath = sourceSets.opensaml4Test.runtimeClasspath |
149 | 148 | }
|
150 | 149 |
|
151 | 150 | tasks.register("opensaml5Test", Test) {
|
152 | 151 | useJUnitPlatform()
|
153 |
| - classpath += sourceSets.opensaml5Test.output |
| 152 | + testClassesDirs = sourceSets.opensaml5Test.output.classesDirs |
| 153 | + classpath = sourceSets.opensaml5Test.output + sourceSets.opensaml5Test.runtimeClasspath |
154 | 154 | }
|
155 | 155 |
|
156 | 156 | tasks.named("test") {
|
157 | 157 | dependsOn opensaml4Test
|
158 | 158 | dependsOn opensaml5Test
|
159 | 159 | }
|
160 |
| - |
0 commit comments