Skip to content

Instantly share code, notes, and snippets.

@aaalaniz
Last active February 22, 2016 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaalaniz/92df2fcac44af77ab446 to your computer and use it in GitHub Desktop.
Save aaalaniz/92df2fcac44af77ab446 to your computer and use it in GitHub Desktop.
Mutate Link Task Flags
class LinkerFlagsRuleSource extends RuleSource {
@Mutate
void modifyLinkerFlags(@Path('tasks.linkMy_moduleArmeabi-v7aDebugSharedLibrary') Task linkTask) {
linkTask.doFirst {
def newLinkerArgs = []
properties["linkerArgs"].each { linkerArg ->
def newLinkerArg = linkerArg.replaceAll(/ARCH/, 'armeabi-v7a')
newLinkerArgs.add(newLinkerArg)
}
setProperty("linkerArgs", newLinkerArgs)
}
}
}
@aaalaniz
Copy link
Author

It does work...damn instant run..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment