|
| 1 | +description = 'Allure JUnit Platform' |
| 2 | + |
| 3 | +apply from: "${gradleScriptDir}/maven-publish.gradle" |
| 4 | +apply from: "${gradleScriptDir}/bintray.gradle" |
| 5 | +apply plugin: 'maven' |
| 6 | +apply plugin: 'org.junit.platform.gradle.plugin' |
| 7 | + |
| 8 | +configurations { |
| 9 | + agent |
| 10 | +} |
| 11 | + |
| 12 | +dependencies { |
| 13 | + agent 'org.aspectj:aspectjweaver' |
| 14 | + |
| 15 | + compile project(':allure-java-commons') |
| 16 | + compile('org.junit.platform:junit-platform-launcher') |
| 17 | + |
| 18 | + testCompile('org.slf4j:slf4j-simple') |
| 19 | + testCompile 'org.assertj:assertj-core' |
| 20 | + testCompile('org.junit.jupiter:junit-jupiter-api') |
| 21 | + testCompile('org.junit.jupiter:junit-jupiter-params') |
| 22 | + |
| 23 | + testRuntime('org.junit.jupiter:junit-jupiter-engine') |
| 24 | + testCompile project(':allure-java-commons-test') |
| 25 | +} |
| 26 | + |
| 27 | +jar { |
| 28 | + from('src/main/services') { |
| 29 | + into 'META-INF/services' |
| 30 | + } |
| 31 | +} |
| 32 | + |
| 33 | +junitPlatform { |
| 34 | + filters { |
| 35 | + engines { |
| 36 | + include 'junit-jupiter' |
| 37 | + } |
| 38 | + includeClassNamePattern '.*Test' |
| 39 | + } |
| 40 | + enableStandardTestTask true |
| 41 | +} |
| 42 | + |
| 43 | +tasks.withType(JavaExec) { |
| 44 | + if (it.name == 'junitPlatformTest') { |
| 45 | + systemProperty 'org.slf4j.simpleLogger.defaultLogLevel', 'debug' |
| 46 | + systemProperty 'allure.model.indentOutput', true |
| 47 | + systemProperty 'allure.results.directory', 'build/allure-results' |
| 48 | + doFirst { |
| 49 | + jvmArgs "-javaagent:${configurations.agent.singleFile}" |
| 50 | + } |
| 51 | + } |
| 52 | +} |
| 53 | + |
| 54 | +task spiOffJar(type: Jar, dependsOn: classes) { |
| 55 | + classifier = 'spi-off' |
| 56 | + from sourceSets.main.output |
| 57 | +} |
| 58 | + |
| 59 | +configurations { |
| 60 | + spiOff.extendsFrom(compile) |
| 61 | +} |
| 62 | + |
| 63 | +artifacts { |
| 64 | + spiOff spiOffJar |
| 65 | + archives spiOffJar |
| 66 | +} |
0 commit comments