Coder Social home page Coder Social logo

bazelbuild / rules_apple Goto Github PK

View Code? Open in Web Editor NEW
478.0 34.0 257.0 11.63 MB

Bazel rules to build apps for Apple platforms.

License: Apache License 2.0

Python 11.73% Shell 10.01% Objective-C 0.20% Swift 0.82% Starlark 77.13% C++ 0.11% DTrace 0.01%
apple bazel bazel-rules

rules_apple's Introduction

Apple Rules for Bazel

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.

If you are looking for an easy way to build mixed language frameworks, check out rules_ios.

Reference documentation

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

Quick setup

Copy the latest MODULE.bazel or WORKSPACE snippet from the releases page.

Examples

Minimal example:

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

swift_library(
    name = "MyLibrary",
    srcs = glob(["**/*.swift"]),
    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"],
    minimum_os_version = "15.0",
    deps = [":MyLibrary"],
)

See the examples directory for sample applications.

Supported bazel versions

rules_apple and rules_swift are often affected by changes in bazel itself. This means you generally need to update these rules as you update bazel.

You can also see the supported bazel versions in the notes for each release on the releases page.

Besides these constraints this repo follows semver as best as we can since the 1.0.0 release.

Bazel release Minimum supported rules version Final supported rules version Supporting Branch
8.x (most recent rolling) 2.* current master
7.x 2.* current master
6.x 2.* current master
5.x 0.33.0 1.* bazel/5.x
4.x 0.30.0 0.32.0 N/A
3.x 0.20.0 0.21.2 N/A

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.