Skip to content

Commit

Permalink
Micrate to SwiftPM
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Jan 28, 2025
1 parent 92216e3 commit b93980f
Show file tree
Hide file tree
Showing 27 changed files with 64 additions and 36 deletions.
2 changes: 2 additions & 0 deletions just_audio/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
**/ios/Flutter/flutter_assets/
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
.build/
.swiftpm/

# Exceptions to above rules.
!**/ios/**/default.mode1v3
Expand Down
Empty file removed just_audio/darwin/Assets/.gitkeep
Empty file.
6 changes: 0 additions & 6 deletions just_audio/darwin/Classes/IndexedPlayerItem.m

This file was deleted.

4 changes: 2 additions & 2 deletions just_audio/darwin/just_audio.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ A flutter plugin for playing audio.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.source_files = 'just_audio/Sources/just_audio/**/*.{h,m}'
s.public_header_files = 'just_audio/Sources/just_audio/include/**/*.h'
s.ios.dependency 'Flutter'
s.osx.dependency 'FlutterMacOS'
s.ios.deployment_target = '12.0'
Expand Down
26 changes: 26 additions & 0 deletions just_audio/darwin/just_audio/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
// TODO: Update your plugin name.
name: "just_audio",
platforms: [
.iOS("12.0"),
.macOS("10.14")
],
products: [
.library(name: "just-audio", targets: ["just_audio"])
],
dependencies: [],
targets: [
.target(
name: "just_audio",
dependencies: [],
cSettings: [
.headerSearchPath("include/just_audio")
]
)
]
)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#import "BetterEventChannel.h"
#import "AudioPlayer.h"
#import "AudioSource.h"
#import "IndexedAudioSource.h"
#import "LoadControl.h"
#import "UriAudioSource.h"
#import "ConcatenatingAudioSource.h"
#import "LoopingAudioSource.h"
#import "ClippingAudioSource.h"
#import "./include/just_audio/BetterEventChannel.h"
#import "./include/just_audio/AudioPlayer.h"
#import "./include/just_audio/AudioSource.h"
#import "./include/just_audio/IndexedAudioSource.h"
#import "./include/just_audio/LoadControl.h"
#import "./include/just_audio/UriAudioSource.h"
#import "./include/just_audio/ConcatenatingAudioSource.h"
#import "./include/just_audio/LoopingAudioSource.h"
#import "./include/just_audio/ClippingAudioSource.h"
#import <AVFoundation/AVFoundation.h>
#import <stdlib.h>
#include <TargetConditionals.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "AudioSource.h"
#import "./include/just_audio/AudioSource.h"
#import <AVFoundation/AVFoundation.h>

@implementation AudioSource {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "BetterEventChannel.h"
#import "./include/just_audio/BetterEventChannel.h"

@implementation BetterEventChannel {
FlutterEventChannel *_eventChannel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "AudioSource.h"
#import "ClippingAudioSource.h"
#import "IndexedPlayerItem.h"
#import "UriAudioSource.h"
#import "./include/just_audio/AudioSource.h"
#import "./include/just_audio/ClippingAudioSource.h"
#import "./include/just_audio/IndexedPlayerItem.h"
#import "./include/just_audio/UriAudioSource.h"
#import <AVFoundation/AVFoundation.h>

@implementation ClippingAudioSource {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "AudioSource.h"
#import "ConcatenatingAudioSource.h"
#import "./include/just_audio/AudioSource.h"
#import "./include/just_audio/ConcatenatingAudioSource.h"
#import <AVFoundation/AVFoundation.h>
#import <stdlib.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "IndexedAudioSource.h"
#import "IndexedPlayerItem.h"
#import "./include/just_audio/IndexedAudioSource.h"
#import "./include/just_audio/IndexedPlayerItem.h"
#import <AVFoundation/AVFoundation.h>

@implementation IndexedAudioSource {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#import "./include/just_audio/IndexedPlayerItem.h"
#import "./include/just_audio/IndexedAudioSource.h"

@implementation IndexedPlayerItem
@synthesize audioSource;
@end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "JustAudioPlugin.h"
#import "AudioPlayer.h"
#import "./include/just_audio/JustAudioPlugin.h"
#import "./include/just_audio/AudioPlayer.h"
#import <AVFoundation/AVFoundation.h>
#include <TargetConditionals.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "LoadControl.h"
#import "./include/just_audio/LoadControl.h"

@implementation LoadControl
@synthesize preferredForwardBufferDuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "AudioSource.h"
#import "LoopingAudioSource.h"
#import "./include/just_audio/AudioSource.h"
#import "./include/just_audio/LoopingAudioSource.h"
#import <AVFoundation/AVFoundation.h>

@implementation LoopingAudioSource {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "UriAudioSource.h"
#import "IndexedAudioSource.h"
#import "IndexedPlayerItem.h"
#import "LoadControl.h"
#import "./include/just_audio/UriAudioSource.h"
#import "./include/just_audio/IndexedAudioSource.h"
#import "./include/just_audio/IndexedPlayerItem.h"
#import "./include/just_audio/LoadControl.h"
#import <AVFoundation/AVFoundation.h>

@implementation UriAudioSource {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b93980f

Please sign in to comment.