Last active
February 25, 2022 14:24
-
-
Save runningcode/816e47ede6368192c607900d9ac9afec to your computer and use it in GitHub Desktop.
DeepLinkDispatch CommandLineArgumentProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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