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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- [PR #80](https://github.com/itsallcode/openfasttrace-gradle/pull/80)
- Fix JavaDoc warnings and let build fail on warnings

## [3.2.0] - 2026-08-18

- [PR #79](https://github.com/itsallcode/openfasttrace-gradle/pull/79)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ tasks.withType(JavaCompile) {
javadoc {
failOnError = true
options.addBooleanOption('html5', true)
//options.addStringOption('Xwerror', '-quiet')
options.addBooleanOption('Xwerror', true)
}

task compileOft(type: Exec) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,24 @@
import org.itsallcode.openfasttrace.gradle.task.config.SerializableTagPathConfig;
import org.slf4j.Logger;

/** Gradle plugin that collects and traces requirements. */
public class OpenFastTracePlugin implements Plugin<Project>
{
private static final Logger LOG = Logging.getLogger(OpenFastTracePlugin.class);
private static final String TASK_GROUP_NAME = "trace";

/** Creates the plugin. */
public OpenFastTracePlugin()
{
super();
}

/**
* Applies the plugin to the root project.
*
* @param rootProject
* the project receiving the plugin
*/
@Override
public void apply(final Project rootProject)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@
import org.gradle.api.Project;
import org.gradle.api.file.FileCollection;

/** Configuration for one set of requirement tags. */
// Public fields are required for configuration via gradle
@SuppressWarnings("squid:ClassVariableVisibilityCheck")
public class TagConfig
{
private final Project project;

/** Files containing the tags. */
public FileCollection paths;
/** Artifact type of the covered requirements. */
public String coveredItemArtifactType;
/** Artifact type of the tags. */
public String tagArtifactType;
/** Prefix used when matching covered requirement names. */
public String coveredItemNamePrefix;

TagConfig(final Project project)
{
this.project = project;
}

/**
* Returns the name of the project to which this configuration belongs.
*
* @return the Gradle project name
*/
public String getProjectName()
{
return project.getName();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,54 @@
package org.itsallcode.openfasttrace.gradle.config;

import java.util.ArrayList;
import java.util.List;

import org.gradle.api.Action;
import org.gradle.api.Project;

public class TagPathConfiguration
{
private final Project project;
private final List<TagConfig> tagConfigs = new ArrayList<>();

public TagPathConfiguration(final Project project)
{
this.project = project;
}

public void tag(final Action<TagConfig> action)
{
final TagConfig tagConfig = new TagConfig(project);
action.execute(tagConfig);
tagConfigs.add(tagConfig);
}

public List<TagConfig> getPathConfig()
{
return tagConfigs;
}

@Override
public String toString()
{
return "TagPathConfiguration [tagConfigs=" + tagConfigs + "]";
}
}
package org.itsallcode.openfasttrace.gradle.config;

import java.util.ArrayList;
import java.util.List;

import org.gradle.api.Action;
import org.gradle.api.Project;

/** Configuration of tag paths for a project. */
public class TagPathConfiguration
{
private final Project project;
private final List<TagConfig> tagConfigs = new ArrayList<>();

/**
* Creates an empty tag path configuration.
*
* @param project
* the Gradle project owning the configuration
*/
public TagPathConfiguration(final Project project)
{
this.project = project;
}

/**
* Adds a tag configuration.
*
* @param action
* action used to configure the tag
*/
public void tag(final Action<TagConfig> action)
{
final TagConfig tagConfig = new TagConfig(project);
action.execute(tagConfig);
tagConfigs.add(tagConfig);
}

/**
* Returns the configured tag paths.
*
* @return the tag configurations
*/
public List<TagConfig> getPathConfig()
{
return tagConfigs;
}

@Override
public String toString()
{
return "TagPathConfiguration [tagConfigs=" + tagConfigs + "]";
}
}
Loading
Loading