From 4441c5ac0822241fc8df9c1d4ae71d94cb3c1f99 Mon Sep 17 00:00:00 2001 From: david-swift <106754840+david-swift@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:42:02 +0100 Subject: [PATCH] Fix tutorial: add dependency to target --- user-manual/Basics/HelloWorld.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/user-manual/Basics/HelloWorld.md b/user-manual/Basics/HelloWorld.md index b949402..57e3d49 100644 --- a/user-manual/Basics/HelloWorld.md +++ b/user-manual/Basics/HelloWorld.md @@ -14,9 +14,20 @@ This is a beginner tutorial. We will create a simple "Hello, world!" app using _ ## Add the Dependency 1. Open the `Package.swift` file. 2. Add the following line of code after `name: "HelloWorld",`: -``` +```swift dependencies: [.package(url: "https://github.com/AparokshaUI/Adwaita", from: "0.1.1")], ``` +3. Add the dependency to the executable target: +```swift +targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .executableTarget( + name: "HelloWorld", + dependencies: [.product(name: "Adwaita", package: "Adwaita")] + ), +] +``` ## Create the App 1. Navigate to `Sources/main.swift`.