dotdoom / fastlane-plugin-flutter Goto Github PK
View Code? Open in Web Editor NEWFlutter actions plugin for Fastlane
License: MIT License
Flutter actions plugin for Fastlane
License: MIT License
I try to supply play store internal test, but it returns [!] No authentication parameters were specified. These must be provided in order to authenticate with Google
Work in android folder with another fastlane env, it works fine.
Any workaround?
Is this tested on iOS?
The args section breaks dart-define custom args.
Example:
flutter(args: ["build", "apk", "--dart-define=SOME_VAR=\"myvalue\""])
causes escaping of the equals sign which breaks the arguments.
Add feature build ipa for flutter 2.0.X
Hi,
I am getting this error message. seems like flutter is not installed. what did I miss in my setup?
[15:43:57]: No such file or directory - /home/runner/work/app_tracker/app_tracker/android/vendor/flutter/bin/flutter
Thanks
When capturing_stdout:true
is set and the flutter command fails, we also need to know what the stdout contained in order to understand the context of the issue.
unless wait_thread.value.success? || (ignore_error == true)
UI.shell_error!(<<-ERROR)
The following command has failed:
$ #{command}
[#{wait_thread.value}]
#{errors_thread.value}
Command output:
#[output]
ERROR
end
ignore_error
end
I could also imagine to configure this with a parameter.
This behaviour is a bit annoying when running command on the CI, and errors can not be reproduced locally.
If build success, but with --verbose
, it should be show the logs.
Currently not.
Nice project.
please add --flavor
& --target
for flutter build
Hello,
I'm trying to use flutter_flavorizr and build apk of the desired flavor.
Flutter command for flavor 'dev' be like: flutter build apk --flavor dev -t lib/main_dev.dart
So I tried in my FastFile in these ways:
flutter_build( build: "apk", build_args: ["--flavor dev", "-t lib/main_dev.dart"] )
or
build_args = []
args = "--flavor dev -t lib/main_dev.dart"
build_args << args
flutter_build( build: "apk", build_args: build_args )
But I received the error
flutter build apk --flavor\ dev -t\ lib/main_dev.dart
[pid 90368 exit 1]
Target file " lib/main_dev.dart" not found.
I also tried absolute path for the main_dev.dart file.
Someone could help me?
During flutter build ipa
, then xcarchive
success, but ipa
fail, nothing happened.
IMO, this is fail, so should be show the logs.
[13:07:48]: ---------------------------
[13:07:48]: --- Step: flutter_build ---
[13:07:48]: ---------------------------
[13:07:48]: Determined Flutter location as /Users/dev/flutter because 'flutter' executable in PATH is located there (current directory is /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app).
[13:07:48]: $ /Users/dev/flutter/bin/flutter build ipa --build-number 110235 --verbose --release --flavor dev --dart-define\=FLAVOR\=dev --no-tree-shake-icons --export-options-plist\=ios/Runner/ExportOptionsAdHoc.plist
[13:09:48]: FLUTTER_OUTPUT /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/build/ios/archive/Runner.xcarchive
2024-03-20T00:34:20.0550830Z [09:34:15]: ▸ �[35m[ ] Building release-testing IPA...�[0m
2024-03-20T00:34:20.0552500Z [09:34:15]: ▸ �[35m[ ] executing: /usr/bin/arch -arm64e xcrun xcodebuild -exportArchive -allowProvisioningDeviceRegistration -allowProvisioningUpdates -archivePath /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/build/ios/archive/Runner.xcarchive -exportPath /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/build/ios/ipa -exportOptionsPlist /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/ios/Runner/ExportOptionsAdHoc.plist�[0m
2024-03-20T00:34:20.0552630Z [09:34:15]: ▸ �[35m[+9292 ms] ** EXPORT FAILED **�[0m
2024-03-20T00:34:20.0552690Z [09:34:15]: ▸
2024-03-20T00:34:20.0552760Z [09:34:15]: ▸
2024-03-20T00:34:20.0553590Z [09:34:15]: ▸ �[35m 2024-03-20 09:34:05.693 xcodebuild[54492:1199369] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/83/z8071391421g7q0jzq89kplm0000gn/T/dev_2024-03-20_09-34-05.693.xcdistributionlogs".�[0m
2024-03-20T00:34:20.0553760Z [09:34:15]: ▸ �[35m error: exportArchive: ipatool failed�[0m
2024-03-20T00:34:20.0553820Z [09:34:15]: ▸
2024-03-20T00:34:20.0554070Z [09:34:15]: ▸ �[35m AppThinning.StubError(errorDescription: Optional("ipatool failed"))�[0m
2024-03-20T00:34:20.0554270Z [09:34:15]: ▸ �[35m[ ] Building release-testing IPA... (completed in 9.3s)�[0m
2024-03-20T00:34:20.0554410Z [09:34:15]: ▸ �[35m[ ] "flutter ipa" took 106,850ms.�[0m
2024-03-20T00:34:20.0554550Z [09:34:15]: ▸ �[35m[ +179 ms] ensureAnalyticsSent: 177ms�[0m
2024-03-20T00:34:20.0554680Z [09:34:15]: ▸ �[35m[ ] Running 1 shutdown hook�[0m
2024-03-20T00:34:20.0554810Z [09:34:15]: ▸ �[35m[ +1 ms] Shutdown hooks complete�[0m
2024-03-20T00:34:20.0554930Z [09:34:15]: ▸ �[35m[ ] exiting with code 0�[0m
Hi,
I tried running my flutter test
suite. with
flutter(args: %w(test))
and
flutter(args: %w(test ..))
But all of them failed with this strange error messages:
[14:53:59]: $ /home/runner/work/app_tracker/app_tracker/android/vendor/flutter/bin/flutter test .. --no-pub
[14:54:00]: ▸ Changing current working directory to: /home/runner/work/app_tracker/app_tracker
[14:54:15]: ▸ 00:11 +0 -1: loading /home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/platform_channel/test_driver/button_tap_test.dart [E]
[14:54:15]: ▸ Failed to load "/home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/platform_channel/test_driver/button_tap_test.dart": Compilation failed for testPath=/home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/platform_channel/test_driver/button_tap_test.dart
[14:54:15]: ▸ 00:12 +0 -1: loading /home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/platform_channel/test_driver/button_tap_test.dart [E]
[14:54:15]: ▸ Exception: the Dart compiler exited unexpectedly.
[14:54:15]: ▸ package:flutter_tools/src/base/common.dart 10:3 throwToolExit
[14:54:15]: ▸ package:flutter_tools/src/compile.dart 778:9 DefaultResidentCompiler._compile.<fn>
[14:54:15]: ▸ dart:async/zone.dart 1436:47 _rootRunUnary
[14:54:15]: ▸ dart:async/zone.dart 1335:19 _CustomZone.runUnary
[14:54:15]: ▸
[14:54:27]: ▸ 00:24 +0 -2: loading /home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/splash/test/splash_test.dart [E]
[14:54:27]: ▸ Failed to load "/home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/splash/test/splash_test.dart": Compilation failed for testPath=/home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/splash/test/splash_test.dart
[14:54:27]: ▸ 00:24 +0 -2: loading /home/runner/work/app_tracker/app_tracker/android/../android/vendor/flutter/examples/platform_channel/test_driver/button_tap_test.dart [E]
[14:54:27]: ▸ Exception: the Dart compiler exited unexpectedly.
[14:54:27]: ▸ package:flutter_tools/src/base/common.dart 10:3 throwToolExit
[14:54:27]: ▸ package:flutter_tools/src/compile.dart 778:9 DefaultResidentCompiler._compile.<fn>
[14:54:27]: ▸ dart:async/zone.dart 1436:47 _rootRunUnary
[14:54:27]: ▸ dart:async/zone.dart 1335:19 _CustomZone.runUnary
How can I run my tests?
Can I use flutter build ipa
?
https://flutter.dev/docs/deployment/ios#create-a-build-archive
Hi,
Thanks for this plugin. Very helpful!
I'm uploading my Fastfile
here cause i think it's a better real world example than the one included.
Also i think for ios
, the plugin could do the .ipa
file generation and store it in FLUTTER_OUTPUT
instead the .app
folder since ipa
is in upload_to_testflight
and upload_to_app_store
a required input.
+--------+--------------------------+------------------------------------------------------------------------------------+
| Available lanes to run |
+--------+--------------------------+------------------------------------------------------------------------------------+
| Number | Lane Name | Description |
+--------+--------------------------+------------------------------------------------------------------------------------+
| 1 | ios beta_staging | Deploy a new beta version to the Apple Store plugged on staging environment |
| 2 | ios beta | Deploy a new beta version to the Apple Store plugged on production environment |
| 3 | ios production | Deploy a new production version to the Apple Store |
| 4 | android test | Runs all the tests |
| 5 | android internal_staging | Deploy a new internal version to the Google Play plugged on staging environment |
| 6 | android internal | Deploy a new internal version to the Google Play plugged on production environment |
| 7 | android alpha_staging | Deploy a new alpha version to the Google Play plugged on staging environment |
| 8 | android alpha | Deploy a new alpha version to the Google Play plugged on production environment |
| 9 | android beta_staging | Deploy a new beta version to the Google Play plugged on staging environment |
| 10 | android beta | Deploy a new beta version to the Google Play plugged on production environment |
| 11 | android production | Deploy a new production version to the Google Play |
| 0 | cancel | No selection, exit fastlane! |
+--------+--------------------------+------------------------------------------------------------------------------------+
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
platform :ios do
desc "Deploy a new beta version to the Apple Store plugged on staging environment"
lane :beta_staging do
# flutter(args: %w(analyze))
flutter_build(build_args: ['--release','--target', 'lib/main_staging.dart'])
# Beginning .app to .ipa (which is basically a zip file with a Payload folder container .app folder)
sh("rm -Rf $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
sh("mkdir $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
# Move all the files
sh("mv #{lane_context[SharedValues::FLUTTER_OUTPUT]} $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload/")
# Zip it
sh("cd $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]}); zip -r Runner.ipa Payload")
# Clean behind yourself
sh("rm -Rf #{lane_context[SharedValues::FLUTTER_OUTPUT]} $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
# Redownload certs
match(type: "appstore", readonly: true)
# Upload
upload_to_testflight(ipa: sh("echo $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Runner.ipa").strip)
end
desc "Deploy a new beta version to the Apple Store plugged on production environment"
lane :beta do
# flutter(args: %w(analyze))
flutter_build(build_args: ['--release','--target', 'lib/main.dart'])
# Beginning .app to .ipa (which is basically a zip file with a Payload folder container .app folder)
sh("rm -Rf $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
sh("mkdir $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
# Move all the files
sh("mv #{lane_context[SharedValues::FLUTTER_OUTPUT]} $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload/")
# Zip it
sh("cd $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]}); zip -r Runner.ipa Payload")
# Clean behind yourself
sh("rm -Rf #{lane_context[SharedValues::FLUTTER_OUTPUT]} $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
# Redownload certs
match(type: "appstore", readonly: true)
# Upload
upload_to_testflight(ipa: sh("echo $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Runner.ipa").strip)
end
desc "Deploy a new production version to the Apple Store"
lane :production do
# flutter(args: %w(analyze))
flutter_build(build_args: ['--release','--target', 'lib/main.dart'])
# Beginning .app to .ipa (which is basically a zip file with a Payload folder container .app folder)
sh("rm -Rf $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
sh("mkdir $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
# Move all the files
sh("mv #{lane_context[SharedValues::FLUTTER_OUTPUT]} $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload/")
# Zip it
sh("cd $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]}); zip -r Runner.ipa Payload")
# Clean behind yourself
sh("rm -Rf #{lane_context[SharedValues::FLUTTER_OUTPUT]} $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Payload")
# Redownload certs
match(type: "appstore", readonly: true)
# Upload
upload_to_app_store(ipa: sh("echo $(dirname #{lane_context[SharedValues::FLUTTER_OUTPUT]})/Runner.ipa").strip)
end
end
platform :android do
desc "Runs all the tests"
lane :test do
gradle(task: "test")
end
desc "Deploy a new internal version to the Google Play plugged on staging environment"
lane :internal_staging do
flutter_build(build_args: ['--release','--shrink','--target', 'lib/main_staging.dart'])
upload_to_play_store(track: 'internal', version_code: lane_context[SharedValues::BUILD_NUMBER])
end
desc "Deploy a new internal version to the Google Play plugged on production environment"
lane :internal do
flutter_build(build_args: ['--release','--shrink','--target', 'lib/main.dart'])
upload_to_play_store(track: 'internal', version_code: lane_context[SharedValues::BUILD_NUMBER])
end
desc "Deploy a new alpha version to the Google Play plugged on staging environment"
lane :alpha_staging do
flutter_build(build_args: ['--release','--shrink','--target', 'lib/main_staging.dart'])
upload_to_play_store(track: 'alpha', version_code: lane_context[SharedValues::BUILD_NUMBER])
end
desc "Deploy a new alpha version to the Google Play plugged on production environment"
lane :alpha do
flutter_build(build_args: ['--release','--shrink','--target', 'lib/main.dart'])
upload_to_play_store(track: 'alpha', version_code: lane_context[SharedValues::BUILD_NUMBER])
end
desc "Deploy a new beta version to the Google Play plugged on staging environment"
lane :beta_staging do
flutter_build(build_args: ['--release','--shrink','--target', 'lib/main_staging.dart'])
upload_to_play_store(track: 'beta', version_code: lane_context[SharedValues::BUILD_NUMBER])
end
desc "Deploy a new beta version to the Google Play plugged on production environment"
lane :beta do
flutter_build(build_args: ['--release','--shrink','--target', 'lib/main.dart'])
upload_to_play_store(track: 'beta', version_code: lane_context[SharedValues::BUILD_NUMBER])
end
desc "Deploy a new production version to the Google Play"
lane :production do
flutter_build(build_args: ['--release','--shrink','--target', 'lib/main.dart'])
upload_to_play_store
end
end
Regards
Potentially a breaking change.
.arb
, .dart
from language-specific .arb
, reformat, verifyMake VCS version extractor a separate plugin (it actually does not depend on Flutter).
Another unrelated idea is to create Firebase plugin (install NPM, deploy Bolt, functions, test, lint etc).
Hi,
Is --split-per-abi supported ?
Also i see some references to appbundle
in code but i'm not sure how to use it ? need more documentation probably.
Thanks a lot !
Regards
When calling the above method, the plugin will produce the following output: Cannot parse built file path from "flutter build"
which could be confusing to users, since no build product is expected.
Maybe the code in flutter_build_action.rb:62
needs to be adjusted to check for the specific build argument --config-only
Hi,
Is there a way to select the Flutter Version which is used to build the Project?
In the flutter_bootstrap
method is only a flutter_channel
parameter available.
flutter_bootstrap(
flutter_channel: 'stable',
)
I would like to have something like in the Flutter-GithubAction.
It could look like this:
flutter_bootstrap(
flutter_channel: 'any',
flutter_version: '1.20.2'
)
Thanks in advance.
normally
sh "flutter format --set-exit-if-changed
fails, but flutter(args: %W(format . --set-exit-if-changed)) doesn't.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.