Skip to content

Commit

Permalink
Merge pull request #745 from mikepenz/feature/evaluationDependsOnChil…
Browse files Browse the repository at this point in the history
…dren

EvaluationDependsOnChildren for gradle task
  • Loading branch information
mikepenz committed Apr 3, 2022
2 parents 1d35694 + eb6f700 commit d378ecc
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ abstract class AboutLibrariesCollectorTask : DefaultTask() {
@Internal
protected lateinit var collectedDependencies: CollectedContainer

val dependencyCache: File
@OutputFile
get() {
val folder = File(project.buildDir, "generated/aboutLibraries/").also {
it.mkdirs()
}
return File(folder, "dependency_cache.json")
}
@OutputFile
val dependencyCache: File = File(File(project.buildDir, "generated/aboutLibraries/").also {
it.mkdirs()
}, "dependency_cache.json")

/**
* Collect the dependencies via the available configurations for the current project
Expand All @@ -31,6 +27,7 @@ abstract class AboutLibrariesCollectorTask : DefaultTask() {

@TaskAction
fun action() {
project.evaluationDependsOnChildren()
if (!::collectedDependencies.isInitialized) {
configure()
}
Expand Down

0 comments on commit d378ecc

Please sign in to comment.