Skip to content

Commit

Permalink
Consume OTA4J snapshot builds
Browse files Browse the repository at this point in the history
Issue: #30
  • Loading branch information
sbrannen committed Dec 11, 2015
1 parent bdaa8b7 commit e535277
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 494 deletions.
31 changes: 14 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.diffplug.gradle.spotless:spotless:1.3.1'
Expand All @@ -22,6 +20,7 @@ subprojects {

repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

compileJava {
Expand Down Expand Up @@ -86,13 +85,18 @@ subprojects {

spotless {
java {
if (project.name == 'open-test-alliance') {
licenseHeaderFile rootProject.file('src/spotless/apache-license-2.0.java')
} else {
licenseHeaderFile rootProject.file('src/spotless/eclipse-public-license-1.0.java')
target project.fileTree(project.rootDir) {
include '**/*.java'
exclude '**/package-info.java'
exclude '**/eclipse-public-license-1.0.java'
exclude '.gradle/**/*.java'
}

licenseHeaderFile rootProject.file('src/spotless/eclipse-public-license-1.0.java')
importOrder(['java', 'javax', 'com', 'org'])
eclipseFormatFile rootProject.file('src/eclipse/junit-lambda-eclipse-formatter-settings.xml')
// trimTrailingWhitespace()
// endWithNewline()

custom 'Lambda fix', { it.replace('} )', '})').replace('} ,', '},') }
}
Expand Down Expand Up @@ -146,16 +150,9 @@ subprojects {
}

licenses {
if (project.name == 'open-test-alliance') {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
} else {
license {
name 'Eclipse Public License v1.0'
url 'http://www.eclipse.org/legal/epl-v10.html'
}
license {
name 'Eclipse Public License v1.0'
url 'http://www.eclipse.org/legal/epl-v10.html'
}
}

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ assertJVersion = 3.2.0
junit4Version = 4.12
log4JVersion = 2.4.1
mockitoVersion = 1.10.19
ota4jVersion = 1.0.0-SNAPSHOT
2 changes: 0 additions & 2 deletions junit-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ dependencies {
compile(project(':junit5-api'))
compile(project(':junit5-engine'))


testCompile("org.assertj:assertj-core:${assertJVersion}")
testCompile("junit:junit:${junit4Version}")
testCompile("org.mockito:mockito-core:${mockitoVersion}")

testRuntime("org.apache.logging.log4j:log4j-core:${log4JVersion}")
testRuntime("org.apache.logging.log4j:log4j-jul:${log4JVersion}")

}
2 changes: 1 addition & 1 deletion junit5-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compile(project(':open-test-alliance'))
compile("org.opentest4j:opentest4j:${ota4jVersion}")
compile(project(':junit-commons'))
}
12 changes: 6 additions & 6 deletions junit5-api/src/main/java/org/junit/gen5/api/Assertions.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import java.util.function.Supplier;

import org.junit.gen5.commons.util.StringUtils;
import org.opentestalliance.AssertionFailedError;
import org.opentestalliance.MultipleFailuresException;
import org.opentest4j.AssertionFailedError;
import org.opentest4j.MultipleFailuresError;

/**
* @since 5.0
Expand Down Expand Up @@ -200,13 +200,13 @@ public static void assertAll(Executable... asserts) {
}

public static void assertAll(String heading, Executable... asserts) {
MultipleFailuresException multipleFailuresException = new MultipleFailuresException(heading);
MultipleFailuresError multipleFailuresError = new MultipleFailuresError(heading);
for (Executable executable : asserts) {
try {
executable.execute();
}
catch (AssertionError failure) {
multipleFailuresException.addFailure(failure);
multipleFailuresError.addFailure(failure);
}
catch (Error | RuntimeException ex) {
throw ex;
Expand All @@ -215,8 +215,8 @@ public static void assertAll(String heading, Executable... asserts) {
throw new RuntimeException(throwable);
}
}
if (multipleFailuresException.hasFailures()) {
throw multipleFailuresException;
if (multipleFailuresError.hasFailures()) {
throw multipleFailuresError;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.function.Supplier;

import org.junit.gen5.commons.util.StringUtils;
import org.opentestalliance.TestAbortedException;
import org.opentest4j.TestAbortedException;

/**
* Collection of utility methods for conditional test execution based on
Expand Down
13 changes: 0 additions & 13 deletions open-test-alliance/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit e535277

Please sign in to comment.