feat(libscan): support gradle.lockfile (#1568)

* feat(libscan): support gradle.lockfile

* add gradle.lockfile to integration test

* fix readme

* chore: update integration

* find *gradle.lockfile

Co-authored-by: MaineK00n <mainek00n.1229@gmail.com>
This commit is contained in:
Kota Kanbe
2022-12-20 08:52:45 +09:00
committed by GitHub
parent 1d97e91341
commit 03c59866d4
8 changed files with 44 additions and 136 deletions

View File

@@ -146,7 +146,7 @@ var FindLockFiles = []string{
// gomod
ftypes.GoMod, ftypes.GoSum,
// java
ftypes.MavenPom, "*.jar", "*.war", "*.ear", "*.par",
ftypes.MavenPom, "*.jar", "*.war", "*.ear", "*.par", "*gradle.lockfile",
}
// GetLibraryKey returns target library key
@@ -160,7 +160,7 @@ func (s LibraryScanner) GetLibraryKey() string {
return "php"
case ftypes.GoBinary, ftypes.GoModule:
return "gomod"
case ftypes.Jar, ftypes.Pom:
case ftypes.Jar, ftypes.Pom, ftypes.Gradle:
return "java"
case ftypes.Npm, ftypes.Yarn, ftypes.Pnpm, ftypes.NodePkg, ftypes.JavaScript:
return "node"