Skip to content

Instantly share code, notes, and snippets.

@runningcode
Last active February 25, 2022 14:24
Show Gist options
  • Save runningcode/816e47ede6368192c607900d9ac9afec to your computer and use it in GitHub Desktop.
Save runningcode/816e47ede6368192c607900d9ac9afec to your computer and use it in GitHub Desktop.
DeepLinkDispatch CommandLineArgumentProvider
class DeepLinkDispatchDirProvider implements CommandLineArgumentProvider{
@OutputDirectory
File outputDir
DeepLinkDispatchDirProvider(File outputDir) {
this.outputDir = outputDir
}
@Override
Iterable<String> asArguments() {
["-AdeepLinkDoc.output=${outputDir.path}/doc/deeplinks.txt"]
}
}
androidComponents {
onVariants(selector().all(), { variant ->
variant.javaCompilation.annotationProcessor.argumentProviders.add(
new DeepLinkDispatchDirProvider(new File(buildDir.path + "/" + variant.name)))
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment