Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Gradle project path for unique dependencies.txt path #741

Merged
merged 1 commit into from
Aug 20, 2024
Merged
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 @@ -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
Loading