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

srcDir should accept TaskProvider #2933

Open
JakeWharton opened this issue May 9, 2024 · 0 comments
Open

srcDir should accept TaskProvider #2933

JakeWharton opened this issue May 9, 2024 · 0 comments

Comments

@JakeWharton
Copy link
Member

If someone is sourcing protos from an external source, you currently have to wire (heh) directories like this:

schemas {
  get {
    saveTo("./src/main/proto")
    file("squareup/cash/whatever/api.proto")
  }
}

tasks.matching { it.name == "generateCommonMainProtos" }.configureEach {
  dependsOn("getSchemas")
}

wire {
  sourcePath {
    srcDir("src/main/proto")
  }
}

This is error prone and counter to Gradle best practices.

In the same way that Kotlin-producing tasks can be added directly as a srcDir with which Gradle resolves the @OutputDirectory, I should be able to add proto-producing tasks (or rather, TaskProviders) to Wire's srcDir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant