gradle: update to junit 5 (IDEA-252293)

GitOrigin-RevId: a6ee8523059e003802a7562f6353534afcabe290
This commit is contained in:
Anna Kozlova
2020-10-07 07:46:30 +00:00
committed by intellij-monorepo-bot
parent 842637f9d7
commit c8fe5a1584
2 changed files with 14 additions and 4 deletions
@@ -53,6 +53,10 @@ public class GradleJavaFrameworkSupportProvider extends GradleFrameworkSupportPr
buildScriptData
.addPluginDefinitionInPluginsGroup("id 'java'")
.addRepositoriesDefinition("mavenCentral()")
.addDependencyNotation("testCompile group: 'junit', name: 'junit', version: '4.12'");
.addOther("test {\n" +
" useJUnitPlatform()\n" +
"}")
.addDependencyNotation("testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'")
.addDependencyNotation("testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'");
}
}
@@ -90,7 +90,8 @@ public class GradleProjectWizardTest extends NewProjectWizardTestCase {
assertNotNull(buildScript);
assertEquals("plugins {\n" +
" id 'java'\n" +
"}\n\n" +
"}\n" +
"\n" +
"version '1.0-SNAPSHOT'\n" +
"\n" +
"repositories {\n" +
@@ -98,8 +99,13 @@ public class GradleProjectWizardTest extends NewProjectWizardTestCase {
"}\n" +
"\n" +
"dependencies {\n" +
" testCompile group: 'junit', name: 'junit', version: '4.12'\n" +
"}\n",
" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'\n" +
" testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'\n" +
"}\n" +
"\n" +
"test {\n" +
" useJUnitPlatform()\n" +
"}",
StringUtil.convertLineSeparators(VfsUtilCore.loadText(buildScript)));
Module childModule = createModuleFromTemplate("Gradle", null, project, step -> {