Skip to content

Update 28 #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
7d49347
feat(update_28): fixed sonar config excludes
fedorenkoalex Jun 14, 2024
1a3cad6
feat(sonar): fixed sonar doc
fedorenkoalex Jul 3, 2024
f92068f
feat(documentation): added documentation
fedorenkoalex Jul 3, 2024
637265c
feat(documentation): updated issue templates
fedorenkoalex Jul 3, 2024
903adc7
feat(documentation): updated issue templates
fedorenkoalex Jul 3, 2024
afffc10
feat(generator): fix data component generator
fedorenkoalex Jul 3, 2024
195189a
feat(swagger_refactor): refactoring swagger parsing
fedorenkoalex Jul 11, 2024
bbfb9ef
feat(swagger_refactor): refactoring swagger parsing
fedorenkoalex Jul 11, 2024
7b6d880
fix(Swagger): Updated swagger type extension logic
Onix-Ivan Jul 15, 2024
ec53900
feat(swagger_refactor): fixed swagger v3 generation
fedorenkoalex Jul 16, 2024
4f45610
feat(swagger_refactor): fixed swagger v3 generation
fedorenkoalex Jul 16, 2024
2fffd00
feat(swagger_refactor): refactor swagger parsing by versions
fedorenkoalex Jul 17, 2024
b7491da
feat(swagger_refactor): refactor swagger parsing by versions
fedorenkoalex Jul 17, 2024
eee8075
feat(swagger_refactor): refactor swagger parsing by versions
fedorenkoalex Jul 17, 2024
ccada99
feat(swagger_refactor): fixed v3 version parsing on some Swagger vers…
fedorenkoalex Jul 17, 2024
f08deeb
feat(swagger_refactor): moved flavor files
fedorenkoalex Jul 17, 2024
e6b9dfd
feat(swagger_refactor): moved flavor files
fedorenkoalex Jul 17, 2024
2fb37bf
feat(swagger_refactor): moved flavor files
fedorenkoalex Jul 17, 2024
a4e7802
feat(swagger_refactor): moved flavor files
fedorenkoalex Jul 18, 2024
fb666ba
feat(swagger_refactor): moved flavor files
fedorenkoalex Jul 18, 2024
f68993f
feat(changelog): added change log script
fedorenkoalex Jul 22, 2024
f3af66b
feat(changelog): added change log script
fedorenkoalex Jul 22, 2024
a4f3259
feat(changelog): added change log script
fedorenkoalex Jul 22, 2024
92b84f3
feat(changelog): added change log script
fedorenkoalex Jul 22, 2024
04c58e8
feat(Fastlane): Added git cliff support and integrated slack into fas…
Onix-Ivan Jul 23, 2024
43d1bef
Merge branch 'feat/update_28' of github.com:Onix-Systems/onix-flutter…
Onix-Ivan Jul 23, 2024
b0909bd
feat(Pubspec): Downgraded intl to 0.18.1. Added foundation import
Onix-Ivan Jul 23, 2024
1bbfb68
fix(Pubspec): Added forward slash
Onix-Ivan Jul 23, 2024
8a84592
feat(Project): Added project name validator
Onix-Ivan Jul 24, 2024
f132ddd
feat(Project Name): Added tooltip and fixed project name screen bloc …
Onix-Ivan Jul 24, 2024
17e43d3
feat(Makefile): Updated makefile logic
Onix-Ivan Jul 24, 2024
67fbeb8
feat(Makefile): Updated makefile utils logic
Onix-Ivan Jul 24, 2024
f631ae3
feat(Fastlane): Replaced .env_name with env.name
Onix-Ivan Jul 24, 2024
6b1a436
feat(Fastlane): Updated Fastfile
Onix-Ivan Jul 24, 2024
2afeee6
feat(Fastlane): Updated makefile generator
Onix-Ivan Jul 24, 2024
46ad2fe
feat(Fastlane): Updated fastlane documentation
Onix-Ivan Jul 25, 2024
29ae4f3
feat(Fastlane): updated fastlane documentation
Onix-Ivan Jul 25, 2024
aff9cc7
feat(Project Name): Added validation rules and tooltip for the projec…
Onix-Ivan Jul 25, 2024
c102085
feat(Tests): Updated dio_request_processor unit tests
Onix-Ivan Jul 25, 2024
f986239
feat(DataResponse): Updated hooks data_response class
Onix-Ivan Jul 25, 2024
d3e2155
feat(Briks): Updated briks files and updated dio_request_processor_im…
Onix-Ivan Jul 25, 2024
ef610c4
feat(Utils): Updated map_common_server_error
Onix-Ivan Jul 25, 2024
d7e194a
feat(Bricks): added CanceledRequestFailure class and import
Onix-Ivan Jul 25, 2024
5e65760
fix(Briks): Moved CanceledRequestFailure from common to entity and up…
Onix-Ivan Jul 25, 2024
091ba11
feat(Bricks): Increased briks environment dart sdk constraints
Onix-Ivan Jul 25, 2024
433c673
fix(Post Gen): Moved connectivity_plus dependency to the end
Onix-Ivan Jul 26, 2024
61aef54
feat(Post Gen): Locked connectivity service dependency version
Onix-Ivan Jul 26, 2024
27759fe
feat(Bricks): Added _test suffix to the dio_request_processor_impl file
Onix-Ivan Jul 26, 2024
c0a1270
fix(Bricks): Fixed incorrect imports
Onix-Ivan Jul 26, 2024
23172c0
fix(Bricks): Fixed mockito import
Onix-Ivan Jul 26, 2024
1a9fb69
feat(Bricks): Updated DioRequestProcessorImpl and DioErrorProcessor
Onix-Ivan Jul 26, 2024
72cea0b
feat(Component Generator Service): Added ReservedWordProcessor
Onix-Ivan Jul 26, 2024
e0db160
feat(DataComponent): Fixed bugs in the DataObjectComponent generator
Onix-Ivan Jul 29, 2024
46adcf9
feat(UI): Updated Scrollbar behaviour
Onix-Ivan Jul 30, 2024
117f6ba
feat(Swagger): Added endpoint description parser logic
Coloud1 Jul 30, 2024
d0675f1
feat(Pubspec): Downgraded version of intl dependency
Coloud1 Aug 1, 2024
6cb2bca
feat(Makefile): Added Makefile
Coloud1 Aug 1, 2024
a08e0b8
Merge pull request #83 from Onix-Systems/feat/update_28
Coloud1 Aug 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.19.6"
}
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: 'bug'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: 'enhancement'
assignees: ''

---
Expand Down
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Question about Onix Project Generator
about: I have a question about Onix Project Generator
title: 'Question about Onix Project Generator'
labels: 'question'
assignees: ''

---

**What is your question?.**
A clear and concise description of what the question related to [...]

**Additional context**
Add any other context or screenshots about the feature request here.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ migrate_working_dir/
.pub/
/build/


# Symbolication related
app.*.symbols

Expand All @@ -47,4 +46,7 @@ app.*.map.json
# generator config
.gen_config.json
/release/
/.fvm/
/.fvm/

# FVM Version Cache
.fvm/
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

build:
@flutter clean
@flutter build macos --release
@mkdir release
@appdmg installers/dmg_creator/config.json release/Onix_Flutter_Project_Generator.dmg
117 changes: 84 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,101 @@
<p align="center">
<a><img src="https://i.ibb.co/crD6N4B/icon.png" alt="icon" border="0" width="300" height="300"/></a>
</p>
<div align="center">
<a href="https://onix-systems.com/">
<img alt="refine logo" src="images/banner_top.jpg">
</a>

# Onix Flutter Project Generator
<br/>
<br/>

Flutter Project Generator is a tool for creating a new project with built-in Clean Architecture and boilerplate components for a quick start.
<div align="center">
<a href="https://onix-systems.com/">About Us</a> |
<a href="docs/INSTALL_INSTRUCTION.md">Installation</a> |
<a href="docs/HOW_TO.md">How To</a> |
<a href="docs/CONTRIBUTE.md">Contribute</a> |
<a href="https://github.com/Onix-Systems/onix-flutter-project-generator/issues">Report an issue</a>
</div>
</div>

Checkout the video instruction for more details and to quick start:
<br/>
<br/>

[![Onix Project Generator](https://i.imgur.com/kHsmEvr.png)](https://www.youtube.com/watch?v=lgey4r3osJI)
<div align="center"><strong>Create your new Flutter project just in a few clicks.</strong><br>Flutter project generator is as an open source utility for MacOS designed to provide a quick start with your Flutter application development.<br />
<br/>
</div>
<div align="center">
<a href="https://onix-systems.com/">
<img alt="refine logo" src="images/banner_main.png">
</a>
</div>
<br/>
<br/>

## Main features:
## What is Project Generator?

* Creating a new project based on Clean Architecture with predefined frameworks and libraries, a name, BundleId, and other options;
* Ability to configure, enable or disable components;
* Ability to add screen stubs with a generated BLoC for the screen;
* Ability to configure the data layer using Swagger URLs;
* Ability to edit some settings of a previously created project
**Flutter Project Generator** is a utility for **MacOS** designed to quickly start a Flutter project from scratch.

## Generated project tech stack
**Flutter Project Generator** creates an empty project on **Clean Architecture** with already defined file structure and dependencies.

* Clean Architecture
* BLoC
* Dio/GraphQL
* GetIt
* Freezed
* ScreenUtil
* Navigation 2.0 (GoRouter/AutoRoute)
* Flavorizer
* Intl
* ThemeTailor (Optional)
You have an opportunity to modify the project creation settings and options, including **name and ID, navigation component, flavors, theming, pre-built screens, data components and more**.

## ⚡ Try Project Generator

## Release
Let's start with installing the application.

Check out the [Releases](https://github.com/Onix-Systems/onix-flutter-project-generator/releases) section to download latest version;
Go to [installing section](docs/INSTALL_INSTRUCTION.md) to download and install the latest version of the application.

## Bug reporting
Once the app has installed go to the [How To](docs/HOW_TO.md) sections to get detailed instructions about creating a new project.

Found a bug?
Please [report it](https://github.com/Onix-Systems/onix-flutter-project-generator/issues).
## Use cases


Onix Project Generator shines on **creating Flutter projects on Clean Architecture with a techstack of commonly used and most popular Flutter libraries and packages**.

[![Made in Ukraine](https://img.shields.io/badge/made_in-Ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)
Generated project tech consist of such libraries and packages:

<p align="center">
<a href="https://ibb.co/Jq7C042"><img src="https://i.ibb.co/C67WNZv/logo-white.png" alt="logo-white" border="0"></a>
</p>

* **State Management** - [BLoC](https://pub.dev/packages/flutter_bloc).
* **Networking** - [Dio](https://pub.dev/packages/dio).
* **Service Locator** - [GetIt](https://pub.dev/packages/get_it)
* **UI** - [ScreenUtil](https://pub.dev/packages/flutter_screenutil)
* **Code generator** - [Freezed](https://pub.dev/packages/freezed)
* **Navigation** - [GoRouter](https://pub.dev/packages/go_router) or [AutoRoute](https://pub.dev/packages/auto_route)

Also there an option to select **optional packages to include** to the project:

* **Networking** - [GraphQL](https://pub.dev/packages/graphql)
* **Services** - [Firebase](https://firebase.flutter.dev/)
* **Flavors** - [Flavorizr](https://pub.dev/packages/flutter_flavorizr)
* **Localization** - [Intl](https://pub.dev/packages/intl_utils)
* **Theming** - [ThemeTailor](https://pub.dev/packages/theme_tailor)


## Key Features

The key features of the Onix Project Generator are:

* **MacOS application** designed to **run on Intel on M** machines.
* To **create a new project based on Clean Architecture** with chosen name, ID and options.
* To **select a platforms** project will be built for.
* To **add an application flavors** with [Flavorizr](https://pub.dev/packages/flutter_flavorizr).
* **Choose your favorite Navigator** to use in the project ([GoRouter](https://pub.dev/packages/go_router) or [AutoRoute](https://pub.dev/packages/auto_route)
).
* To **configure optional components** to include to the project.
* To **add screen mocks** with screen BLoC, navigation and GetIt declarations included.
* To **configure data layer** from Swagger URL.
* To **configure the application theme** from Figma file.
* To **create Android signing** configuration automatically or manually.
* To **add Sonar configurations and scripts**.
* Generates **starter documentation** for the project.
* Generates **Fastlane configurations** and make files to run Fastlane commands.
* Automatically check for updates.


## Contribution

[Refer to the contribution docs for more information](docs/CONTRIBUTE.md).

If you have any doubts related to the project or want to discuss something, then post a question on [GitHub](https://github.com/Onix-Systems/onix-flutter-project-generator/issues/new?assignees=&labels=question&projects=&template=question.md&title=Question%20about%20Onix%20Project%20Generator).

## License

Licensed under the MIT License, Copyright (c) 2023-present Onix-Systems
18 changes: 17 additions & 1 deletion assets/documentation/docs/INSTALL_INSTRUCTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,24 @@ To fix that run following command in IDE terminal:

`cd ios && pod cache clean --all && pod repo update && pod update && cd .. && flutter clean && flutter pub get`

## Automatic posting of release notes to slack after build through fastlane

In order for fastlane to send release notes to slack channel you need:

1. Install the `git cliff` generator [following this link](https://git-cliff.org/docs/)
2. Make sure that the `cliff_txt.toml` and `cliff_md.toml` files are created in the project root and configured correctly
3. Make sure the git repository is initialized in the project, you have at least one commit and a git tag with the release version is set on the last commit
4. Go to the ios or android fastlane directory, then and add/update the key `SLACK_URL` with a incoming webhook URL to each `.env_{flavor_name)` file
5. Optionally. In `fastlane_config.yaml` you can specify additional settings for slack

Now you can build and deploy builds through fastlane with message notification and release notes to the slack channel

## Manual creation of release notes and changelogs

You can also generate release notes and changelog without using fastlane. To do this you need to:

1. Install the `git cliff` generator [following this link](https://git-cliff.org/docs/)
2. Make sure that the `cliff_txt.toml` and `cliff_md.toml` files are created in the project root and configured correctly
3. Make sure the git repository is initialized in the project, you have at least one commit and a git tag with the release version is set on the last commit
4. To generate release notes, call the `make release_notes` command in the terminal
5. To generate a CHANGELOG, call the `make changelog` command in the terminal
62 changes: 48 additions & 14 deletions assets/fastlane/android/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,25 @@ default_platform(:android)
platform :android do
desc "Build android app"
lane :build do |options|
flavor = options[:flavor]
firebase = options[:firebase]
store = options[:store]
artifact_type = options[:artifact_type]

load_fastlane_vars(flavor)
path = get_artifact_path(artifact_type, flavor)
#gradle(task: "clean assembleRelease")
upload_to_play_store_if_possible(store, path, artifact_type)
upload_to_firebase_if_possible(firebase, path, artifact_type)
begin
flavor = options[:flavor]
firebase = options[:firebase]
store = options[:store]
artifact_type = options[:artifact_type]
load_fastlane_vars(flavor)

if(artifact_type != 'apk' && artifact_type != 'aab')
UI.user_error!("You must specify artifact type when calling the fastlane build method. Valid value apk or aab")
end

path = get_artifact_path(artifact_type, flavor)
upload_to_play_store_if_possible(store, path, artifact_type)
upload_to_firebase_if_possible(firebase, path, artifact_type)
sendToSlack(true, '')
rescue => e
sendToSlack(false, e.message)
raise e
end
end

def load_fastlane_vars(flavor)
Expand All @@ -29,11 +38,8 @@ platform :android do
def get_artifact_path(artifact_type, flavor)
if artifact_type == "apk"
return "../build/app/outputs/flutter-apk/#{flavor.nil? ? 'app-release.apk' : "app-#{flavor}-release.apk"}"
elsif artifact_type == "aab"
return "../build/app/outputs/bundle/#{flavor.nil? ? 'release/app-release.aab' : "#{flavor}Release/app-#{flavor}-release.aab"}"
else
UI.user_error!("You must specify artifact type when calling the fastlane build method. Valid value apk or aab")
return
return "../build/app/outputs/bundle/#{flavor.nil? ? 'release/app-release.aab' : "#{flavor}Release/app-#{flavor}-release.aab"}"
end
end

Expand Down Expand Up @@ -122,4 +128,32 @@ platform :android do
UI.important "firebase_app_distribution was skipped because android artifact type is aab, and distribution is specified only for apk"
end
end

def sendToSlack(isSuccess, error)
status = isSuccess
message = error
slack_settings = $yaml_vars['slack']

if slack_settings == nil || ENV['SLACK_URL'] == nil
return
end

if !isSuccess && slack_settings['send_when_error'] != true
return
end

if isSuccess
sh("cd ../.. && git cliff --latest -c cliff_txt.toml -o changelog_tmp.txt")
message = File.read("../../changelog_tmp.txt")
sh("cd ../.. && rm -f changelog_tmp.txt")
end

slack(message: message,
success: status,
slack_url: ENV['SLACK_URL'],
username: slack_settings['username'],
pretext: slack_settings['pretext'],
icon_url: slack_settings['icon_url'],
)
end
end
51 changes: 42 additions & 9 deletions assets/fastlane/ios/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ default_platform(:ios)
platform :ios do
desc "Build iOS"
lane :build do |options|
flavor = options[:flavor]
firebase = options[:firebase]
test_flight = options[:test_flight]

load_fastlane_vars(flavor)
create_archive
upload_to_firebase_if_possible(firebase)
upload_to_test_flight_if_possible(test_flight)
begin
flavor = options[:flavor]
firebase = options[:firebase]
test_flight = options[:test_flight]
load_fastlane_vars(flavor)
create_archive
upload_to_firebase_if_possible(firebase)
upload_to_test_flight_if_possible(test_flight)
sendToSlack(true, '')
rescue => e
sendToSlack(false, e.message)
raise e
end
end

def load_fastlane_vars(flavor)
Expand Down Expand Up @@ -153,4 +158,32 @@ platform :ios do
groups: firebase_distribution['groups'],
)
end
end

def sendToSlack(isSuccess, error)
status = isSuccess
message = error
slack_settings = $yaml_vars['slack']

if slack_settings == nil || ENV['SLACK_URL'] == nil
return
end

if !isSuccess && slack_settings['send_when_error'] != true
return
end

if isSuccess
sh("cd ../.. && git cliff --latest -c cliff_txt.toml -o changelog_tmp.txt")
message = File.read("../../changelog_tmp.txt")
sh("cd ../.. && rm -f changelog_tmp.txt")
end

slack(message: message,
success: status,
slack_url: ENV['SLACK_URL'],
username: slack_settings['username'],
pretext: slack_settings['pretext'],
icon_url: slack_settings['icon_url'],
)
end
end
Loading