Skip to content

Commit

Permalink
Development: Replace deprecated method call
Browse files Browse the repository at this point in the history
  • Loading branch information
Strohgelaender committed Oct 16, 2023
1 parent 8425924 commit 944a7cb
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ private Stage createBuildStage(ProgrammingLanguage programmingLanguage, ProjectT
// Create artifacts and a final task for the execution of static code analysis
final List<StaticCodeAnalysisTool> staticCodeAnalysisTools = StaticCodeAnalysisTool.getToolsForProgrammingLanguage(ProgrammingLanguage.C);
final Artifact[] artifacts = staticCodeAnalysisTools.stream()
.map(tool -> new Artifact().name(tool.getArtifactLabel()).location("target").copyPattern(tool.getFilePattern()).shared(false)).toArray(Artifact[]::new);
.map(tool -> new Artifact().name(tool.getArtifactLabel()).location("target").copyPatterns(tool.getFilePattern()).shared(false))
.toArray(Artifact[]::new);
defaultJob.artifacts(artifacts);
final var scaTasks = readScriptTasksFromTemplate(programmingLanguage, Optional.empty(), null, false, true);
defaultJob.finalTasks(scaTasks.toArray(new Task[0]));
Expand Down Expand Up @@ -257,7 +258,8 @@ private Stage createBuildStage(ProgrammingLanguage programmingLanguage, ProjectT
// Create artifacts and a final task for the execution of static code analysis
final List<StaticCodeAnalysisTool> staticCodeAnalysisTools = StaticCodeAnalysisTool.getToolsForProgrammingLanguage(ProgrammingLanguage.SWIFT);
final Artifact[] artifacts = staticCodeAnalysisTools.stream()
.map(tool -> new Artifact().name(tool.getArtifactLabel()).location("target").copyPattern(tool.getFilePattern()).shared(false)).toArray(Artifact[]::new);
.map(tool -> new Artifact().name(tool.getArtifactLabel()).location("target").copyPatterns(tool.getFilePattern()).shared(false))
.toArray(Artifact[]::new);
defaultJob.artifacts(artifacts);
final var scaTasks = readScriptTasksFromTemplate(programmingLanguage, subDirectory, null, false, true);
defaultJob.finalTasks(scaTasks.toArray(new Task[0]));
Expand Down Expand Up @@ -292,7 +294,7 @@ private void modifyBuildConfigurationForStaticCodeAnalysisForJavaAndKotlinExerci
// Create artifacts and a final task for the execution of static code analysis
List<StaticCodeAnalysisTool> staticCodeAnalysisTools = StaticCodeAnalysisTool.getToolsForProgrammingLanguage(ProgrammingLanguage.JAVA);
var scaArtifacts = staticCodeAnalysisTools.stream()
.map(tool -> new Artifact().name(tool.getArtifactLabel()).location("target").copyPattern(tool.getFilePattern()).shared(false)).toList();
.map(tool -> new Artifact().name(tool.getArtifactLabel()).location("target").copyPatterns(tool.getFilePattern()).shared(false)).toList();

if (isMavenProject) {
String command = StaticCodeAnalysisTool.createBuildPlanCommandForProgrammingLanguage(ProgrammingLanguage.JAVA);
Expand Down Expand Up @@ -320,7 +322,7 @@ private void modifyBuildConfigurationForRegularTestsForJavaAndKotlinExercise(boo
if (recordTestwiseCoverage) {
// If a testwise coverage should be performed, a custom profile is used for the execution
goals += " -Pcoverage";
artifacts.add(new Artifact().name("testwiseCoverageReport").location("target/tia/reports").copyPattern("tiaTests.json"));
artifacts.add(new Artifact().name("testwiseCoverageReport").location("target/tia/reports").copyPatterns("tiaTests.json"));
}

defaultTasks.add(new MavenTask().goal(goals).jdk("JDK").executableLabel("Maven 3").description("Tests").hasTests(true));
Expand All @@ -337,7 +339,7 @@ private void modifyBuildConfigurationForRegularTestsForJavaAndKotlinExercise(boo
String testCommand = "./gradlew clean test";
if (recordTestwiseCoverage) {
testCommand += " tiaTests --run-all-tests";
artifacts.add(new Artifact().name("testwiseCoverageReport").location("build/reports/testwise-coverage/tiaTests").copyPattern("tiaTests.json"));
artifacts.add(new Artifact().name("testwiseCoverageReport").location("build/reports/testwise-coverage/tiaTests").copyPatterns("tiaTests.json"));
}
defaultTasks.add(new ScriptTask().inlineBody(testCommand).description("Tests"));
finalTasks.add(new TestParserTask(TestParserTaskProperties.TestType.JUNIT).resultDirectories("**/test-results/test/*.xml").description("JUnit Parser"));
Expand Down

0 comments on commit 944a7cb

Please sign in to comment.