|
|
|
@ -34,14 +34,14 @@ import static org.assertj.core.api.Assertions.assertThat; |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Andy Wilkinson |
|
|
|
* @author Andy Wilkinson |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class OptionalDependenciesPluginIntegrationTests { |
|
|
|
class OptionalDependenciesPluginIntegrationTests { |
|
|
|
|
|
|
|
|
|
|
|
private File projectDir; |
|
|
|
private File projectDir; |
|
|
|
|
|
|
|
|
|
|
|
private File buildFile; |
|
|
|
private File buildFile; |
|
|
|
|
|
|
|
|
|
|
|
@BeforeEach |
|
|
|
@BeforeEach |
|
|
|
public void setup(@TempDir File projectDir) throws IOException { |
|
|
|
void setup(@TempDir File projectDir) throws IOException { |
|
|
|
this.projectDir = projectDir; |
|
|
|
this.projectDir = projectDir; |
|
|
|
this.buildFile = new File(this.projectDir, "build.gradle"); |
|
|
|
this.buildFile = new File(this.projectDir, "build.gradle"); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -80,7 +80,7 @@ public class OptionalDependenciesPluginIntegrationTests { |
|
|
|
optionalDependenciesAreAddedToSourceSetClasspath("test", "runtimeClasspath"); |
|
|
|
optionalDependenciesAreAddedToSourceSetClasspath("test", "runtimeClasspath"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void optionalDependenciesAreAddedToSourceSetClasspath(String sourceSet, String classpath) |
|
|
|
private void optionalDependenciesAreAddedToSourceSetClasspath(String sourceSet, String classpath) |
|
|
|
throws IOException { |
|
|
|
throws IOException { |
|
|
|
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) { |
|
|
|
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) { |
|
|
|
out.println("plugins {"); |
|
|
|
out.println("plugins {"); |
|
|
|
|