|
11 | 11 | package org.junit.platform.launcher.core; |
12 | 12 |
|
13 | 13 | import static org.apiguardian.api.API.Status.DEPRECATED; |
| 14 | +import static org.apiguardian.api.API.Status.EXPERIMENTAL; |
14 | 15 | import static org.apiguardian.api.API.Status.STABLE; |
15 | 16 | import static org.junit.platform.launcher.LauncherConstants.OUTPUT_DIR_PROPERTY_NAME; |
16 | 17 |
|
|
30 | 31 | import org.junit.platform.engine.Filter; |
31 | 32 | import org.junit.platform.engine.reporting.OutputDirectoryProvider; |
32 | 33 | import org.junit.platform.launcher.EngineFilter; |
| 34 | +import org.junit.platform.launcher.LauncherConstants; |
33 | 35 | import org.junit.platform.launcher.LauncherDiscoveryListener; |
34 | 36 | import org.junit.platform.launcher.LauncherDiscoveryRequest; |
35 | 37 | import org.junit.platform.launcher.PostDiscoveryFilter; |
@@ -287,6 +289,21 @@ public LauncherDiscoveryRequestBuilder listeners(LauncherDiscoveryListener... li |
287 | 289 | return this; |
288 | 290 | } |
289 | 291 |
|
| 292 | + /** |
| 293 | + * Set the {@link OutputDirectoryProvider} to use for the request. |
| 294 | + * |
| 295 | + * <p>If not specified, a default provider will be used that can be |
| 296 | + * configured via the {@value LauncherConstants#OUTPUT_DIR_PROPERTY_NAME} |
| 297 | + * configuration parameter. |
| 298 | + * |
| 299 | + * @param outputDirectoryProvider the output directory provider to use; |
| 300 | + * never {@code null} |
| 301 | + * @return this builder for method chaining |
| 302 | + * @since 1.12 |
| 303 | + * @see OutputDirectoryProvider |
| 304 | + * @see LauncherConstants#OUTPUT_DIR_PROPERTY_NAME |
| 305 | + */ |
| 306 | + @API(status = EXPERIMENTAL, since = "1.12") |
290 | 307 | public LauncherDiscoveryRequestBuilder outputDirectoryProvider(OutputDirectoryProvider outputDirectoryProvider) { |
291 | 308 | this.outputDirectoryProvider = Preconditions.notNull(outputDirectoryProvider, |
292 | 309 | "outputDirectoryProvider must not be null"); |
|
0 commit comments