Skip to content

Bazel/Blaze BUILD #56

@cpsauer

Description

@cpsauer

Hey Googlers!

Any chance you'd be down to release the Blaze/Bazel (Blazel!) BUILD files for this code? Would be handy to those of use building with Bazel.

Two of the external dependencies have done so already (nanopb and PromisesObjC), and I'd asked GoogleUtilities if they'd do the same in google/GoogleUtilities#72

If useful, here's one I spun up for my own quick use.

# Created from https://github.com/google/GoogleDataTransport/blob/1a65c30db4fc841e06586441682c2dda036d9db3/GoogleDataTransport.podspec

objc_library(
    name = "GoogleDataTransport",
    hdrs = glob(["GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/*.h"]),
    visibility = ["//visibility:public"],

    srcs = glob(["GoogleDataTransport/GDTCORLibrary/**/*", "GoogleDataTransport/GDTCCTLibrary/**/*"]),
    deps = [
        "@GooglePromises//:FBLPromises",
        "@GoogleUtilities//:Environment",
        "@GoogleUtilities//:Logger",
        "@nanopb//:nanopb",
    ],
    sdk_frameworks = [
        "CoreTelephony",
        "SystemConfiguration",
    ],
    sdk_dylibs = ["libz"],
)

Thanks for your consideration!
Chris
(ex-Googler)

P.S. To load nanopb, you'll need a patch file to enable malloc. To save time, here's one that works for the latest commit (2210cd92a6237a9ff82b58cfbe0c58da25ce1e11) that supports the compiled protos you're embedding

--- pb.h
+++ pb.h
@@ -13,2 +13,2 @@
 /* Enable support for dynamically allocated fields */
-/* #define PB_ENABLE_MALLOC 1 */
+#define PB_ENABLE_MALLOC 1

--- BUILD
+++ BUILD
@@ -7,2 +7,3 @@
 cc_library(
   name = "nanopb",
+  include_prefix = "nanopb",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions