From 631cffc449f975b8d02cbcbeda6e75a2bd06a098 Mon Sep 17 00:00:00 2001 From: Jerome Lacoste Date: Mon, 23 May 2022 13:23:55 +0200 Subject: [PATCH] Document import_from_gem --- docs/advanced/Fastfile.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/advanced/Fastfile.md b/docs/advanced/Fastfile.md index 142d4b7cb5..8a60a61529 100644 --- a/docs/advanced/Fastfile.md +++ b/docs/advanced/Fastfile.md @@ -114,6 +114,25 @@ end This will also automatically import all the local actions from this repo. + +## `import_from_gem` + +Import from another ruby gem, which you can use to create a single package with common `Fastfile`s and actions for all your projects. + +```ruby +import_from_gem(gem_name: 'my_gem') +# or +import_from_gem(gem_name: 'my_gem', + paths: ['fastlane/Fastfile', 'fastlane/Fastfile_*']) + +lane :new_main_lane do + # ... +end +``` + +This will also automatically import all the local actions from this gem. + + ## Note You should import the other `Fastfile` on the top above your lane declarations. When defining a new lane _fastlane_ will make sure to not run into any name conflicts. If you want to overwrite an existing lane (from the imported one), use the `override_lane` keyword.