Skip to content

Commit e6430aa

Browse files
Merge branch 'development' into development
2 parents b92b0c3 + f401ac4 commit e6430aa

File tree

630 files changed

+16404
-14842
lines changed

Some content is hidden

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

630 files changed

+16404
-14842
lines changed

.devcontainer/Dockerfile

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
ARG BASE_TAG=bookworm
2+
FROM mcr.microsoft.com/vscode/devcontainers/base:dev-${BASE_TAG}
3+
4+
# Install prerequisites for Flutter and Android development
5+
RUN apt-get update -qq \
6+
&& apt-get -yqq upgrade \
7+
&& apt-get install -yqq \
8+
clang \
9+
cmake \
10+
lib32z1 \
11+
libbz2-1.0:amd64 \
12+
libc6:amd64 \
13+
libglu1-mesa \
14+
libgtk-3-dev \
15+
libstdc++6:amd64 \
16+
ninja-build \
17+
openjdk-17-jdk-headless \
18+
pkg-config \
19+
usbutils
20+
21+
# Install latest stable Flutter SDK
22+
ARG FLUTTER_CHANNEL=stable
23+
24+
ENV PATH="$PATH:/opt/flutter/bin"
25+
RUN export FLUTTER_RELEASES_URL=https://storage.googleapis.com/flutter_infra_release/releases \
26+
&& curl -sS "${FLUTTER_RELEASES_URL}/releases_linux.json" \
27+
| jq -r ". as \$r | \$r.releases[] | select(.hash == \$r.current_release.stable) | (\"${FLUTTER_RELEASES_URL}/\" + .archive)" \
28+
| xargs -I {} curl -sS {} \
29+
| tar -xJC /opt
30+
31+
32+
USER vscode
33+
34+
# Install Android SDK
35+
ARG ANDROID_CMDLINE_TOOLS_VERSION=12266719
36+
ARG ANDROID_PLATFORM_VERSION=35
37+
ARG ANDROID_BUILD_TOOLS_VERSION=35.0.0
38+
39+
ENV PATH="$PATH:/home/vscode/Android/Sdk/cmdline-tools/latest/bin:/home/vscode/Android/Sdk/platform-tools"
40+
RUN curl -sS "https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_CMDLINE_TOOLS_VERSION}_latest.zip" \
41+
-o /tmp/cmdline-tools.zip \
42+
&& mkdir -p ~/Android/Sdk/cmdline-tools \
43+
&& unzip -q /tmp/cmdline-tools.zip -d ~/Android/Sdk/cmdline-tools \
44+
&& mv ~/Android/Sdk/cmdline-tools/cmdline-tools ~/Android/Sdk/cmdline-tools/latest \
45+
&& rm /tmp/cmdline-tools.zip
46+
47+
# Install required Android SDK components
48+
RUN yes | sdkmanager --licenses \
49+
&& sdkmanager \
50+
"platforms;android-${ANDROID_PLATFORM_VERSION}" \
51+
"build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
52+
"platform-tools"
53+
54+
RUN echo 'alias ll="ls -alF"' >> ~/.bashrc \
55+
&& flutter config --no-analytics \
56+
&& flutter precache

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"image": "ghcr.io/fossasia/badgemagic-app/flutter-devcontainer:latest",
3+
// Or build locally
4+
// "build": {
5+
// "dockerfile": "Dockerfile"
6+
// },
7+
"runArgs": [
8+
"--add-host",
9+
"host.docker.internal:host-gateway",
10+
"--device-cgroup-rule",
11+
"c 189:* rmw"
12+
],
13+
"mounts": [
14+
{
15+
"source": "/dev/bus/usb",
16+
"target": "/dev/bus/usb",
17+
"type": "bind"
18+
}
19+
],
20+
"postAttachCommand": [
21+
"bash",
22+
"-c",
23+
"sudo chmod 0666 /dev/bus/usb/*/* && flutter pub get"
24+
],
25+
"customizations": {
26+
"vscode": {
27+
"extensions": [
28+
"Dart-Code.dart-code",
29+
"Dart-Code.flutter"
30+
]
31+
}
32+
}
33+
}

.github/ISSUE_TEMPLATE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
**Actual Behaviour**
2+
3+
<!-- Please state here what is currently happening. -->
4+
5+
**Expected Behaviour**
6+
7+
<!-- State here what the feature should enable the user to do. -->
8+
9+
**Steps to reproduce it**
10+
11+
<!-- Add steps to reproduce bugs or add information on the place where the feature should be implemented. Add links to a sample deployment or code. -->
12+
13+
**LogCat for the issue**
14+
15+
<!-- Provide logs for the crash here -->
16+
17+
**Screenshots of the issue**
18+
19+
<!-- Where-ever possible add a screenshot of the issue. -->

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/chore.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Fixes #<!-- Add issue number here. This will automatically closes the issue. If you do not solve the issue entirely, please change the message to e.g. "First steps for issues #IssueNumber" -->
2+
3+
## Changes
4+
- <!-- Add here what changes were made in this pull request and if possible provide links. -->
5+
6+
## Screenshots / Recordings
7+
<!-- Add screen shots/screen recordings of the layout where you made changes or a `*.gif` containing a demonstration. Fill "> N/A" if the change is not a UI fix. -->
8+
9+
**Checklist**: <!-- Please tick following check boxes with `[x]` if the respective task is completed -->
10+
- [ ] **No hard coding**: I have used resources from `constants.dart` without hard coding any value.
11+
- [ ] **No end of file edits**: No modifications done at end of resource files.
12+
- [ ] **Code reformatting**: I have reformatted code and fixed indentation in every file included in this pull request.
13+
- [ ] **Code analyzation**: My code passes analyzations run in _flutter analyze_ and tests run in _flutter test_.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/actions/android/action.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "Android Workflow"
2+
3+
inputs:
4+
STORE_PASS:
5+
description: 'Store Password'
6+
required: false
7+
default: ''
8+
ALIAS:
9+
description: 'Certificate Alias'
10+
required: false
11+
default: ''
12+
KEY_PASS:
13+
description: 'Key Password'
14+
required: false
15+
default: ''
16+
VERSION_NAME:
17+
description: 'Version Name to be used for build'
18+
required: false
19+
default: '1.0.0'
20+
VERSION_CODE:
21+
description: 'Version Code to be used for build'
22+
required: true
23+
default: '1'
24+
25+
runs:
26+
using: "composite"
27+
steps:
28+
- name: Set up Java
29+
uses: actions/setup-java@v4
30+
with:
31+
java-version: 17
32+
distribution: 'adopt'
33+
cache: 'gradle'
34+
35+
- name: Set up Flutter
36+
uses: subosito/flutter-action@v2
37+
with:
38+
cache: true
39+
flutter-version-file: pubspec.yaml
40+
41+
- name: Build Android APK/AAB
42+
shell: bash
43+
env:
44+
STORE_PASS: ${{ inputs.STORE_PASS }}
45+
ALIAS: ${{ inputs.ALIAS }}
46+
KEY_PASS: ${{ inputs.KEY_PASS }}
47+
VERSION_NAME: ${{inputs.VERSION_NAME}}
48+
VERSION_CODE: ${{inputs.VERSION_CODE}}
49+
run: |
50+
flutter build apk --debug --build-name $VERSION_NAME --build-number $VERSION_CODE
51+
flutter build apk --build-name $VERSION_NAME --build-number $VERSION_CODE
52+
flutter build appbundle --build-name $VERSION_NAME --build-number $VERSION_CODE
53+
54+
- name: Store APK file
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: apk-files
58+
path: |
59+
build/app/outputs/flutter-apk/app-debug.apk

.github/actions/common/action.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Common Workflow"
2+
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Set up Flutter
7+
uses: subosito/flutter-action@v2
8+
with:
9+
cache: true
10+
flutter-version-file: pubspec.yaml
11+
12+
- name: Fetch Flutter Dependencies
13+
shell: bash
14+
run: flutter pub get
15+
16+
- name: Validate Code Format
17+
shell: bash
18+
run: dart format --output=none --set-exit-if-changed .
19+
20+
- name: Analyze Code
21+
shell: bash
22+
run: flutter analyze --no-fatal-infos
23+
24+
- name: Run tests
25+
shell: bash
26+
run: flutter test

0 commit comments

Comments
 (0)