Skip to content

Commit

Permalink
Added Swift Package Manager support
Browse files Browse the repository at this point in the history
  • Loading branch information
Cornelius Horstmann authored and brototyp committed Sep 4, 2019
1 parent 39377d7 commit e1a0fe6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ Doc/
Pods
/Podfile.lock
Carthage/
/.build
17 changes: 17 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// swift-tools-version:5.0
//
// MatomoTracker
//

import PackageDescription

let package = Package(
name: "MatomoTracker",
products: [
.library(name: "MatomoTracker", targets: ["MatomoTracker"])
],
targets: [
.target(name: "MatomoTracker", dependencies: [], path: "MatomoTracker"),
],
swiftLanguageVersions: [.v5]
)
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ namespace :package_manager do
sh("carthage build --no-skip-current") rescue nil
package_manager_failed('Carthage integration') unless $?.success?
end

desc 'Builds the project with the Swift Package Manager'
task spm: :prepare do
sh("swift build") rescue nil
package_manager_failed('Swift Package Manager') unless $?.success?
end
end


Expand All @@ -56,6 +62,7 @@ end
desc 'Check the integration of MatomoTracker with package managers'
task :build_with_package_manager do
Rake::Task['package_manager:carthage'].invoke
Rake::Task['package_manager:spm'].invoke
end

task default: 'test'
Expand Down

0 comments on commit e1a0fe6

Please sign in to comment.