See https://github.com/dropbox/AffectedModuleDetector/pull/130/files#diff-6b5be434aa24824fb2973ce77a9dcda484db988e76842f367fb289129851c318R44 `var customTasks = emptySet<AffectedModuleConfiguration.CustomTask>()` would be better migrated to DomainObject APIs. Here's a relevant article: https://blog.mrhaki.com/2016/02/gradle-goodness-create-objects-with-dsl.html