Skip to content

Commit

Permalink
Use Gradle project path for unique dependencies.txt path (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonsviridov-src authored Aug 20, 2024
1 parent 41a8da9 commit 10e9f08
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,15 @@ class WriteDependencies extends DefaultTask {
val deps = List.newBuilder[String]
val project = getProject()
val projectName = project.getName()
val projectPath = project.getPath().replaceAll("[^a-z0-9A-Z_-]", "_")
val dependenciesPath = depsOut.map { path =>
val filename = path.getFileName()
if (filename.endsWith("dependencies.txt")) {
val last = projectPath + "." + path.getFileName().toString()
path.getParent().resolve(last)
} else
path
}

val gradle = new GradleVersion(project.getGradle().getGradleVersion())

Expand Down Expand Up @@ -546,7 +555,7 @@ class WriteDependencies extends DefaultTask {

val dependencies = deps.result().distinct

depsOut match {
dependenciesPath match {
case None =>
dependencies.foreach(println)
case Some(path) =>
Expand Down

0 comments on commit 10e9f08

Please sign in to comment.