-
Notifications
You must be signed in to change notification settings - Fork 571
-
Notifications
You must be signed in to change notification settings - Fork 571
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
Pass dependencies symbolically to WireTask for better Gradle caching #2842
Comments
At the end of the day, I think the task inputs should be
Which I think covers all the use cases? Then the task could be trimmed down to just: abstract class WireTask @Inject constructor(
objects: ObjectFactory,
private val fileOperations: FileOperations,
) : DefaultTask() {
@get:InputFiles
@SkipWhenEmpty
@get:PathSensitive(PathSensitivity.RELATIVE)
abstract val protoSourceFiles: ConfigurableFileCollection
@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
abstract val protoPathFiles: ConfigurableFileCollection
// ...
} (I thought The nice bonus is that |
Right now we pass dependencies to WireTask as the absolute paths to the resolved artifact, like so:
This won’t work for shared Gradle caches. We should instead use a symbolic identifier like
com.squareup.wire.dinosaur:all-protos:1.0
that is independent of the current environment’s artifact directory.The text was updated successfully, but these errors were encountered: