Skip to content

Commit 6c50821

Browse files
authored
Make shelfsdk a submodule (#66)
* make shelfsdk a submodule * add contributing.md * add submodule info * update ci * add submodule
1 parent 247413d commit 6c50821

File tree

8 files changed

+204
-18
lines changed

8 files changed

+204
-18
lines changed

.github/workflows/flutter_release.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
20-
21-
- name: Checkout shelfsdk
22-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2320
with:
24-
repository: Dr-Blank/shelfsdk
25-
path: ./shelfsdk
21+
submodules: recursive
2622

2723
- name: Set Up Java
2824
uses: actions/[email protected]

.github/workflows/flutter_test.yaml

+28-7
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,47 @@ on:
66
- main
77
pull_request:
88

9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
912
jobs:
1013
test:
1114
runs-on: ubuntu-latest
1215

1316
steps:
1417
- name: Checkout repository
15-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
19+
with:
20+
# This ensures submodules are cloned
21+
submodules: recursive
22+
23+
# Debug: Echo current directory contents
24+
- name: List root directory contents
25+
run: |
26+
pwd
27+
ls -la
28+
29+
# Debug: Recursive directory structure
30+
- name: Show full directory structure
31+
run: |
32+
echo "Full directory structure:"
33+
tree -L 3
34+
35+
# Debug: Submodule status and details
36+
- name: Check submodule status
37+
run: |
38+
echo "Submodule status:"
39+
git submodule status
40+
41+
echo "\nSubmodule details:"
42+
git submodule foreach 'echo $path: && pwd && ls -la'
1643
1744
- name: Decode android/upload.jks
1845
run: echo "${{ secrets.UPLOAD_KEYSTORE_JKS }}" | base64 --decode > android/upload.jks
1946

2047
- name: Decode android/key.properties
2148
run: echo "${{ secrets.KEY_PROPERTIES }}" | base64 --decode > android/key.properties
2249

23-
- name: Checkout shelfsdk
24-
uses: actions/checkout@v3
25-
with:
26-
repository: Dr-Blank/shelfsdk
27-
path: ./shelfsdk
28-
2950
- name: Set up Flutter
3051
uses: subosito/flutter-action@v2
3152
with:

.gitignore

+1-4
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,5 @@ app.*.map.json
4242
/android/app/profile
4343
/android/app/release
4444

45-
# separate git repo for api sdk
46-
/shelfsdk
47-
4845
# secret keys
49-
/secrets
46+
/secrets

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "shelfsdk"]
2+
path = shelfsdk
3+
url = https://github.com/Dr-Blank/shelfsdk

CONTRIBUTING.md

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# Contributing to Vaani
2+
3+
## Welcome Contributors! 🚀
4+
5+
We appreciate your interest in contributing to Vaani. This guide will help you navigate the contribution process effectively.
6+
7+
## How to Contribute
8+
9+
### Reporting Bugs 🐞
10+
11+
1. **Check Existing Issues**:
12+
- Search through the [GitHub Issues](https://github.com/Dr-Blank/Vaani/issues)
13+
14+
2. **Create a Detailed Bug Report**:
15+
- Provide:
16+
* Exact steps to reproduce
17+
* Relevant error logs or screenshots
18+
19+
### Submodule Contribution Workflow 🧩
20+
21+
#### Understanding Vaani's Submodule Structure
22+
23+
Vaani uses Git submodules to manage interconnected components. This means each submodule is a separate Git repository nested within the main project.
24+
25+
#### Working with Submodules
26+
27+
1. **Identifying Submodules**:
28+
- List all submodules in the project
29+
```bash
30+
git submodule status
31+
```
32+
33+
2. **Initializing Submodules**:
34+
```bash
35+
# Ensure all submodules are initialized
36+
git submodule update --init --recursive
37+
```
38+
39+
3. **Contributing to a Specific Submodule**:
40+
41+
a. **Navigate to Submodule Directory**:
42+
```bash
43+
cd path/to/submodule
44+
```
45+
46+
b. **Create a Separate Branch**:
47+
```bash
48+
git checkout -b feature/your-submodule-feature
49+
```
50+
51+
c. **Make and Commit Changes**:
52+
```bash
53+
# Stage changes
54+
git add .
55+
56+
# Commit with descriptive message
57+
git commit -m "feat(submodule): describe specific change"
58+
```
59+
60+
d. **Push Submodule Changes**:
61+
```bash
62+
git push origin feature/your-submodule-feature
63+
```
64+
65+
4. **Updating Submodule References**:
66+
After making changes to a submodule:
67+
```bash
68+
# From the main repository root
69+
git add path/to/submodule
70+
git commit -m "Update submodule reference to latest changes"
71+
```
72+
73+
5. **Pulling Latest Submodule Changes**:
74+
```bash
75+
# Update all submodules
76+
git submodule update --recursive --remote
77+
78+
# Or update a specific submodule
79+
git submodule update --remote path/to/specific/submodule
80+
```
81+
82+
#### Submodule Contribution Best Practices
83+
84+
- Always work in a feature branch within the submodule
85+
- Ensure submodule changes do not break the main application
86+
- Write tests for submodule-specific changes
87+
- Update documentation if the submodule's interface changes
88+
- Create a pull request for the submodule first, then update the main project's submodule reference
89+
90+
### Development Workflow
91+
92+
#### Setting Up the Development Environment
93+
94+
1. **Prerequisites**:
95+
- [Git](https://git-scm.com/)
96+
- [Flutter SDK](https://flutter.dev/)
97+
- Recommended IDE: [VS Code](https://code.visualstudio.com/)
98+
99+
2. **Repository Setup**:
100+
101+
1. [Fork the repo](https://github.com/Dr-Blank/Vaani/fork)
102+
1. Clone the forked repository to your local machine
103+
```bash
104+
# Fork the main repository on GitHub
105+
git clone --recursive https://github.com/[YOUR_USERNAME]/Vaani.git
106+
cd Vaani
107+
108+
# Initialize and update submodules
109+
git submodule update --init --recursive
110+
111+
# Install dependencies for the main app and submodules
112+
flutter pub get
113+
```
114+
115+
#### Coding Standards
116+
117+
1. **Code Style**:
118+
- Follow [Flutter's style guide](https://dart.dev/guides/language/effective-dart/style)
119+
- Use `dart format` and `flutter analyze`
120+
121+
```bash
122+
dart format .
123+
flutter analyze
124+
```
125+
126+
2. **Testing**:
127+
- Write unit and widget tests
128+
- Ensure tests pass for both the main app and submodules
129+
130+
```bash
131+
flutter test
132+
```
133+
134+
### Pull Request Process
135+
136+
1. **Branch Naming**:
137+
- Use descriptive branch names
138+
- Prefix with feature/, bugfix/, or docs/
139+
140+
```bash
141+
git checkout -b feature/add-accessibility-support
142+
```
143+
144+
2. **Commit Messages**:
145+
- Use clear, concise descriptions
146+
- Reference issue numbers when applicable
147+
- Follow conventional commits format:
148+
`<type>(scope): <description>`
149+
150+
3. **Pull Request Guidelines**:
151+
- Clearly describe the purpose of your changes
152+
- Include screenshots for visual changes
153+
- Specify if changes affect specific submodules
154+
- Ensure all CI checks pass
155+
156+
## Communication
157+
158+
* [Open an Issue](https://github.com/Dr-Blank/Vaani/issues)
159+
* [Discussion Forum](https://github.com/Dr-Blank/Vaani/discussions)
160+
161+
## Code of Conduct
162+
163+
* Be respectful and inclusive
164+
* Constructive feedback is welcome
165+
* Collaborate and support fellow contributors
166+
167+
Happy Contributing! 🌟

pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1565,4 +1565,4 @@ packages:
15651565
version: "3.1.2"
15661566
sdks:
15671567
dart: ">=3.5.0 <4.0.0"
1568-
flutter: ">=3.24.0"
1568+
flutter: ">=3.24.5"

pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ version: 0.0.15+6
2020

2121
environment:
2222
sdk: ">=3.3.4 <4.0.0"
23+
flutter: ">=3.24.5 <4.0.0"
2324

2425
isar_version: &isar_version ^4.0.0-dev.13 # define the version to be used
2526

shelfsdk

Submodule shelfsdk added at 9a9e25e

0 commit comments

Comments
 (0)