Skip to content
Closed
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
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- UV: Fix fatal parse error on uv.lock files containing editable/workspace packages with dynamic versions ([#1682](https://github.com/fossas/fossa-cli/pull/1682))
- Gradle: Add additional development and test configurations for common plugins ([#1684](https://github.com/fossas/fossa-cli/pull/1684))

## 3.16.7

Expand Down
7 changes: 7 additions & 0 deletions docs/references/strategies/languages/gradle/gradle.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,17 @@ With newer versions of gradle, some configurations are no longer supported (`com
FOSSA classifies any dependencies originating from the following configurations as development dependencies:
```
- compileOnly
- spotbugs
- spotbugsPlugins
- spotbugsSlf4j
```

FOSSA classifies any dependencies originating from the following configurations as test dependencies:
```
- aggregateCodeCoverageReportResults
- jacocoAgent
- jacocoAggregation
- jacocoAnt
- testImplementation
- testCompileOnly
- testRuntimeOnly
Expand Down
16 changes: 14 additions & 2 deletions src/Strategy/Gradle/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ getLinesWithPrefix text prefix = prefixLines
configNameToLabel :: Text -> GradleLabel
configNameToLabel conf =
case conf of
"compileOnly" -> Env EnvDevelopment
x | x `elem` knownDevConfigs -> Env EnvDevelopment
x | x `elem` knownTestConfigs -> Env EnvTesting
x | isDefaultAndroidDevConfig x -> Env EnvDevelopment
x | isDefaultAndroidTestConfig x -> Env EnvTesting
x -> Env $ EnvOther x

knownTestConfigs :: [Text]
knownTestConfigs =
[ "testImplementation"
[ "aggregateCodeCoverageReportResults"
, "jacocoAgent"
, "jacocoAggregation"
, "jacocoAnt"
, "testImplementation"
, "testCompileOnly"
, "testRuntimeOnly"
, "testCompileClasspath"
Expand All @@ -61,6 +65,14 @@ knownTestConfigs =
, "testFixturesApiElements"
]

knownDevConfigs :: [Text]
knownDevConfigs =
[ "compileOnly"
, "spotbugs"
, "spotbugsPlugins"
, "spotbugsSlf4j"
]

getDebugMessages :: Text -> [Text]
getDebugMessages text = getLogWithPrefix text "FOSSA-DEBUG"

Expand Down