Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4644 : Fixes not building for m1 Mac #4653

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions model/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ apply plugin: 'com.google.protobuf'
protobuf {
protoc {
// 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"
}
Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project doesn't have a local.properties--is this something just on your local machine?

Also, we need to set this up such that it will work for other team members without them needing to set up their own local.properties (otherwise, it's really likely people will get stuck since it won't be clear that they need to do that).

Could we use a different approach?

def protobufPlatform = properties.getProperty("protobuf_platform", "")
artifact = "com.google.protobuf:protoc:3.8.0:${protobufPlatform}"
}
generateProtoTasks {
all().each { task ->
Expand Down