Skip to content

Commit

Permalink
Fix #3912: Added local property protobuf condition for M1 Mac (#3891)
Browse files Browse the repository at this point in the history
* Added local property condition for M1 Mac

* Added comment

* Update model/build.gradle

Co-authored-by: Ben Henning <henning.benmax@gmail.com>

Co-authored-by: Ben Henning <henning.benmax@gmail.com>
  • Loading branch information
FareesHussain and BenHenning committed Oct 12, 2021
1 parent 9bf7365 commit f266da8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion model/build.gradle
Expand Up @@ -3,7 +3,12 @@ apply plugin: 'com.google.protobuf'

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.8.0'
// To build protoc in M1 mac. For context, see: #3912.
if (project.rootProject.hasProperty('protobuf_platform')) {
artifact = "com.google.protobuf:protoc:3.8.0:${project.rootProject.property("protobuf_platform")}"
} else {
artifact = "com.google.protobuf:protoc:3.8.0"
}
}
generateProtoTasks {
all().each { task ->
Expand Down

0 comments on commit f266da8

Please sign in to comment.