Skip to content

Commit

Permalink
Merge pull request #9 from Liftric/fix/direct_dependency_serializatio…
Browse files Browse the repository at this point in the history
…n_error

fix: serialization error directDependencies
  • Loading branch information
nvima authored Jan 4, 2024
2 parents 66b39c3 + 9647309 commit b690a92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/com/liftric/dtcp/model/DependencyTrack.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data class Project(
val version: String,
val active: Boolean,
val classifier: String,
val directDependencies: String,
val directDependencies: String? = null,
val lastInheritedRiskScore: Double? = null,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ abstract class GetOutdatedDependenciesTask : DefaultTask() {
else -> throw GradleException("Either projectUUID or projectName and projectVersion must be set")
}

if (project.directDependencies == null) {
throw GradleException("Project does not have direct dependencies")
}

val directDependencies = Json {
ignoreUnknownKeys = true
}.decodeFromString<List<DirectDependency>>(project.directDependencies)
Expand Down

0 comments on commit b690a92

Please sign in to comment.