Giter Site home page Giter Site logo

omarzl / rules_apple Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bazelbuild/rules_apple

0.0 2.0 0.0 5.62 MB

Bazel rules to build apps for Apple platforms.

License: Apache License 2.0

Python 13.64% Shell 19.79% Objective-C 0.22% Swift 0.37% Starlark 65.82% C++ 0.15% DTrace 0.01% Metal 0.01%

rules_apple's Introduction

Apple Rules for Bazel

Build status

This repository contains rules for Bazel that can be used to bundle applications for Apple platforms.

These rules handle the linking and bundling of applications and extensions (that is, the formation of an .app with an executable and resources, archived in an .ipa). Compilation is still performed by the existing objc_library rule in Bazel, and by the swift_library rule available from rules_swift.

Reference documentation

Click here for the reference documentation for the rules and other definitions in this repository.

Quick setup

Add the following to your WORKSPACE file to add the external repositories, replacing the version number in the tag attribute with the version of the rules you wish to depend on:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "build_bazel_rules_apple",
    sha256 = "c84962b64d9ae4472adfb01ec2cf1aa73cb2ee8308242add55fa7cc38602d882",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/0.31.2/rules_apple.0.31.2.tar.gz",
)

load(
    "@build_bazel_rules_apple//apple:repositories.bzl",
    "apple_rules_dependencies",
)

apple_rules_dependencies()

load(
    "@build_bazel_rules_swift//swift:repositories.bzl",
    "swift_rules_dependencies",
)

swift_rules_dependencies()

load(
    "@build_bazel_apple_support//lib:repositories.bzl",
    "apple_support_dependencies",
)

apple_support_dependencies()

Examples

Minimal example:

load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")

objc_library(
    name = "Lib",
    srcs = glob([
        "**/*.h",
        "**/*.m",
    ]),
    data = [
        ":Main.storyboard",
    ],
)

# Links code from "deps" into an executable, collects and compiles resources
# from "deps" and places them with the executable in an .app bundle, and then
# outputs an .ipa with the bundle in its Payload directory.
ios_application(
    name = "App",
    bundle_id = "com.example.app",
    families = ["iphone", "ipad"],
    infoplists = [":Info.plist"],
    deps = [":Lib"],
)

See the examples directory for sample applications.

rules_apple's People

Contributors

alexeagle avatar allevato avatar ashgti avatar balestrapatrick avatar brentleyjones avatar c-parsons avatar chenxiao0228 avatar dabelknap avatar davidgoldman avatar dflems avatar dierksen avatar gabebear avatar googlewalt avatar jerrymarino avatar jverkoey avatar kastiglione avatar kaylathar avatar keith avatar mccorkill1 avatar nglevin avatar rahul-malik avatar rickeylev avatar segiddins avatar sergiocampama avatar steeve avatar swiple-rules-gardener avatar thii avatar thomasvl avatar vladmos avatar xinzhengzhang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.