Skip to content

Commit

Permalink
Merge branch 'main' into pennig/calculate-output-groups
Browse files Browse the repository at this point in the history
Signed-off-by: Karim Alweheshy <[email protected]>
  • Loading branch information
karim-alweheshy authored Jul 30, 2024
2 parents 9b32f69 + 0be7a7f commit 5c10273
Show file tree
Hide file tree
Showing 51 changed files with 1,976 additions and 756 deletions.
5 changes: 5 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"email": "[email protected]",
"github": "BalestraPatrick",
"name": "Patrick Balestra"
},
{
"email": "[email protected]",
"github": "luispadron",
"name": "Luis Padron"
}
],
"repository": [
Expand Down
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(
name = "rules_swift",
version = "1.6.0",
max_compatibility_level = 2,
repo_name = "build_bazel_rules_swift",
)
bazel_dep(
Expand Down Expand Up @@ -73,7 +74,7 @@ single_version_override(
# For Stardoc
single_version_override(
module_name = "bazel_skylib",
version = "1.5.0",
version = "1.6.0",
)

apple_cc_configure = use_extension(
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ the ruleset.

## Projects using rules_xcodeproj

- amo
- BazelPods
- Cash App
- Envoy Mobile
Expand All @@ -66,6 +67,7 @@ the ruleset.
- [Slack](https://www.youtube.com/watch?v=wy3Q38VJ5uQ)
- Snap
- Spotify
- Square
- SwiftLint
- Ten Ten
- Tinder
Expand Down
96 changes: 96 additions & 0 deletions distribution/release_notes_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
## What’s Changed

### Since %LAST_TAG%

* TBD

**Below are the changes that were in %LAST_TAG%.**

### ⚠️ Breaking changes ⚠️

* TBD

### New

* TBD

### Adjusted

* TBD

### Fixed

* TBD

### Ruleset Development Changes

* TBD

### Full Changelog

https://github.com/buildbuddy-io/rules_xcodeproj/compare/%LAST_MINOR_TAG%...%CURRENT_TAG%

## Contributors

* TBD

## Bzlmod Snippet

```starlark
bazel_dep(name = "rules_xcodeproj", version = "%CURRENT_TAG%")
```

`release.tar.gz`’s `integrity`: `%INTEGRITY%`

## Workspace Snippet

Please use the release asset (`release.tar.gz`) from your Bazel `WORKSPACE` instead of GitHub's source asset to reduce download size and improve reproducibility.

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

http_archive(
name = "rules_xcodeproj",
integrity = "%INTEGRITY%",
url = "https://github.com/MobileNativeFoundation/rules_xcodeproj/releases/download/%CURRENT_TAG%/release.tar.gz",
)

load(
"@rules_xcodeproj//xcodeproj:repositories.bzl",
"xcodeproj_rules_dependencies",
)

xcodeproj_rules_dependencies()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

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_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)

swift_rules_extra_dependencies()

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

apple_support_dependencies()
```
1 change: 1 addition & 0 deletions docs/bazel.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ load("@rules_xcodeproj//xcodeproj:defs.bzl", "xcodeproj")
- [`xcschemes.env_value`](#xcschemes.env_value)
- [`xcschemes.pre_post_actions.build_script`](#xcschemes.pre_post_actions.build_script)
- [`xcschemes.pre_post_actions.launch_script`](#xcschemes.pre_post_actions.launch_script)
- [`xcschemes.autogeneration_config`](#xcschemes.autogeneration_config)
- [Custom Xcode schemes (Legacy generation mode)](#custom-xcode-schemes-legacy-generation-mode)
- [`xcode_schemes.scheme`](#xcode_schemes.scheme)
- [`xcode_schemes.build_action`](#xcode_schemes.build_action)
Expand Down
4 changes: 2 additions & 2 deletions examples/integration/CommandLine/CommandLineToolLib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ cc_library(
name = "private_lib",
srcs = ["private_lib.c"],
hdrs = ["private_lib.h"],
aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"],
copts = [
# This isn't needed bty anything, it's to exercise an edge case in
# `FilePath` detection.
"-Ibazel-out",
"-Iexternal",
],
tags = ["swift_module=_Lib"],
)

swift_library(
Expand All @@ -55,7 +55,7 @@ swift_library(
visibility = ["//CommandLine/Tests:__subpackages__"],
deps = [
":lib_impl",
"//CommandLine/swift_c_module",
"//CommandLine/swift_interop_hint:c_lib",
"@examples_command_line_external//:ExternalFramework",
"@examples_command_line_external//:Library",
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@_implementationOnly import _Lib
@_implementationOnly import _SwiftLib
@_implementationOnly import CommandLine_CommandLineToolLib_private_lib
import ExternalFramework
import Foundation
import ImportableLibrary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_c_module")
load(
"@build_bazel_rules_swift//swift:swift_interop_hint.bzl",
"swift_interop_hint",
)

cc_library(
name = "c_lib",
Expand All @@ -8,14 +11,12 @@ cc_library(
hdrs = [
"c_lib.h",
],
aspect_hints = [":c_lib_swift_interop"],
visibility = ["//CommandLine:__subpackages__"],
)

swift_c_module(
name = "swift_c_module",
swift_interop_hint(
name = "c_lib_swift_interop",
module_map = "c_lib.modulemap",
module_name = "SwiftCModule",
visibility = ["//CommandLine:__subpackages__"],
deps = [
":c_lib",
],
)
36 changes: 14 additions & 22 deletions examples/integration/GRPC/BUILD
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application")
load(
"@build_bazel_rules_swift//swift:swift.bzl",
"swift_grpc_library",
"swift_library",
"swift_proto_library",
)
load("@build_bazel_rules_swift//proto:proto.bzl", "swift_proto_library")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")

proto_library(
name = "echo_proto",
srcs = ["echo.proto"],
)

swift_proto_library(
name = "echo_proto_swift",
deps = [":echo_proto"],
)

swift_grpc_library(
name = "echo_client_services_swift",
srcs = [":echo_proto"],
flavor = "client",
deps = [":echo_proto_swift"],
compilers = [
"@build_bazel_rules_swift//proto/compilers:swift_client_proto",
"@build_bazel_rules_swift//proto/compilers:swift_proto",
],
protos = [":echo_proto"],
)

swift_grpc_library(
swift_proto_library(
name = "echo_server_services_swift",
srcs = [":echo_proto"],
flavor = "server",
deps = [":echo_proto_swift"],
compilers = [
"@build_bazel_rules_swift//proto/compilers:swift_proto",
"@build_bazel_rules_swift//proto/compilers:swift_server_proto",
],
protos = [":echo_proto"],
)

swift_library(
name = "echo_server.library",
srcs = ["server_main.swift"],
deps = [
":echo_proto_swift",
":echo_server_services_swift",
],
deps = [":echo_server_services_swift"],
)

macos_command_line_application(
Expand Down
1 change: 0 additions & 1 deletion examples/integration/GRPC/client_main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import SwiftProtobuf
import GRPC
import NIOCore
import NIOPosix
import GRPC_echo_proto
import GRPC_echo_client_services_swift

@main
Expand Down
1 change: 0 additions & 1 deletion examples/integration/GRPC/server_main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Dispatch
import GRPC
import NIOCore
import NIOPosix
import GRPC_echo_proto
import GRPC_echo_server_services_swift

/// Concrete implementation of the `EchoService` service definition.
Expand Down
4 changes: 2 additions & 2 deletions examples/integration/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ bazel_dep(
)
bazel_dep(
name = "rules_apple",
version = "3.5.1",
version = "3.6.0",
repo_name = "build_bazel_rules_apple",
)
bazel_dep(
name = "rules_swift",
version = "1.18.0",
version = "2.0.0",
repo_name = "build_bazel_rules_swift",
)
bazel_dep(name = "bazel_skylib", version = "1.5.0")
Expand Down
14 changes: 5 additions & 9 deletions examples/integration/Proto/BUILD
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application")
load(
"@build_bazel_rules_swift//swift:swift.bzl",
"swift_library",
"swift_proto_library",
)
load("@build_bazel_rules_swift//proto:proto.bzl", "swift_proto_library")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")

proto_library(
name = "person_proto",
Expand All @@ -12,15 +9,14 @@ proto_library(

swift_proto_library(
name = "person_proto_swift",
deps = [":person_proto"],
module_name = "Proto_person_proto",
protos = [":person_proto"],
)

swift_library(
name = "tool.library",
srcs = ["main.swift"],
deps = [
":person_proto_swift",
],
deps = [":person_proto_swift"],
)

macos_command_line_application(
Expand Down
8 changes: 8 additions & 0 deletions examples/integration/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

local_repository(
name = "rules_xcodeproj",
path = "../..",
)

http_archive(
name = "build_bazel_rules_swift",
sha256 = "32eeb4ef33c708d9c9a4ee0fa8475322ef149dabc81884ddc3b50eb2efff7843",
url = "https://github.com/bazelbuild/rules_swift/releases/download/2.0.0/rules_swift.2.0.0.tar.gz",
)

load(
"@rules_xcodeproj//xcodeproj:repositories.bzl",
"xcodeproj_rules_dependencies",
Expand Down
Loading

0 comments on commit 5c10273

Please sign in to comment.