Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Add SPM support #16

Merged
merged 6 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SDWebImageFLPlugin",
platforms: [
.iOS(.v9),
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "SDWebImageFLPlugin",
targets: ["SDWebImageFLPlugin"]
)
],
dependencies: [
.package(
url: "https://github.com/SDWebImage/SDWebImage.git",
from: "5.10.0"
),
.package(
url: "https://github.com/Flipboard/FLAnimatedImage.git",
from: "1.0.11"
)
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SDWebImageFLPlugin",
dependencies: ["SDWebImage", "FLAnimatedImage"],
path: "SDWebImageFLPlugin",
sources: ["Classes/FLAnimatedImageBridge"],
publicHeadersPath: "Modules",
cSettings: [
.headerSearchPath("Modules")
]
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
* file that was distributed with this source code.
*/

#if __has_include(<SDWebImage/SDWebImage.h>)
#import <SDWebImage/SDWebImage.h>
#else
@import SDWebImage;
#endif
#if __has_include(<FLAnimatedImage/FLAnimatedImage.h>)
#import <FLAnimatedImage/FLAnimatedImage.h>
#else
@import FLAnimatedImage;
#endif
#import "SDFLAnimatedImage.h"

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
* file that was distributed with this source code.
*/

#import <FLAnimatedImage/FLAnimatedImage.h>
#if __has_include(<SDWebImage/SDWebImage.h>)
#import <SDWebImage/SDWebImage.h>
#else
@import SDWebImage;
#endif
#if __has_include(<FLAnimatedImage/FLAnimatedImage.h>)
#import <FLAnimatedImage/FLAnimatedImage.h>
#else
@import FLAnimatedImage;
#endif

/**
* Optimal frame cache size of FLAnimatedImage during initializer. (1.0.11 version later)
Expand Down
1 change: 0 additions & 1 deletion SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#import <SDWebImageFLPlugin/FLAnimatedImageView+WebCache.h>
#import <SDWebImageFLPlugin/SDFLAnimatedImage.h>


FOUNDATION_EXPORT double SDWebImageFLPluginVersionNumber;
FOUNDATION_EXPORT const unsigned char SDWebImageFLPluginVersionString[];