diff --git a/build.gradle b/build.gradle index 61f956d59..5d6251fc1 100644 --- a/build.gradle +++ b/build.gradle @@ -58,18 +58,45 @@ repositories { mavenCentral() } -dependencies { - compile 'com.microsoft.azure:azure-keyvault:0.9.7' - - testCompile 'junit:junit:4.12', - 'org.junit.platform:junit-platform-console:1.0.0-M3', - 'org.junit.platform:junit-platform-commons:1.0.0-M3', - 'org.junit.platform:junit-platform-engine:1.0.0-M3', - 'org.junit.platform:junit-platform-launcher:1.0.0-M3', - 'org.junit.platform:junit-platform-runner:1.0.0-M3', - 'org.junit.platform:junit-platform-surefire-provider:1.0.0-M3', - 'org.junit.jupiter:junit-jupiter-api:5.0.0-M3', - 'org.junit.jupiter:junit-jupiter-engine:5.0.0-M3' +//enable junit gradle plugin +buildscript { + repositories { + mavenCentral() + + } + dependencies { + classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M3' + + } } +apply plugin: 'org.junit.platform.gradle.plugin' +ext.junit4Version = '4.12' +ext.junitPlatformVersion = '1.0.0-M3' +ext.junitJupiterVersion = '5.0.0-M3' + +junitPlatform { + filters { + tags { + // comment out the exclude property to run all tests + exclude 'slow' + } + } +} + +dependencies { + + compile 'com.microsoft.azure:azure-keyvault:0.9.7' + + // JUnit Jupiter API and TestEngine implementation + testCompile("junit:junit:${junit4Version}") + testCompile("org.junit.platform:junit-platform-console:${junitPlatformVersion}") + testCompile("org.junit.platform:junit-platform-commons:${junitPlatformVersion}") + testCompile("org.junit.platform:junit-platform-engine:${junitPlatformVersion}") + testCompile("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}") + testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}") + testCompile("org.junit.platform:junit-platform-surefire-provider:${junitPlatformVersion}") + testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}") + testCompile("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}") +} diff --git a/pom.xml b/pom.xml index 51edab545..8d35bb50c 100644 --- a/pom.xml +++ b/pom.xml @@ -42,8 +42,10 @@ UTF-8 + 5.0.0-M3 + 1.0.0-M3 - + com.microsoft.azure @@ -62,59 +64,51 @@ org.junit.platform junit-platform-console - 1.0.0-M3 + ${junit.platform.version} test org.junit.platform junit-platform-commons - 1.0.0-M3 + ${junit.platform.version} test org.junit.platform junit-platform-engine - 1.0.0-M3 + ${junit.platform.version} test org.junit.platform junit-platform-launcher - 1.0.0-M3 + ${junit.platform.version} test org.junit.platform junit-platform-runner - 1.0.0-M3 + ${junit.platform.version} test org.junit.platform junit-platform-surefire-provider - 1.0.0-M3 + ${junit.platform.version} test org.junit.jupiter junit-jupiter-api - 5.0.0-M3 + ${junit.jupiter.version} test org.junit.jupiter junit-jupiter-engine - 5.0.0-M3 + ${junit.jupiter.version} test - @@ -145,7 +139,7 @@ - + @@ -184,11 +178,11 @@ - + - + ${basedir} @@ -214,6 +208,24 @@ + + maven-surefire-plugin + 2.19 + + + + slow + + + + + org.junit.platform + junit-platform-surefire-provider + ${junit.platform.version} + + + +