Update the recipe to set up the template

This commit is contained in:
Benoit Marty
2023-10-02 14:19:17 +02:00
parent cb81c2a633
commit 2921ab1bd4
2 changed files with 29 additions and 3 deletions

View File

@@ -276,11 +276,12 @@ Follow these steps to install and configure the plugin and templates:
1. Install the AS plugin for generating modules :
[Generate Module from Template](https://plugins.jetbrains.com/plugin/13586-generate-module-from-template)
2. Import file templates in AS :
2. Run the script `tools/templates/generate_templates.sh` to generate the template zip file
3. Import file templates in AS :
- Navigate to File/Manage IDE Settings/Import Settings
- Pick the `tools/templates/file_templates.zip` files
- Pick the `tmp/file_templates.zip` files
- Click on OK
3. Configure generate-module-from-template plugin :
4. Configure generate-module-from-template plugin :
- Navigate to AS/Settings/Tools/Module Template Settings
- Click on + / Import From File
- Pick the `tools/templates/FeatureModule.json`

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# Copyright 2023 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
echo "Zipping the contents of the 'files' directory..."
rm -f ./tmp/file_templates.zip
pushd ./tools/templates/files
zip -r ../../../tmp/file_templates.zip .
popd