pod-builder 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.vscode/launch.json +102 -0
- data/Example/PodBuilderExample.xcodeproj/project.pbxproj +416 -0
- data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/xcuserdata/tomas.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/Example/PodBuilderExample.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- data/Example/PodBuilderExample.xcworkspace/contents.xcworkspacedata +10 -0
- data/Example/PodBuilderExample/AppDelegate.swift +47 -0
- data/Example/PodBuilderExample/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
- data/Example/PodBuilderExample/Assets.xcassets/Contents.json +6 -0
- data/Example/PodBuilderExample/Base.lproj/LaunchScreen.storyboard +25 -0
- data/Example/PodBuilderExample/Base.lproj/Main.storyboard +24 -0
- data/Example/PodBuilderExample/Info.plist +45 -0
- data/Example/PodBuilderExample/ViewController.swift +25 -0
- data/Example/Podfile +8 -0
- data/Example/Podfile.lock +16 -0
- data/Example/Pods/Alamofire/LICENSE +19 -0
- data/Example/Pods/Alamofire/README.md +242 -0
- data/Example/Pods/Alamofire/Source/AFError.swift +460 -0
- data/Example/Pods/Alamofire/Source/Alamofire.swift +465 -0
- data/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +37 -0
- data/Example/Pods/Alamofire/Source/MultipartFormData.swift +580 -0
- data/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift +233 -0
- data/Example/Pods/Alamofire/Source/Notifications.swift +55 -0
- data/Example/Pods/Alamofire/Source/ParameterEncoding.swift +483 -0
- data/Example/Pods/Alamofire/Source/Request.swift +654 -0
- data/Example/Pods/Alamofire/Source/Response.swift +567 -0
- data/Example/Pods/Alamofire/Source/ResponseSerialization.swift +715 -0
- data/Example/Pods/Alamofire/Source/Result.swift +300 -0
- data/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift +307 -0
- data/Example/Pods/Alamofire/Source/SessionDelegate.swift +725 -0
- data/Example/Pods/Alamofire/Source/SessionManager.swift +896 -0
- data/Example/Pods/Alamofire/Source/TaskDelegate.swift +466 -0
- data/Example/Pods/Alamofire/Source/Timeline.swift +136 -0
- data/Example/Pods/Alamofire/Source/Validation.swift +315 -0
- data/Example/Pods/Manifest.lock +16 -0
- data/Example/Pods/Pods.xcodeproj/project.pbxproj +673 -0
- data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/Alamofire.xcscheme +60 -0
- data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/Pods-PodBuilderExample.xcscheme +60 -0
- data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/xcschememanagement.plist +21 -0
- data/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +5 -0
- data/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +12 -0
- data/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +16 -0
- data/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap +6 -0
- data/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +9 -0
- data/Example/Pods/Target Support Files/Alamofire/Info.plist +26 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Info.plist +26 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-acknowledgements.markdown +26 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-acknowledgements.plist +58 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-dummy.m +5 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-frameworks.sh +153 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-resources.sh +118 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-umbrella.h +16 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.debug.xcconfig +11 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.modulemap +6 -0
- data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.release.xcconfig +11 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +100 -0
- data/LICENSE.txt +13 -0
- data/README.md +192 -0
- data/Rakefile +2 -0
- data/bin/console +16 -0
- data/bin/setup +8 -0
- data/exe/pod_builder +174 -0
- data/lib/pod_builder/analyze.rb +52 -0
- data/lib/pod_builder/cocoapods/analyzer.rb +24 -0
- data/lib/pod_builder/cocoapods/specification.rb +27 -0
- data/lib/pod_builder/command.rb +9 -0
- data/lib/pod_builder/command/build.rb +240 -0
- data/lib/pod_builder/command/build_all.rb +15 -0
- data/lib/pod_builder/command/clean.rb +80 -0
- data/lib/pod_builder/command/deintegrate.rb +51 -0
- data/lib/pod_builder/command/generate_podspec.rb +17 -0
- data/lib/pod_builder/command/init.rb +86 -0
- data/lib/pod_builder/command/install_sources.rb +82 -0
- data/lib/pod_builder/command/none.rb +16 -0
- data/lib/pod_builder/command/restore_all.rb +30 -0
- data/lib/pod_builder/configuration.rb +91 -0
- data/lib/pod_builder/core.rb +74 -0
- data/lib/pod_builder/install.rb +105 -0
- data/lib/pod_builder/podfile.rb +207 -0
- data/lib/pod_builder/podfile/post_actions.rb +141 -0
- data/lib/pod_builder/podfile_item.rb +216 -0
- data/lib/pod_builder/podspec.rb +71 -0
- data/lib/pod_builder/templates/build_podfile.template +78 -0
- data/lib/pod_builder/templates/build_podspec.template +19 -0
- data/lib/pod_builder/version.rb +4 -0
- data/pod-builder.gemspec +36 -0
- metadata +274 -0
data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-resources.sh
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
set -e
|
3
|
+
set -u
|
4
|
+
set -o pipefail
|
5
|
+
|
6
|
+
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
|
7
|
+
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
|
8
|
+
# resources to, so exit 0 (signalling the script phase was successful).
|
9
|
+
exit 0
|
10
|
+
fi
|
11
|
+
|
12
|
+
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
13
|
+
|
14
|
+
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
|
15
|
+
> "$RESOURCES_TO_COPY"
|
16
|
+
|
17
|
+
XCASSET_FILES=()
|
18
|
+
|
19
|
+
# This protects against multiple targets copying the same framework dependency at the same time. The solution
|
20
|
+
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
|
21
|
+
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
|
22
|
+
|
23
|
+
case "${TARGETED_DEVICE_FAMILY:-}" in
|
24
|
+
1,2)
|
25
|
+
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
|
26
|
+
;;
|
27
|
+
1)
|
28
|
+
TARGET_DEVICE_ARGS="--target-device iphone"
|
29
|
+
;;
|
30
|
+
2)
|
31
|
+
TARGET_DEVICE_ARGS="--target-device ipad"
|
32
|
+
;;
|
33
|
+
3)
|
34
|
+
TARGET_DEVICE_ARGS="--target-device tv"
|
35
|
+
;;
|
36
|
+
4)
|
37
|
+
TARGET_DEVICE_ARGS="--target-device watch"
|
38
|
+
;;
|
39
|
+
*)
|
40
|
+
TARGET_DEVICE_ARGS="--target-device mac"
|
41
|
+
;;
|
42
|
+
esac
|
43
|
+
|
44
|
+
install_resource()
|
45
|
+
{
|
46
|
+
if [[ "$1" = /* ]] ; then
|
47
|
+
RESOURCE_PATH="$1"
|
48
|
+
else
|
49
|
+
RESOURCE_PATH="${PODS_ROOT}/$1"
|
50
|
+
fi
|
51
|
+
if [[ ! -e "$RESOURCE_PATH" ]] ; then
|
52
|
+
cat << EOM
|
53
|
+
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
|
54
|
+
EOM
|
55
|
+
exit 1
|
56
|
+
fi
|
57
|
+
case $RESOURCE_PATH in
|
58
|
+
*.storyboard)
|
59
|
+
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
|
60
|
+
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
|
61
|
+
;;
|
62
|
+
*.xib)
|
63
|
+
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
|
64
|
+
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
|
65
|
+
;;
|
66
|
+
*.framework)
|
67
|
+
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
|
68
|
+
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
69
|
+
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
|
70
|
+
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
71
|
+
;;
|
72
|
+
*.xcdatamodel)
|
73
|
+
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
|
74
|
+
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
|
75
|
+
;;
|
76
|
+
*.xcdatamodeld)
|
77
|
+
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
|
78
|
+
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
|
79
|
+
;;
|
80
|
+
*.xcmappingmodel)
|
81
|
+
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
|
82
|
+
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
|
83
|
+
;;
|
84
|
+
*.xcassets)
|
85
|
+
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
|
86
|
+
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
|
87
|
+
;;
|
88
|
+
*)
|
89
|
+
echo "$RESOURCE_PATH" || true
|
90
|
+
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
|
91
|
+
;;
|
92
|
+
esac
|
93
|
+
}
|
94
|
+
|
95
|
+
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
96
|
+
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
97
|
+
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
|
98
|
+
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
99
|
+
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
100
|
+
fi
|
101
|
+
rm -f "$RESOURCES_TO_COPY"
|
102
|
+
|
103
|
+
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
|
104
|
+
then
|
105
|
+
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
|
106
|
+
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
|
107
|
+
while read line; do
|
108
|
+
if [[ $line != "${PODS_ROOT}*" ]]; then
|
109
|
+
XCASSET_FILES+=("$line")
|
110
|
+
fi
|
111
|
+
done <<<"$OTHER_XCASSETS"
|
112
|
+
|
113
|
+
if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
|
114
|
+
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
115
|
+
else
|
116
|
+
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
|
117
|
+
fi
|
118
|
+
fi
|
data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-umbrella.h
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#ifdef __OBJC__
|
2
|
+
#import <UIKit/UIKit.h>
|
3
|
+
#else
|
4
|
+
#ifndef FOUNDATION_EXPORT
|
5
|
+
#if defined(__cplusplus)
|
6
|
+
#define FOUNDATION_EXPORT extern "C"
|
7
|
+
#else
|
8
|
+
#define FOUNDATION_EXPORT extern
|
9
|
+
#endif
|
10
|
+
#endif
|
11
|
+
#endif
|
12
|
+
|
13
|
+
|
14
|
+
FOUNDATION_EXPORT double Pods_PodBuilderExampleVersionNumber;
|
15
|
+
FOUNDATION_EXPORT const unsigned char Pods_PodBuilderExampleVersionString[];
|
16
|
+
|
data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.debug.xcconfig
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
|
2
|
+
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire"
|
3
|
+
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
4
|
+
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
|
5
|
+
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers"
|
6
|
+
OTHER_LDFLAGS = $(inherited) -framework "Alamofire"
|
7
|
+
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
8
|
+
PODS_BUILD_DIR = ${BUILD_DIR}
|
9
|
+
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
10
|
+
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
11
|
+
PODS_ROOT = ${SRCROOT}/Pods
|
@@ -0,0 +1,11 @@
|
|
1
|
+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
|
2
|
+
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire"
|
3
|
+
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
4
|
+
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
|
5
|
+
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers"
|
6
|
+
OTHER_LDFLAGS = $(inherited) -framework "Alamofire"
|
7
|
+
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
8
|
+
PODS_BUILD_DIR = ${BUILD_DIR}
|
9
|
+
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
10
|
+
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
11
|
+
PODS_ROOT = ${SRCROOT}/Pods
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
pod-builder (0.1.0)
|
5
|
+
cocoapods (~> 1.0)
|
6
|
+
cocoapods-core (~> 1.0)
|
7
|
+
cocoapods-rome (~> 1.0)
|
8
|
+
colored
|
9
|
+
xcodeproj
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
CFPropertyList (3.0.0)
|
15
|
+
activesupport (4.2.10)
|
16
|
+
i18n (~> 0.7)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
19
|
+
tzinfo (~> 1.1)
|
20
|
+
atomos (0.1.2)
|
21
|
+
claide (1.0.2)
|
22
|
+
cocoapods (1.5.3)
|
23
|
+
activesupport (>= 4.0.2, < 5)
|
24
|
+
claide (>= 1.0.2, < 2.0)
|
25
|
+
cocoapods-core (= 1.5.3)
|
26
|
+
cocoapods-deintegrate (>= 1.0.2, < 2.0)
|
27
|
+
cocoapods-downloader (>= 1.2.0, < 2.0)
|
28
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
29
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
30
|
+
cocoapods-stats (>= 1.0.0, < 2.0)
|
31
|
+
cocoapods-trunk (>= 1.3.0, < 2.0)
|
32
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
33
|
+
colored2 (~> 3.1)
|
34
|
+
escape (~> 0.0.4)
|
35
|
+
fourflusher (~> 2.0.1)
|
36
|
+
gh_inspector (~> 1.0)
|
37
|
+
molinillo (~> 0.6.5)
|
38
|
+
nap (~> 1.0)
|
39
|
+
ruby-macho (~> 1.1)
|
40
|
+
xcodeproj (>= 1.5.7, < 2.0)
|
41
|
+
cocoapods-core (1.5.3)
|
42
|
+
activesupport (>= 4.0.2, < 6)
|
43
|
+
fuzzy_match (~> 2.0.4)
|
44
|
+
nap (~> 1.0)
|
45
|
+
cocoapods-deintegrate (1.0.2)
|
46
|
+
cocoapods-downloader (1.2.1)
|
47
|
+
cocoapods-plugins (1.0.0)
|
48
|
+
nap
|
49
|
+
cocoapods-rome (1.0.0)
|
50
|
+
cocoapods (>= 1.1.0, < 2.0)
|
51
|
+
fourflusher (~> 2.0)
|
52
|
+
cocoapods-search (1.0.0)
|
53
|
+
cocoapods-stats (1.0.0)
|
54
|
+
cocoapods-trunk (1.3.0)
|
55
|
+
nap (>= 0.8, < 2.0)
|
56
|
+
netrc (~> 0.11)
|
57
|
+
cocoapods-try (1.1.0)
|
58
|
+
colored (1.2)
|
59
|
+
colored2 (3.1.2)
|
60
|
+
concurrent-ruby (1.0.5)
|
61
|
+
debase (0.2.2)
|
62
|
+
debase-ruby_core_source (>= 0.10.2)
|
63
|
+
debase-ruby_core_source (0.10.3)
|
64
|
+
escape (0.0.4)
|
65
|
+
fourflusher (2.0.1)
|
66
|
+
fuzzy_match (2.0.4)
|
67
|
+
gh_inspector (1.1.3)
|
68
|
+
i18n (0.9.5)
|
69
|
+
concurrent-ruby (~> 1.0)
|
70
|
+
minitest (5.11.3)
|
71
|
+
molinillo (0.6.5)
|
72
|
+
nanaimo (0.2.6)
|
73
|
+
nap (1.1.0)
|
74
|
+
netrc (0.11.0)
|
75
|
+
rake (10.5.0)
|
76
|
+
ruby-debug-ide (0.6.1)
|
77
|
+
rake (>= 0.8.1)
|
78
|
+
ruby-macho (1.2.0)
|
79
|
+
thread_safe (0.3.6)
|
80
|
+
tzinfo (1.2.5)
|
81
|
+
thread_safe (~> 0.1)
|
82
|
+
xcodeproj (1.5.9)
|
83
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
84
|
+
atomos (~> 0.1.2)
|
85
|
+
claide (>= 1.0.2, < 2.0)
|
86
|
+
colored2 (~> 3.1)
|
87
|
+
nanaimo (~> 0.2.5)
|
88
|
+
|
89
|
+
PLATFORMS
|
90
|
+
ruby
|
91
|
+
|
92
|
+
DEPENDENCIES
|
93
|
+
bundler (~> 1.16)
|
94
|
+
debase
|
95
|
+
pod-builder!
|
96
|
+
rake (~> 10.0)
|
97
|
+
ruby-debug-ide
|
98
|
+
|
99
|
+
BUNDLED WITH
|
100
|
+
1.16.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright 2018 Subito.it S.r.l (www.subito.it)
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
## Beta tool: distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2
|
+
|
3
|
+
# PodBuilder
|
4
|
+
|
5
|
+
PodBuilder is a complementary tool to [CocoaPods](https://github.com/CocoaPods/CocoaPods) that allows to prebuild pods into frameworks which can then be included into a project’s repo. Instead of committing pod’s source code you add its compiled counterpart. While there is a size penalty in doing so, and some may argue that git isn’t designed to handle large binaries files (check [Git LFS](https://git-lfs.github.com) to overcome that), compilation times will decrease significantly because pod's source files no longer need to be recompiled _very often_. Additionally frameworks contain all architecture so they’re ready to be used both on any device and simulator.
|
6
|
+
|
7
|
+
Depending on the size of the project and number of pods this can translate in a significant reduction of compilation times (for a large project we designed this tool for we saw a 5x improvement, but YMMV).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'pod-builder'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install pod-builder
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
The tool relies on 3 Podfiles
|
28
|
+
|
29
|
+
1. _Frameworks/Podfile_ (aka PodBuilder-Podfile): this is your original Podfile. This is still your master Podfile that you will update as needed and is used by PodBuilder to determine which versions and dependencies need to be compiled when prebuilding.
|
30
|
+
2. _Podfile_ (aka Application-Podfile): this one is based on the one above but will replace precompiled frameworks with references to the local PodBuilder podspec. It is the Podfile used by your app.
|
31
|
+
3. _Frameworks/Podfile.restore_ (aka Restore-Podfile): this acts as a sort of lockfile and reflects the current state of what is installed in the application, pinning pods to a particular tag or commit. This will be particularly useful until Swift reaches ABI stability, because when you check out an old revision of your code you won't be able to get your project running unless the Swift frameworks were compiled with a same version of Xcode you're currently using.
|
32
|
+
|
33
|
+
The nice thing of this setup is that you can quickly switch between the precompiled and the source code version of a pod. In the Application-Podfile the tool will automatically reference to the local podspec for a precompiled pod but will also leave the original source commented. When you need to get source code version you just switch the 2 comments and run `pod install`, for example when you need to debug a pod's internal implementation.
|
34
|
+
|
35
|
+
As an example these are the 2 lines that are automatically added to the Application-Podfile:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
pod 'PodBuilder/AFNetworking', :path => '../Frameworks'
|
39
|
+
# pod 'AFNetworking'
|
40
|
+
```
|
41
|
+
|
42
|
+
### Commands
|
43
|
+
|
44
|
+
Podbuilder comes with a set of commands:
|
45
|
+
|
46
|
+
- `init`: initializes a project to use PodBuilder
|
47
|
+
- `deintegrate`: deintegrates PodBuilder's initialization
|
48
|
+
- `build`: prebuilts a specific pod declared in the PodBuilder-Podfile
|
49
|
+
- `build_all`: prebuilts all pods declared in the PodBuilder-Podfile
|
50
|
+
- `restore_all`: rebuilts all pods declared in the Framework/Podfile.restore file
|
51
|
+
- `install_sources`: installs sources of pods to debug into prebuild frameworks
|
52
|
+
- `clean`: removes unused prebuilt frameworks, dSYMs and source files added by install_sources
|
53
|
+
|
54
|
+
Commands can be run from anywhere in your project's repo that is **required to be under git**.
|
55
|
+
|
56
|
+
#### `init` command
|
57
|
+
|
58
|
+
This will sets up a project to use PodBuilder.
|
59
|
+
|
60
|
+
The following will happen:
|
61
|
+
|
62
|
+
- Create a _Frameworks_ folder in your repo's root.
|
63
|
+
- Copy your original Podfile to _Frameworks/Podfile_ (PodBuilder-Podfile)
|
64
|
+
- Add an initially empty _PodBuilder.json_ configuration file
|
65
|
+
- Modify the original Podfile (Application-Podfile) with some minor customizations
|
66
|
+
|
67
|
+
#### `deintegrate` command
|
68
|
+
|
69
|
+
This will revert `init`'s changes
|
70
|
+
|
71
|
+
#### `build` command
|
72
|
+
|
73
|
+
Running `pod_builder build [pod name]` will precompile the pod that should be included in the PodBuilder-Podfile.
|
74
|
+
|
75
|
+
The following will happen:
|
76
|
+
|
77
|
+
- Create one or more (if there are dependencies) _.framework_ file/s under _Frameworks/Rome_ along with its corresponding _dSYM_ files (if applicable)
|
78
|
+
- Update the Application-Podfile replacing the pod definition with the precompiled ones
|
79
|
+
- Update/create the Podfile.restore (Restore-Podfile)
|
80
|
+
- Update/create PodBuilder.podspec which is a local podspec for your prebuilt frameworks (more on this later)
|
81
|
+
|
82
|
+
#### `build_all` command
|
83
|
+
|
84
|
+
As `build` but will prebuild all pods defined in PodBuilder-Podfile.
|
85
|
+
|
86
|
+
#### `restore_all` command
|
87
|
+
|
88
|
+
Will recompile all pods to the versions defined in the Restore-Podfile.
|
89
|
+
|
90
|
+
#### `install_sources` command
|
91
|
+
|
92
|
+
When using PodBuilder you loose ability to directly access to the source code of a pod. To overcome this limitation you can use this command which downloads the pod's source code to _Frameworks/Sources_ and with some [tricks](https://medium.com/@t.camin/debugging-prebuilt-frameworks-c9f52d42600b) restores the ability to step into the pods code. This can be very helpful to catch the exact location of a crash when it occurs (showing something more useful than assembly code). It is however advisable to switch to the original pod when doing any advanced debugging during development of code that involves a pod.
|
93
|
+
|
94
|
+
#### `clean` command
|
95
|
+
|
96
|
+
Deletes all unused files by PodBuilder, including .frameworks, .dSYMs and _Source_ repos.
|
97
|
+
|
98
|
+
# Configuration file
|
99
|
+
|
100
|
+
_PodBuilder.json_ allows some advanced customizations.
|
101
|
+
|
102
|
+
## Supported keys
|
103
|
+
|
104
|
+
#### `spec_overrides`
|
105
|
+
|
106
|
+
This hash allows to add/replace keys in a podspec specification. This can be useful to solve compilation issue or change compilation behaviour (e.g. compile framework statically by specifying `static_framework = true`) without having to fork the repo.
|
107
|
+
|
108
|
+
The key is the pod name, the value a hash with the keys of the podspec that need to be overridden.
|
109
|
+
|
110
|
+
As an example here we're setting `module_name` in Google's Advertising SDK:
|
111
|
+
|
112
|
+
```json
|
113
|
+
{
|
114
|
+
"spec_overrides": {
|
115
|
+
"Google-Mobile-Ads-SDK": {
|
116
|
+
"module_name": "GoogleMobileAds"
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
```
|
121
|
+
|
122
|
+
#### `build_settings`
|
123
|
+
|
124
|
+
Xcode build settings to use. You can override the default values which are:
|
125
|
+
|
126
|
+
```json
|
127
|
+
{
|
128
|
+
"ENABLE_BITCODE": "NO",
|
129
|
+
"CLANG_ENABLE_MODULE_DEBUGGING": "NO",
|
130
|
+
"GCC_OPTIMIZATION_LEVEL": "s",
|
131
|
+
"SWIFT_OPTIMIZATION_LEVEL": "-Osize",
|
132
|
+
"SWIFT_COMPILATION_MODE": "Incremental"
|
133
|
+
}
|
134
|
+
```
|
135
|
+
|
136
|
+
#### `build_system`
|
137
|
+
|
138
|
+
Specify which build system to use to compile frameworks. Either `Legacy` (standard build system) or `Latest` (new build system). Default value: `Legacy`.
|
139
|
+
|
140
|
+
#### `license_file_name`
|
141
|
+
|
142
|
+
PodBuilder will create two license files a plist and a markdown file which contains the licenses of each pod specified in the PodBuilder-Podfile. Defailt value: `Pods-acknowledgements`(plist|md).
|
143
|
+
|
144
|
+
#### `skip_licenses`
|
145
|
+
|
146
|
+
PodBuilder writes a plist and markdown license files of pods specified in the PodBuilder-Podfile. You can specify pods that should not be included, for example for private pods.
|
147
|
+
|
148
|
+
```json
|
149
|
+
{
|
150
|
+
"skip_licenses": ["Podname1", "Podname2"]
|
151
|
+
}
|
152
|
+
```
|
153
|
+
|
154
|
+
|
155
|
+
# Under the hood
|
156
|
+
|
157
|
+
PodBuilder leverages CocoaPods code and [cocoapods-rome plugin](https://github.com/CocoaPods/Rome) to compile pods into frameworks. Every compiled framework will be boxed (by adding it as a `vendored_framework`) as a subspec of a local podspec. When needed additional settings will be automatically ported from the original podspec, like for example xcconfig settings.
|
158
|
+
|
159
|
+
# FAQ
|
160
|
+
|
161
|
+
### **Build failed with longish output to the stdout, what should I do next?**
|
162
|
+
|
163
|
+
Relaunch the build command passing `-d`, this won't delete the temporary _/tmp/pod_builder_ folder on failure. Open _/tmp/pod_builder/Pods/Pods.xcproject_, make the Pods-DummyTarget target visible by clicking on _Show_ under _Product->Scheme->Manage shemes..._ and build from within Xcode. This will help you understand what went wrong. Remeber to verify that you're building the _Release_ build configuration.
|
164
|
+
|
165
|
+
### **Do I need to commit compiled frameworks?**
|
166
|
+
|
167
|
+
No. If the size of compiled frameworks in your repo is a concern you can choose add the _Rome_ and _dSYM_ folder to .gitignore and re-run `pod_builder build_all` locally on every machine.
|
168
|
+
|
169
|
+
# Try it out!
|
170
|
+
|
171
|
+
Under _Example_ there's a sample project with a Podfile adding [Alamofire](https://github.com/Alamofire/Alamofire) you can use to try PodBuilder out.
|
172
|
+
|
173
|
+
$ pod_builder init
|
174
|
+
$ pod_builder build_all
|
175
|
+
|
176
|
+
This will initialize the project to use PodBuilder and prebuild Alamofire.
|
177
|
+
|
178
|
+
# Contributing
|
179
|
+
|
180
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Subito-it/PodBuilder.
|
181
|
+
|
182
|
+
|
183
|
+
# Caveats
|
184
|
+
Code isn't probably the cleanest I ever wrote but given the usefulness of the tool I decided to publish it nevertheless.
|
185
|
+
|
186
|
+
|
187
|
+
# Authors
|
188
|
+
[Tomas Camin](https://github.com/tcamin) ([@tomascamin](https://twitter.com/tomascamin))
|
189
|
+
|
190
|
+
# License
|
191
|
+
|
192
|
+
The gem is available under the Apache License, Version 2.0. See the LICENSE file for more info.
|