forked from square/wire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wire.podspec
47 lines (39 loc) · 1.63 KB
/
Wire.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
require_relative 'wire-runtime-swift/pod_helpers.rb'
Pod::Spec.new do |s|
version = get_version
s.name = 'Wire'
s.version = version
s.license = { :type => 'apache2', :file => 'LICENSE.txt' }
s.homepage = 'https://github.com/square/wire'
s.authors = { 'Eric Firestone' => '@firetweet' }
s.summary = 'Protocol buffers runtime for Swift.'
s.source = { :git => 'https://github.com/square/wire.git', :tag => version }
s.module_name = 'Wire'
s.swift_version = '5.0'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.15'
s.watchos.deployment_target = '3.0'
s.source_files = 'wire-runtime-swift/src/main/swift/**/*.swift'
s.test_spec do |test_spec|
test_spec.ios.deployment_target = '11.0'
test_spec.osx.deployment_target = '10.15'
test_spec.watchos.deployment_target = '3.0'
test_spec.script_phase = {
:name => 'Compile Test Protos',
:execution_position => :before_compile,
# We regenerate the protos on each build in case changes were made to the .proto files.
# If a new file was added then `pod install` or `pod gen` may need to be run again.
:script => <<-CMD
cd ${PODS_ROOT}/../..
if [ ! -f ./gradlew ]; then
# This is not development mode.
# This pod was installed via a Podfile (not from source) and ./gradlew was removed.
exit 0
fi
./gradlew :wire-runtime-swift:generateTestProtos
CMD
}
test_spec.preserve_paths = 'wire-runtime-swift/src/test/proto/**/*.proto'
test_spec.source_files = 'wire-runtime-swift/src/test/swift/**/*.swift'
end
end