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 files API instead of Java file API #118

Closed
Closed
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 @@ -34,7 +34,6 @@ import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.TaskProvider
import org.gradle.kotlin.dsl.register
import java.io.File

@CacheableTask
abstract class ComputeWorkspaceDependenciesTask : DefaultTask() {
Expand Down Expand Up @@ -65,10 +64,7 @@ abstract class ComputeWorkspaceDependenciesTask : DefaultTask() {
val computeTask = rootProject.tasks
.register<ComputeWorkspaceDependenciesTask>(TASK_NAME) {
workspaceDependencies.set(
File(
rootProject.buildDir,
"grazel/mergedDependencies.json"
)
rootProject.layout.buildDirectory.file("grazel/mergedDependencies.json")
)
}
ResolveVariantDependenciesTask.register(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.TaskProvider
import org.gradle.kotlin.dsl.named
import org.gradle.kotlin.dsl.register
import java.io.File
import java.util.*
import java.util.TreeMap
import java.util.TreeSet
import kotlin.streams.asSequence

@CacheableTask
Expand Down Expand Up @@ -250,10 +250,9 @@ internal abstract class ResolveVariantDependenciesTask : DefaultTask() {

}

val resolvedDependenciesJson = File(
project.buildDir,
"grazel/${variant.name}/dependencies.json"
)
val resolvedDependenciesJson = project.layout
.buildDirectory
.file("grazel/${variant.name}/dependencies.json")

val resolveVariantDependenciesTask = project.tasks
.register<ResolveVariantDependenciesTask>(
Expand Down
Loading