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: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ updates:
directory: "/"
schedule:
interval: "monthly"
cooldown:
default-days: 7
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-java@v5
- uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Cache SonarQube packages
if: ${{ env.DEFAULT_JAVA == matrix.java }}
Expand Down Expand Up @@ -78,12 +78,12 @@ jobs:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-java@v5
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
- name: Ossindex
run: ./gradlew ossIndexAudit --warning-mode all --info
env:
Expand All @@ -103,7 +103,7 @@ jobs:
run: |
mkdir -p ./target
echo '{ "aliveStatusCodes": [429, 200] }' > ./target/broken_links_checker.json
- uses: tcort/github-action-markdown-link-check@v1
- uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225 # v1.1.2
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
with:
persist-credentials: false

- uses: actions/setup-java@v5
- uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@ jobs:

- name: Fail if not running on main branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: actions/github-script@v9
with:
script: |
core.setFailed('Not running on main branch, github.ref is ${{ github.ref }}. Please start this workflow only on main')
run: echo "Not running on main branch, github.ref is $GITHUB_REF. Please start this workflow only on main" && exit 1
env:
GITHUB_REF: ${{ github.ref }}

- uses: actions/setup-java@v5
- uses: actions/setup-java@v6
with:
distribution: "temurin"
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Build
run: ./gradlew build --warning-mode all -PjavaVersion=17
Expand Down
8 changes: 8 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://docs.zizmor.sh/configuration/#settings
rules:
unpinned-uses:
config:
policies:
"actions/*": ref-pin
"github/codeql-action/*": ref-pin
"*": hash-pin
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.3.0] - 2026-09-20

- [PR #80](https://github.com/itsallcode/openfasttrace-gradle/pull/80)
- Fix JavaDoc warnings and let build fail on warnings
- [PR #82](https://github.com/itsallcode/openfasttrace-gradle/pull/82)
Expand All @@ -21,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow configuring color schema
- Configuration values for details section display and report verbosity are now case insensitive
- Improve error messages for invalid enum values
- [#63](https://github.com/itsallcode/openfasttrace-gradle/issues/63) / [PR 88](https://github.com/itsallcode/openfasttrace-gradle/pull/88):
- Add support for parallel builds. This failed before with error `Resolution of the configuration 'oftRequirementConfig' was attempted without an exclusive lock`

## [3.2.0] - 2026-08-18

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gradle plugin for the requirement tracing suite [OpenFastTrace](https://github.c

```groovy
plugins {
id "org.itsallcode.openfasttrace" version "3.2.0"
id "org.itsallcode.openfasttrace" version "3.3.0"
}
```

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ plugins {
id 'java-gradle-plugin'
id 'jacoco'
id 'signing'
id 'com.gradle.plugin-publish' version '2.1.1'
id 'org.sonarqube' version '7.4.0.8496'
id 'com.gradle.plugin-publish' version '2.2.1'
id 'org.sonarqube' version '7.5.0.8588'
id 'pl.droidsonroids.jacoco.testkit' version '1.0.12'
id 'io.github.ben-manes.versions' version '0.61.0'
id 'org.sonatype.gradle.plugins.scan' version '4.0.0'
id 'io.github.ben-manes.versions' version '0.64.0'
id 'org.sonatype.gradle.plugins.scan' version '4.1.0-02'
}

repositories {
Expand All @@ -15,7 +15,7 @@ repositories {

apply from: 'gradle/workAroundJacocoGradleTestKitIssueOnWindows.gradle'

version = '3.2.0'
version = '3.3.0'
group = 'org.itsallcode'

ext {
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
}
rootProject.name = 'openfasttrace-gradle'
enableFeaturePreview "STABLE_CONFIGURATION_CACHE"
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.logging.Logging;
import org.gradle.api.plugins.ExtensionAware;
import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.TaskProvider;
import org.itsallcode.openfasttrace.api.core.ItemStatus;
import org.itsallcode.openfasttrace.gradle.config.TagPathConfiguration;
Expand Down Expand Up @@ -80,10 +81,10 @@ private static void createTracingTask(final Project rootProject,
final TaskProvider<CollectTask> collectTask)
{
rootProject.getTasks().register("traceRequirements", TraceTask.class,
task -> configureTask(rootProject, collectTask, task));
task -> configureTracingTask(rootProject, collectTask, task));
}

private static void configureTask(final Project rootProject,
private static void configureTracingTask(final Project rootProject,
final TaskProvider<CollectTask> collectTask, final TraceTask task)
{
task.setGroup(TASK_GROUP_NAME);
Expand Down Expand Up @@ -139,30 +140,37 @@ private static ItemStatus convertStatus(final String value)

private static Set<File> getAllInputDirectories(final Set<Project> allProjects)
{
return allProjects.stream() //
.map(project -> getConfig(project).getInputDirectories().getFiles()) //
.flatMap(Set::stream) //
return allProjects.stream()
.map(project -> getConfig(project).getInputDirectories().getFiles())
.flatMap(Set::stream)
.collect(toSet());
}

private static ConfigurableFileCollection getImportedRequirements(final Project rootProject,
final Set<Project> allProjects)
{
return rootProject.files(allProjects.stream() //
.map(OpenFastTracePlugin::getImportedRequirements) //
.toList());
final ConfigurableFileCollection importedRequirements = rootProject.files();
allProjects.stream()
.map(OpenFastTracePlugin::getImportedRequirements)
.flatMap(Optional::stream)
.forEach(importedRequirements::from);
return importedRequirements;
}

private static Configuration getImportedRequirements(final Project project)
private static Optional<Provider<Configuration>> getImportedRequirements(final Project project)
{
final List<Object> dependencies = getConfig(project).getImportedRequirements().get();
if (dependencies.isEmpty())
{
return Optional.empty();
}
final String CONFIG_NAME = "oftRequirementConfig";
final Configuration configuration = project.getConfigurations().create(CONFIG_NAME);
getConfig(project).getImportedRequirements().get().forEach(dependency -> {
LOG.info("Adding dependency {} with configuration {} to project {}", dependency,
CONFIG_NAME, project);
project.getConfigurations().create(CONFIG_NAME);
dependencies.forEach(dependency -> {
LOG.info("Adding dependency {} with configuration {} to project {}", dependency, CONFIG_NAME, project);
project.getDependencies().add(CONFIG_NAME, dependency);
});
return configuration;
return Optional.of(project.getConfigurations().named(CONFIG_NAME));
}

private static List<SerializableTagPathConfig> getPathConfig(final Set<Project> allProjects)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ public RegularFileProperty getReportFile()
}

/**
* Returns the external requirement dependencies.
* Returns the external requirement dependencies. This is a list of dependency coordinates pointing to ZIP files
* containing requirements, e.g. {@code com.example:swad:1.0.0@zip}.
*
* @return the imported requirements
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ private GradleRunner createGradleRunner()
{
allArgs.add("--build-cache");
}
allArgs.addAll(List.of("--configuration-cache", "--configuration-cache-problems=fail"));
allArgs.addAll(List.of("--configuration-cache", "-Dorg.gradle.configuration-cache.parallel=true",
"--configuration-cache-problems=fail", "--parallel"));
allArgs.addAll(List.of("--warning-mode", "fail"));
final GradleRunner runner = GradleRunner.create()
.withProjectDir(projectDir.toFile())
Expand Down
Loading