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
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,4 @@ class GradleUtils {
static <T> T lookupProperty(Project project, String name, T defaultValue = null) {
project.findProperty(name) as T ?: defaultValue
}

static <T> T lookupPropertyByType(Project project, String name, Class<T> type) {
project.findProperty(name) as T
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import java.time.format.DateTimeFormatter
import java.time.temporal.ChronoUnit

import static org.apache.grails.buildsrc.GradleUtils.lookupProperty
import static org.apache.grails.buildsrc.GradleUtils.lookupPropertyByType

@CompileStatic
class SbomPlugin implements Plugin<Project> {
Expand Down Expand Up @@ -125,8 +124,8 @@ class SbomPlugin implements Plugin<Project> {
def sbomOutputLocation = project.layout.buildDirectory.file(
project.provider {
def artifactId = lookupProperty(project, 'pomArtifactId', project.name)
def version = lookupPropertyByType(project, 'projectVersion', String)
"${artifactId}-${version}-sbom.json" as String
def version = project.findProperty('projectVersion')
"$artifactId-$version-sbom.json" as String
}
)

Expand Down
Loading