ADFA-2781: use protoc from PATH when building on-device#946
ADFA-2781: use protoc from PATH when building on-device#946itsaky-adfa merged 3 commits intostagefrom
Conversation
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
📝 WalkthroughRelease NotesFeatures
Changes
Risks & Best Practices Considerations
Testing Recommendations
WalkthroughThis PR introduces shell command execution utilities and centralizes protoc configuration for protobuf builds. It adds ShellUtils for running shell commands, creates ProtocConf to handle protoc setup (both on-device and via Maven artifacts), upgrades SigningConfigPlugin to suppress repeated warnings, and updates build configurations across the project. Changes
Sequence Diagram(s)sequenceDiagram
participant Gradle as Gradle Build
participant ProtocConf as ProtocConf
participant ShellUtils as ShellUtils
participant FileSystem as File System
participant ProtobufExt as Protobuf Extension
Gradle->>ProtocConf: configureProtoc(protobuf, protocVersion)
ProtocConf->>ProtocConf: isTermuxAppPackageNameSet() && isTermuxJdk()?
alt On-Device Protoc Available
ProtocConf->>ShellUtils: which("protoc")
ShellUtils->>FileSystem: Execute: which protoc
FileSystem-->>ShellUtils: protoc path or null
ShellUtils-->>ProtocConf: protoc path
ProtocConf->>FileSystem: Verify file exists & executable
FileSystem-->>ProtocConf: true/false
ProtocConf->>ProtobufExt: protoc { path = "/path/to/protoc" }
else Use Maven Artifact
ProtocConf->>ProtocConf: configureProtocArtifact()
ProtocConf->>ProtobufExt: protoc { artifact = "com.google.protobuf:protoc:version" }
end
ProtobufExt-->>Gradle: Configuration complete
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
See ADFA-2781 for more details.