Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
java-version: ${{ matrix.java-version }}

- name: Build with Gradle
run: ./gradlew build -x test
run: ./gradlew build -x test --scan

- name: Run tests
if: always()
Expand Down
33 changes: 33 additions & 0 deletions allure-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
plugins {
`java-platform`
}

description = "Allure Java (Bill of Materials)"

dependencies {
constraints {
rootProject.subprojects.sorted()
.forEach { api("${it.group}:${it.name}:${it.version}") }
}
}

tasks.withType(Jar::class) {
enabled = false
}

configurations.archives {
artifacts.removeAll{ it.extension == "jar" }
}

publishing.publications.named<MavenPublication>("maven") {
pom {
from(components["javaPlatform"])
description.set("This Bill of Materials POM can be used to ease dependency management " +
"when referencing multiple Allure artifacts using Gradle or Maven.")
packaging = "pom"
withXml {
val filteredContent = asString().replace("\\s*<scope>compile</scope>".toRegex(), "")
asString().clear().append(filteredContent)
}
}
}
58 changes: 48 additions & 10 deletions allure-java-commons/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("com.github.johnrengelman.shadow")
}

description = "Allure Java Commons"

val agent: Configuration by configurations.creating
Expand All @@ -7,7 +11,7 @@ dependencies {
api("org.slf4j:slf4j-api")
api(project(":allure-model"))
compileOnly("org.aspectj:aspectjrt")
implementation("com.fasterxml.jackson.core:jackson-databind")
internal("com.fasterxml.jackson.core:jackson-databind")
testImplementation("io.github.benas:random-beans")
testImplementation("io.github.glytching:junit-extensions")
testImplementation("org.apache.commons:commons-lang3")
Expand All @@ -21,17 +25,51 @@ dependencies {
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}

tasks.jar {
manifest {
attributes(mapOf(
"Automatic-Module-Name" to "io.qameta.allure.commons"
))
configurations.forEach { configuration ->
configuration.outgoing.apply {
val removed = artifacts.removeAll { it.classifier.isNullOrEmpty() }
if (removed) {
artifact(tasks.shadowJar) {
classifier = ""
}
}
}
}

tasks.test {
useJUnitPlatform()
doFirst {
jvmArgs("-javaagent:${agent.singleFile}")
tasks {
jar {
dependsOn(shadowJar)
enabled = false
}

shadowJar {
archiveClassifier.set("")
relocate("com.fasterxml.jackson", "io.qameta.allure.internal.shadowed.jackson")
dependencies {
include(dependency("com.fasterxml.jackson.core::"))
}
exclude("**/module-info.class")
exclude("META-INF/LICENSE*.md")
mergeServiceFiles()
manifest {
attributes(mapOf(
"Specification-Title" to project.name,
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Automatic-Module-Name" to "io.qameta.allure.commons"
))
}
}

assemble {
dependsOn(shadowJar)
}

test {
dependsOn(shadowJar)
useJUnitPlatform()
doFirst {
jvmArgs("-javaagent:${agent.singleFile}")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ public final class AllureConstants {

public static final String TEST_RESULT_CONTAINER_FILE_GLOB = "*-container.json";

/**
* @deprecated scheduled to remove in 3.0
*/
@Deprecated
public static final String TEST_RUN_FILE_SUFFIX = "-testrun.json";

/**
* @deprecated scheduled to remove in 3.0
*/
@Deprecated
public static final String TEST_RUN_FILE_GLOB = "*-testrun.json";

public static final String ATTACHMENT_FILE_SUFFIX = "-attachment";

public static final String ATTACHMENT_FILE_GLOB = "*-attachment*";
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package io.qameta.allure;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.qameta.allure.model.Allure2ModelJackson;
import io.qameta.allure.internal.Allure2ModelJackson;
import io.qameta.allure.model.TestResult;
import io.qameta.allure.model.TestResultContainer;

Expand Down
Loading