Skip to content

Instantly share code, notes, and snippets.

@solohsu
Created January 9, 2022 10:10
Show Gist options
  • Save solohsu/a2bac0498ef51c105cedd2dc0a854bcf to your computer and use it in GitHub Desktop.
Save solohsu/a2bac0498ef51c105cedd2dc0a854bcf to your computer and use it in GitHub Desktop.
// apply this script into the build.gradle of modules which you have applied protobuf plugin
// also, this can be used to workaround others plugins not supporting macOS M1 soc, e.g. AndResGuard
// to support AndResGuard, append `|| it.name == "AndResGuardLocatorSevenZip"`
// to the configuration matching condition sentence
configurations.matching {
it.name.startsWith("protobufToolsLocator_")
}.configureEach {
withDependencies { deps ->
deps.matching { it instanceof ExternalDependency }.configureEach {
it.artifacts.each {
if (it.classifier == "osx-aarch_64") {
it.setClassifier("osx-x86_64")
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment