-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathstep.yml
More file actions
214 lines (200 loc) · 8.85 KB
/
step.yml
File metadata and controls
214 lines (200 loc) · 8.85 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
title: Flutter Build
summary: Builds a Flutter project.
description: |-
This Step builds an iOS and an Android app. By default the Step builds the artifact based on the platform the scanner detects.
### Configuring the Step
1. In the **Project Location** input the root directory of your Flutter project is automatically filled out.
2. Select which platform your project should be built for (`ios`, `android` or `both`).
3. Enable **Debug** option to get verbose logs and see where the Step is failing.
Depending on the selected platform/s, continue with the rest of the config inputs.
#### Configuring for an iOS app
1. Make sure the **Platform input** is set to `iOS` or `both`.
2. In **Codesign Identity** you can onverride the code signing identities that you set in Flutter.
3. In **Additional parameters** add any flag to customize your build (for example, the `--release` flag appended to `flutter build io` builds a deployable iOS app).
4. Leave the **Output pattern** input's default value as is or modify it to the pattern if your build artifacts are stored elsewhere.
5. Make sure you have the **Xcode Archive & Export for iOS** Step after the **Flutter Build** Step in your Workflow.
#### Configuring for an Android app
1. Insert the **Android Sign** Step after the **Flutter Build** Step and make sure code signing files are uploaded to the **Code Signing** tab.
2. Make sure the **Platform input** is set to `Android` or `both`.
3. Scroll down to the `Android Platform Configs` input section, and select the preferred output artifact type you wish to generate in the **Android output artifact type** input. The Step can build an APK and an Android App Bundle as well.
4. Append any flag to the `build` command in the **Additional parameters** input.
5. Leave the **Output pattern** input's default value as is or modify it to the pattern if your build artifacts are stored elsewhere.
### Troubleshooting
Make sure the **Flutter Install** Step is before the **Flutter Build** Step.
If you have not set up code signing correctly, some code signing related issue will definitely surface by this build Step.
If you're unsure about code signing, consult our guide linked in Useful links.
### Useful links
- [Getting started with Flutter apps](https://devcenter.bitrise.io/getting-started/getting-started-with-flutter-apps/#deploying-a-flutter-app)
- [Available version tags](https://github.com/flutter/flutter/releases)
- [Available branches](https://github.com/flutter/flutter/branches)
- [Code signing](https://devcenter.bitrise.io/code-signing/code-signing-index/)
### Related Steps
- [Flutter Install](https://www.bitrise.io/integrations/steps/flutter-installer)
- [Flutter Test](https://www.bitrise.io/integrations/steps/flutter-test)
website: https://github.com/bitrise-steplib/bitrise-step-flutter-build
source_code_url: https://github.com/bitrise-steplib/bitrise-step-flutter-build
support_url: https://github.com/bitrise-steplib/bitrise-step-flutter-build/issues
type_tags:
- build
project_type_tags:
- flutter
is_requires_admin_user: true
is_always_run: false
is_skippable: false
toolkit:
go:
package_name: github.com/bitrise-steplib/bitrise-step-flutter-build
inputs:
- project_location: $BITRISE_SOURCE_DIR
opts:
title: Project Location
summary: The root dir of your Flutter project.
description: The root dir of your Flutter project.
is_required: true
- platform: both
opts:
title: Platform
summary: The selected platform will be built, or both iOS and Android if you select both
description: The selected platform will be built, or both iOs and Android if you select both
is_required: true
value_options:
- both
- ios
- android
- additional_build_params: ""
opts:
title: Additional params for flutter build
summary: Additional params for flutter build
description: |-
Additional params for flutter build.
Example: you can specify a Build Number for `flutter build`
via the `--build-number` flutter build param.
For example, to set it to the `$BITRISE_BUILD_NUMBER` you can set this input
to: `--build-number=$BITRISE_BUILD_NUMBER`.
is_required: false
- is_debug_mode: "false"
opts:
title: Debug mode?
summary: If debug mode is enabled, the step will print verbose logs
description: |-
If debug mode is enabled, the step will print verbose logs
is_required: true
value_options:
- "true"
- "false"
- cache_level: all
opts:
title: Build cache
summary: Enable or disable caching
description: |-
If enabled, will cache:
- pub packages
- Android (gradle) cache
- Carthage / Cocoapods dependencies
is_required: true
value_options:
- all
- none
- ios_output_type: app
opts:
category: iOS Platform Configs
title: iOS output artifact type
summary: Output type to build when building for iOS
description: |-
Output type to build when building for iOS. Possible values:
- `app`: Build an iOS application bundle via `flutter build ios`
- `archive`: Build an iOS archive bundle via `flutter build ipa`
is_required: true
value_options:
- app
- archive
- ios_codesign_identity:
opts:
category: iOS Platform Configs
title: Codesign Identity
summary: Override codesign identity in .flutter_settings
description: Override codesign identity in .flutter_settings
- ios_additional_params: --release
opts:
category: iOS Platform Configs
title: Additional parameters
summary: The flags from this input field will be appended to the `flutter build ios` or `flutter build ipa` command.
description: The flags from this input field will be appended to the `flutter build ios` command.
- ios_output_pattern: |-
*build/ios/iphoneos/*.app
*build/ios/archive/*.xcarchive
opts:
category: iOS Platform Configs
title: Output pattern
summary: Pattern to find built artifacts relative to $BITRISE\_SOURCE\_DIR
description: |-
Separate patterns with a newline.
is_required: true
- android_output_type: apk
opts:
category: Android Platform Configs
title: Android output artifact type
summary: The selected output type will be build, either APK or app bundle (AAB)
description: The selected output type will be build, either APK or app bundle (AAB)
is_required: true
value_options:
- apk
- appbundle
- android_additional_params: --release
opts:
category: Android Platform Configs
title: Additional parameters
summary: The flags from this input field will be appended to the `flutter build apk` command.
description: The flags from this input field will be appended to the `flutter build apk` command.
- android_output_pattern: |-
*build/app/outputs/apk/*/*.apk
*build/app/outputs/bundle/*/*.aab
opts:
category: Android Platform Configs
title: Output (.apk, .aab) pattern
summary: Pattern to find built APK or AAB artifacts relative to $BITRISE\_SOURCE\_DIR
description: |
Will find the APK or AAB files - `depending on the build type input` - with the given pattern.<br/>
Separate patterns with a newline.
**Note**<br/>
The step will export only the selected artifact type - `Android output artifact type` - even if the filter would accept other artifact types as well.
is_required: true
- android_bundle_output_pattern: "*build/app/outputs/bundle/*/*.aab"
opts:
category: Deprecated
title: "[DEPRECATED] App bundle output pattern"
summary: Pattern to find built AAB artifacts relative to `$BITRISE_SOURCE_DIR`. Deprecated, use `android_output_pattern` instead.
description: Pattern to find built AAB artifacts relative to `$BITRISE_SOURCE_DIR`
outputs:
- BITRISE_APK_PATH:
opts:
title: The created .apk file's path
- BITRISE_APK_PATH_LIST:
opts:
title: All created .apk file's path list
- BITRISE_APP_DIR_PATH:
opts:
title: The generated `.app` directory
- BITRISE_XCARCHIVE_PATH:
opts:
title: The generated `.xcarchive` directory
- BITRISE_XCARCHIVE_ZIP_PATH:
opts:
title: The generated `.xcarchive` directory compressed as a ZIP archive
- BITRISE_AAB_PATH_LIST:
opts:
title: List of the generated AAB file paths
summary: List of the generated (and copied) AAB file paths - after filtering.
description: |-
This output will include the paths of the generated AAB files,
after filtering based on the filter inputs.
The paths are separated with `|` character, eg: `app.aab|app2.aab`
- BITRISE_AAB_PATH:
opts:
title: Path of the generated AAB
summary: Path of the generated (and copied) AAB file - after filtering.
description: |-
This output will include the path of the generated AAB file,
after filtering based on the filter inputs.
If the build generates more than one AAB file which fulfills the
filter inputs this output will contain the last one's path.