AffectedModuleDetector
AffectedModuleDetector copied to clipboard
See if we can make tasks cacheable
This will be a tracking ticket. In 0.1.6 we will be marking those tasks as not cacheable but would like to investigate if it's possible to somehow do this. Our current problem is this stack trace
Caused by: org.gradle.api.UnknownDomainObjectException: Extension with name 'AffectedModuleDetectorPlugin' does not exist. Currently registered extension names: [ext]
at org.gradle.internal.extensibility.ExtensionsStorage.unknownExtensionException(ExtensionsStorage.java:144)
at org.gradle.internal.extensibility.ExtensionsStorage.getByName(ExtensionsStorage.java:123)
at org.gradle.internal.extensibility.DefaultConvention.getByName(DefaultConvention.java:174)
at com.dropbox.affectedmoduledetector.AffectedModuleDetector$Companion.getInstance(AffectedModuleDetector.kt:195)
at com.dropbox.affectedmoduledetector.AffectedModuleDetector$Companion.getOrThrow(AffectedModuleDetector.kt:200)
at com.dropbox.affectedmoduledetector.AffectedModuleDetector$Companion.configureTaskGuard$lambda-3(AffectedModuleDetector.kt:233)
at org.gradle.api.specs.AndSpec.isSatisfiedBy(AndSpec.java:50)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:44)
... 24 more
As noted in this slack message on the gradle slack, the apply method is not called on plugins which cached so the call in our onlyIf block to check if a project is enabled and affected no longer works. If we could move that check into the task possibly rather then the plugin maybe this is doable