diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..066b159a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: Nextcloud GmbH +# SPDX-FileCopyrightText: 2026 Milen Pivchev +# SPDX-License-Identifier: GPL-3.0-or-later + +version: 2 +updates: + # Package.swift dependencies (Alamofire, SwiftyJSON, SwiftyXMLParser, CodeScanner, Mocker) + - package-ecosystem: "swift" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + labels: + - "dependencies" + commit-message: + prefix: "fix(deps)" + + # Keep the GitHub Actions used by our workflows up to date + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependencies" + commit-message: + prefix: "ci" diff --git a/.gitignore b/.gitignore index d1dbce30..78abe9de 100644 --- a/.gitignore +++ b/.gitignore @@ -34,9 +34,6 @@ DerivedData *.hmap *.xccheckout -## Package -Carthage/ - ### SwiftPackageManager ### .swiftpm Package.resolved diff --git a/.swiftlint.yml b/.swiftlint.yml index 492e1bbc..05dc9d0f 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -42,7 +42,6 @@ disabled_rules: - compiler_protocol_init excluded: - - Carthage - Pods - Package.swift - Tests diff --git a/Cartfile b/Cartfile deleted file mode 100644 index 8208f5b6..00000000 --- a/Cartfile +++ /dev/null @@ -1,4 +0,0 @@ -github "Alamofire/Alamofire" "5.2.2" -github "https://github.com/yahoojapan/SwiftyXMLParser" "5.2.1" -github "SwiftyJSON/SwiftyJSON" "5.0.0" - diff --git a/README.md b/README.md index 3cbee8a3..1d8e3952 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,6 @@ ## Installation -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate **NextcloudKit** into your Xcode project using Carthage, specify it in your `Cartfile`: - -``` -github "nextcloud/NextcloudKit" "main" -``` - -Run `carthage update` to build the framework and drag the built `NextcloudKit.framework` into your Xcode project. - ### Swift Package Manager [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. Once you have your Swift package set up, adding NextcloudKit as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. @@ -33,8 +23,17 @@ dependencies: [ ### Manual -To add **NextcloudKit** to your app without Carthage, clone this repo and place it somewhere in your project folder. -Then, add `NextcloudKit.xcodeproj` to your project, select your app target and add the NextcloudKit framework as an embedded binary under `General` and as a target dependency under `Build Phases`. +To add **NextcloudKit** to your app, clone this repo and place it somewhere in your project folder. + +In an Xcode project, drag the cloned folder into the Project navigator — Xcode picks it up as a local Swift package. Then select your app target and add the `NextcloudKit` library (and `NextcloudKitUI`, if you need the UI components) under `General ▸ Frameworks, Libraries, and Embedded Content`. + +If used in another Swift package, reference it by path instead: + +```swift +dependencies: [ + .package(path: "../NextcloudKit") +] +``` ## Testing diff --git a/REUSE.toml b/REUSE.toml index 8147e891..a9b5991a 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -12,7 +12,7 @@ SPDX-FileCopyrightText = "2024 Nextcloud GmbH" SPDX-License-Identifier = "LicenseRef-NextcloudTrademarks" [[annotations]] -path = ["Cartfile", "Gemfile", "Package.resolved"] +path = ["Gemfile", "Package.resolved"] precedence = "aggregate" SPDX-FileCopyrightText = "2022 Nextcloud GmbH and Nextcloud contributors" SPDX-License-Identifier = "GPL-3.0-or-later"