diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aab3ca7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Build & Test + runs-on: macos-26 + steps: + - uses: actions/checkout@v4 + - uses: jdx/mise-action@v3 + - run: tuist test diff --git a/.gitignore b/.gitignore index 52fe2f7..28235d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,13 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore +# Tuist managed +Derived/ -## User settings +# Xcode +build/ +DerivedData/ +*.xcodeproj +*.xcworkspace xcuserdata/ -## Obj-C/Swift specific -*.hmap - ## App packaging *.ipa *.dSYM.zip @@ -18,45 +18,19 @@ timeline.xctimeline playground.xcworkspace # Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -# *.xcodeproj -# -# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata -# hence it is not needed unless you have added a package configuration file to your project -# .swiftpm - .build/ # CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ -# -# Add this line if you want to avoid checking in source code from the Xcode workspace -# *.xcworkspace +Pods/ # Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - Carthage/Build/ # fastlane -# -# It is recommended to not store the screenshots in the git repo. -# Instead, use fastlane to re-generate the screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - fastlane/report.xml fastlane/Preview.html fastlane/screenshots/**/*.png fastlane/test_output + +# System +.DS_Store diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..1ffcf12 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,2 @@ +[tools] +tuist = "4.40.0" diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..aecbedf --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,42 @@ +# Stuff – Repository Shape + +## Build system + +| Tool | Version | Pinned via | +|-------|---------|--------------| +| Tuist | 4.40.0 | `.mise.toml` | + +Tuist manifests live at the repo root (`Project.swift`, `Tuist.swift`). +Run `./ide` (or `./ide -i` to also install dependencies) to regenerate the +Xcode project. + +## Targets + +_No apps or modules yet._ Add targets to `Project.swift` using `macApp()` or `framework()` helpers. + +## Deployment + +| Platform | Minimum OS | +|------------------------------|-------------| +| iPhone, iPad, Mac Catalyst | iOS 26.0 | +| macOS (native) | macOS 26.0 | + +## Directory layout + +``` +/ + Sources/ – production code + Tests/ – unit tests (Swift Testing, not XCTest) + Resources/ – asset catalogs, etc. (apps only) +``` + +## Conventions + +- **Swift Testing** (`import Testing`) for all unit tests – do not use XCTest. +- Generated `.xcodeproj` and `Derived/` are git-ignored; never commit them. +- Bundle IDs follow `com.stuff.`. + +## Plans + +Implementation plans go in `Plans/` and are named +`--.md`. diff --git a/Plans/.gitkeep b/Plans/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Project.swift b/Project.swift new file mode 100644 index 0000000..34d0a6d --- /dev/null +++ b/Project.swift @@ -0,0 +1,70 @@ +import ProjectDescription + +let macDestinations: Destinations = [.mac] +let macDeployment: DeploymentTargets = .macOS("26.0") + +func framework( + _ name: String, + bundleIdSuffix: String, + dependencies: [TargetDependency] = [] +) -> [Target] { + [ + .target( + name: name, + destinations: macDestinations, + product: .framework, + bundleId: "com.stuff.\(bundleIdSuffix)", + deploymentTargets: macDeployment, + sources: ["\(name)/Sources/**"], + dependencies: dependencies + ), + .target( + name: "\(name)Tests", + destinations: macDestinations, + product: .unitTests, + bundleId: "com.stuff.\(bundleIdSuffix).tests", + deploymentTargets: macDeployment, + sources: ["\(name)/Tests/**"], + dependencies: [.target(name: name)] + ), + ] +} + +func macApp( + _ name: String, + bundleIdSuffix: String, + infoPlist: [String: Plist.Value] = [:], + dependencies: [TargetDependency] = [] +) -> [Target] { + [ + .target( + name: name, + destinations: macDestinations, + product: .app, + bundleId: "com.stuff.\(bundleIdSuffix)", + deploymentTargets: macDeployment, + infoPlist: .extendingDefault(with: infoPlist), + sources: ["\(name)/Sources/**"], + resources: ["\(name)/Resources/**"], + dependencies: dependencies + ), + .target( + name: "\(name)Tests", + destinations: macDestinations, + product: .unitTests, + bundleId: "com.stuff.\(bundleIdSuffix).tests", + deploymentTargets: macDeployment, + sources: ["\(name)/Tests/**"], + dependencies: [.target(name: name)] + ), + ] +} + +let project = Project( + name: "Stuff", + options: .options( + defaultKnownRegions: ["en"], + developmentRegion: "en" + ), + targets: [] +) diff --git a/README.md b/README.md index 1bcc71a..6a14204 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,36 @@ # Stuff -Random apps and stuff + +Random apps and stuff. + +## Requirements + +- Xcode 26+ +- [mise](https://mise.jdx.dev) (manages Tuist version) +- iOS 26.0+ + +## Getting started + +```bash +# Install mise (if needed) +brew install mise + +# Generate the Xcode project +./ide + +# Or install dependencies first, then generate +./ide -i +``` + +## Project structure + +``` +Project.swift Tuist project manifest +Tuist.swift Tuist configuration +.mise.toml Pins Tuist 4.40.0 +ide Dev script – regenerates Xcode project +AGENTS.md Repository shape for AI agents +``` + +## License + +Apache 2.0 – see [LICENSE](LICENSE). diff --git a/Tuist.swift b/Tuist.swift new file mode 100644 index 0000000..ff8e64f --- /dev/null +++ b/Tuist.swift @@ -0,0 +1,3 @@ +import ProjectDescription + +let config = Config() diff --git a/ide b/ide new file mode 100755 index 0000000..e00869f --- /dev/null +++ b/ide @@ -0,0 +1,20 @@ +#!/bin/bash +set -euo pipefail + +INSTALL=false + +for arg in "$@"; do + case "$arg" in + -i|--install) + INSTALL=true + ;; + esac +done + +if [ "$INSTALL" = true ]; then + echo "==> tuist install" + mise exec -- tuist install +fi + +echo "==> tuist generate" +mise exec -- tuist generate