Skip to content

Commit 504ecad

Browse files
committed
resolve conflicts
1 parent 00a5ef1 commit 504ecad

File tree

282 files changed

+8726
-1487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+8726
-1487
lines changed

.fvm/fvm_config.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"flutterSdkVersion": "3.10.5",
3+
"flavors": {}
4+
}

.github/workflows/main.yml

+9-18
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
name: Build, Test and Analyze
22

3-
on: [ push, pull_request ]
3+
on: [push, pull_request]
44

55
jobs:
66
main:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v3
10-
- name: Install Protoc
11-
uses: arduino/setup-protoc@v2
12-
with:
13-
repo-token: ${{ secrets.GITHUB_TOKEN }}
1410
- uses: subosito/flutter-action@v2.10.0
1511
with:
16-
flutter-version: '3.10.5'
17-
channel: 'stable'
18-
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
19-
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
12+
flutter-version: "3.10.5"
13+
channel: "stable"
14+
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
15+
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
2016
architecture: x64 # optional, x64 or arm64
2117
- name: Setup
2218
run: |
23-
flutter pub get
24-
flutter pub run build_runner build --delete-conflicting-outputs
25-
dart pub global activate protoc_plugin
26-
chmod +x generate_protos.sh
27-
./generate_protos.sh
19+
make get
2820
- name: Static Analysis
29-
run: flutter analyze
21+
run: make lint
3022
- name: Unit Tests
31-
run: flutter test test/unit
23+
run: melos run test:unit
3224
- name: Widget Tests
33-
run: flutter test test/widget
25+
run: melos run test:widget
3426
- name: Build release package
3527
run: flutter build apk --release
3628
- name: Archive build artifacts
@@ -39,4 +31,3 @@ jobs:
3931
name: apk
4032
path: |
4133
build/app/outputs/flutter-apk/app-release.apk
42-

.gitignore

+18-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ migrate_working_dir/
3030
.pub/
3131
/build/
3232
coverage
33-
*.mocks.dart
34-
*.pb*.dart
35-
*.g.dart
36-
*.freezed.dart
33+
34+
# Commented out to push generated code:
35+
# *.mocks.dart
36+
# *.pb*.dart
37+
# *.g.dart
38+
# *.freezed.dart
3739

3840
# Web related
3941
lib/generated_plugin_registrant.dart
@@ -48,3 +50,15 @@ app.*.map.json
4850
/android/app/debug
4951
/android/app/profile
5052
/android/app/release
53+
54+
.fvm/flutter_sdk
55+
56+
# Melos
57+
pubspec_overrides.yaml
58+
59+
# Packages
60+
packages/*/pubspec.lock
61+
packages/*/build
62+
63+
packages/features/*/pubspec.lock
64+
packages/features/*/build

Makefile

+43-17
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,56 @@
1-
.PHONY: pubget build watch clean test analyze test-unit test-widget test-all all
1+
.PHONY: run pods-clean get clean build languages lint format test watch
22

3-
clean:
4-
flutter clean
3+
FLUTTER := fvm flutter
4+
DART := fvm dart
5+
6+
run:
7+
$(FLUTTER) run
8+
9+
pods-clean:
10+
rm -Rf ios/Pods ; \
11+
rm -Rf ios/.symlinks ; \
12+
rm -Rf ios/Flutter/Flutter.framework ; \
13+
rm -Rf ios/Flutter/Flutter.podspec ; \
14+
rm ios/Podfile ; \
15+
rm ios/Podfile.lock ; \
16+
17+
get:
18+
chmod +x ./setup_sdk.sh
19+
./setup_sdk.sh
20+
chmod +x ./setup_melos.sh
21+
./setup_melos.sh
22+
melos bootstrap
523

6-
pubget:
7-
flutter pub get
24+
clean:
25+
melos clean
826

927
build:
10-
dart run build_runner build --delete-conflicting-outputs
28+
melos run build:all
1129

12-
run:
13-
flutter run
30+
languages:
31+
@cd packages/l10n ; \
32+
$(FLUTTER) gen-l10n
33+
@echo "-> Generated l10n"
1434

15-
all: clean pubget build run
35+
lint:
36+
$(FLUTTER) analyze
37+
melos run lint:all
1638

17-
watch:
18-
dart run build_runner watch --delete-conflicting-outputs
39+
format:
40+
$(DART) format --set-exit-if-changed .
1941

20-
analyze:
21-
flutter analyze
42+
test:
43+
melos run test:all
2244

2345
test-unit:
24-
flutter test test/unit
46+
melos run test:unit
2547

2648
test-widget:
27-
flutter test test/widget
49+
melos run test:widget
50+
51+
watch:
52+
$(DART) run build_runner watch --delete-conflicting-outputs
2853

29-
test-all:
30-
flutter test
54+
melos:
55+
$(DART) pub global activate melos
56+

README.md

+58-50
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,80 @@
1-
Paintroid
2-
=========
1+
# Paintroid
32

4-
Paintroid, also known as **Pocket Paint**, is associated
5-
to [Catroid](https://github.com/Catrobat/Catroid). It is a graphical paint editor application for
6-
the Android platform that, among others, allows setting parts of pictures to transparent.
3+
Paintroid, also known as **Pocket Paint**, is associated to [Catroid](https://github.com/Catrobat/Catroid). It is a graphical paint editor application for the Android platform that, among others, allows setting parts of pictures to transparent.
74

8-
Since Pocket Paint is now available in **Google Play store** you can also download Paintroid (Pocket
9-
Paint) from [here](https://play.google.com/store/apps/details?id=org.catrobat.paintroid).
10-
Alternatively, you can find it on **
11-
F-Droid** [here](https://f-droid.org/packages/org.catrobat.paintroid/).
5+
Since Pocket Paint is now available in **Google Play store** you can also download Paintroid (Pocket Paint) from [here](https://play.google.com/store/apps/details?id=org.catrobat.paintroid). Alternatively, you can find it on **F-Droid** [here](https://f-droid.org/packages/org.catrobat.paintroid/).
126

13-
For more information oriented towards developers please visit
14-
our [developers page](http://developer.catrobat.org/).
7+
For more information oriented towards developers please visit our [developers page](http://developer.catrobat.org/).
158

169
> **Note** This repository is the Flutter version of [Paintroid](https://github.com/Catrobat/Paintroid)
1710
1811
## Getting Started
1912

20-
1. Install [Flutter](https://docs.flutter.dev/get-started/install)
21-
- check the currently used version in file ".github/workflows/main.yml"
22-
2. Set up the [Protocol Buffer](https://grpc.io/docs/languages/dart/quickstart/) compiler
23-
- `protoc` for Dart
24-
4. Get dependencies - `flutter pub get`
25-
5. Build supporting files - `./generate_files.sh`
26-
6. Build protobuf files - `./generate_protos.sh`
27-
7. Run app - `flutter run lib/main.dart`
13+
1. Install [Flutter](https://docs.flutter.dev/get-started/install):
14+
- Currently used version specified in _.github/workflows/main.yml_
15+
- **Recommended**: Use [fvm](https://fvm.app/) for managing Flutter versions
16+
2. Get dependencies: `make get`
17+
3. Run app: `make run`
18+
19+
> In case `make` does not work for you, `melos` can be used for most of the commands. Check them out in _Makefile_ or in _melos.yaml_.
20+
21+
What `make get` does:
22+
23+
- Runs `./setup-sdk.sh`, if _fvm_ is not installed:
24+
- changes "FLUTTER" (= `fvm flutter`) to `flutter` in _Makefile_
25+
- changes "DART" (= `fvm dart`) to `dart` in _Makefile_ if _fvm_
26+
- changes "sdkPath" (= `.fvm/flutter_sdk`) to `auto` in _melos.yaml_
27+
- Runs `./setup-melos.sh`: activates _melos_ if not activated.
28+
29+
## Building generated files
30+
31+
- For **protoc**:
32+
- Set up the [Protocol Buffer](https://grpc.io/docs/languages/dart/quickstart/) compiler
33+
- Run `./generate_protos.sh`
34+
- For **build-runner**: run `make build`
35+
- For **localizations**: run `make languages`
2836

2937
## Tests
3038

31-
1. For unit tests, run `flutter test` at the project root
32-
2. For integration tests -
33-
- Make sure you have an iOS/Android device online by running `flutter devices`
34-
- Run `flutter test integration_test -d <DEVICE-ID>`
35-
> **Note** Replace `<Device-ID>` with the ID of the device from previous command
39+
- Run tests for **all** packages:
40+
- all: `make test`
41+
- unit: `make test-unit`
42+
- widget: `make test-widget`
43+
- Run tests for a **specific** package:
44+
- all: `melos test`
45+
- unit: `melos test-unit`
46+
- widget: `melos test-widget`
47+
48+
**For integration tests:**
49+
50+
1. Make sure you have an iOS/Android device online by running `flutter devices`
51+
2. `cd` into the package where the test is located
52+
3. Run `flutter test <path-to-integartion-test> -d <DEVICE-ID>`
53+
- Replace `<Device-ID>` with the ID of the device from `flutter devices`
54+
- Replace `<path-to-integartion-test>` with the actual path to the test (_test/..._)
3655

37-
# Issues #
56+
## Issues
3857

39-
**Please report all bugs on
40-
our [Jira Bugtracker](https://jira.catrob.at/secure/CreateIssue.jspa?pid=10401&issuetype=1)**
58+
**Please report all bugs on our [Jira Bugtracker](https://jira.catrob.at/secure/CreateIssue.jspa?pid=10401&issuetype=1)**
4159

42-
# Contributing #
60+
## Contributing
4361

44-
If you want to contribute we suggest that you start
45-
with [forking](https://help.github.com/articles/fork-a-repo/) our repository and browse the code.
46-
Then you can look at our [Issue-Tracker](https://jira.catrob.at/secure/RapidBoard.jspa?rapidView=60)
47-
and start with fixing one ticket. We strictly
48-
use [Test-Driven Development](http://c2.com/cgi/wiki?TestDrivenDevelopment)
49-
and [Clean Code](http://www.planetgeek.ch/wp-content/uploads/2013/06/Clean-Code-V2.2.pdf), so first
50-
read everything you can about these development methods. Code developed in a different style will
51-
not be accepted. After you've created a pull request we will review your code and do a full testrun
52-
on your branch.
62+
If you want to contribute we suggest that you start with [forking](https://help.github.com/articles/fork-a-repo/) our repository and browse the code. Then you can look at our [Issue-Tracker](https://jira.catrob.at/secure/RapidBoard.jspa?rapidView=60) and start with fixing one ticket. We strictly use [Test-Driven Development](http://c2.com/cgi/wiki?TestDrivenDevelopment) and [Clean Code](http://www.planetgeek.ch/wp-content/uploads/2013/06/Clean-Code-V2.2.pdf), so first read everything you can about these development methods. Code developed in a different style will not be accepted. After you've created a pull request we will review your code and do a full testrun on your branch.
5363

54-
If you want to implement a new feature, please ask about the details in JIRA or our IRC channel (
55-
#catrobat or #catrobatdev) first.
64+
If you want to implement a new feature, please ask about the details in JIRA or our IRC channel (#catrobat or #catrobatdev) first.
5665

57-
Let's start to set up the working environment using the instructions in
58-
our [Wiki](https://github.com/Catrobat/Catroid/wiki/Setup-working-environment)!
66+
Let's start to set up the working environment using the instructions in our [Wiki](https://github.com/Catrobat/Catroid/wiki/Setup-working-environment)!
5967

60-
# Resources and links #
68+
## Resources and links
6169

62-
* [Google Play Store Download](https://play.google.com/store/apps/details?id=org.catrobat.paintroid)
63-
* [F-Droid Download](https://f-droid.org/packages/org.catrobat.paintroid/)
64-
* [Frequently Asked Questions](https://github.com/Catrobat/Catroid/wiki/Frequently-Asked-Questions)
65-
* [Credits](http://developer.catrobat.org/credits)
66-
* [Statistics on OpenHub](https://www.openhub.net/p/catrobat/)
67-
* [Twitter](http://twitter.com/Catroid)
68-
* [Our Google group](https://groups.google.com/forum/?fromgroups#!forum/catrobat)
70+
- [Google Play Store Download](https://play.google.com/store/apps/details?id=org.catrobat.paintroid)
71+
- [F-Droid Download](https://f-droid.org/packages/org.catrobat.paintroid/)
72+
- [Frequently Asked Questions](https://github.com/Catrobat/Catroid/wiki/Frequently-Asked-Questions)
73+
- [Credits](http://developer.catrobat.org/credits)
74+
- [Statistics on OpenHub](https://www.openhub.net/p/catrobat/)
75+
- [Twitter](http://twitter.com/Catroid)
76+
- [Our Google group](https://groups.google.com/forum/?fromgroups#!forum/catrobat)
6977

70-
# License #
78+
## License
7179

7280
[License](http://developer.catrobat.org/licenses) of our project (mainly AGPL v3).

analysis_options.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ linter:
99
constant_identifier_names: false
1010

1111
analyzer:
12-
1312
errors:
1413
missing_enum_constant_in_switch: error
1514
exhaustive_cases: error
@@ -20,5 +19,5 @@ analyzer:
2019
unused_import: error
2120

2221
exclude:
23-
- lib/**.pb*.dart
24-
- lib/data/*.g.dart
22+
- lib/src/**.pb*.dart
23+
- lib/src/data/*.g.dart

generate_files.sh

-1
This file was deleted.

generate_protos.sh

-3
This file was deleted.

ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
platform :ios, '9.0'
2+
platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

0 commit comments

Comments
 (0)