Podfile 1.58 KB
Newer Older
Davide De Rosa's avatar
Davide De Rosa committed
1
2
3
4
5
6
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

# Libraries

7
8
$git_root = "https://github.com/pia-foss"

Davide De Rosa's avatar
Davide De Rosa committed
9
$library_pod = 'PIALibrary'
10
$library_repo = 'client-library-apple'
Davide De Rosa's avatar
Davide De Rosa committed
11
12
13
14
15
16
17
18
$library_subspecs = [
    'Library',
    'UI',
    'Mock',
    'VPN'
]

$tunnel_pod = 'PIATunnel'
19
$tunnel_repo = 'tunnel-apple'
Davide De Rosa's avatar
Davide De Rosa committed
20
21
22

def library_by_path(root)
    $library_subspecs.each { |name|
23
        pod "#{$library_pod}/#{name}", :path => "#{root}/#{$library_repo}"
Davide De Rosa's avatar
Davide De Rosa committed
24
25
26
27
28
    }
end

def library_by_git(sha)
    $library_subspecs.each { |name|
29
        pod "#{$library_pod}/#{name}", :git => "#{$git_root}/#{$library_repo}", :commit => sha
Davide De Rosa's avatar
Davide De Rosa committed
30
31
32
33
34
    }
end

def library_by_version(version)
    $library_subspecs.each { |name|
Davide De Rosa's avatar
Davide De Rosa committed
35
        pod "#{$library_pod}/#{name}", version
Davide De Rosa's avatar
Davide De Rosa committed
36
37
38
39
    }
end

def tunnel_by_path(root)
40
    pod $tunnel_pod, :path => "#{root}/#{$tunnel_repo}"
Davide De Rosa's avatar
Davide De Rosa committed
41
42
43
end

def tunnel_by_git(sha)
44
    pod $tunnel_pod, :git => "#{$git_root}/#{$tunnel_repo}", :commit => sha
Davide De Rosa's avatar
Davide De Rosa committed
45
46
47
end

def tunnel_by_version(version)
Davide De Rosa's avatar
Davide De Rosa committed
48
    pod $tunnel_pod, version
Davide De Rosa's avatar
Davide De Rosa committed
49
50
51
52
53
54
55
end

# Pod groups

def shared_main_pods
    pod 'AlamofireImage'
    #library_by_path('..')
56
57
    #library_by_git('8bc6b90')
    library_by_version('~> 1.1.2')
Davide De Rosa's avatar
Davide De Rosa committed
58
59
60
61
62
63
64
65
66
67
68
69
70
end

def app_pods
    shared_main_pods
    pod 'iRate'
    pod 'TPKeyboardAvoiding'
    pod 'SideMenu', '= 3.1.5'
    pod 'FXPageControl'
    pod 'MBProgressHUD'
end

def tunnel_pods
    #tunnel_by_path('..')
Davide De Rosa's avatar
Davide De Rosa committed
71
72
    #tunnel_by_git('bf89991')
    tunnel_by_version('~> 1.1.4')
Davide De Rosa's avatar
Davide De Rosa committed
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
end

# Targets

target 'PIA VPN' do
    app_pods
end

target 'PIA VPN dev' do
    app_pods
    pod 'HockeySDK'
end

target 'PIA VPN Tunnel' do
    tunnel_pods
end