Skip to content

Commit 114fd0f

Browse files
authored
Merge pull request #2 from tuuhin/oss
Added project contribution guidelines
2 parents 12da06b + a1a72b1 commit 114fd0f

File tree

9 files changed

+329
-12
lines changed

9 files changed

+329
-12
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: "[BUG] "
5+
labels: bug
6+
---
7+
8+
**Describe the bug**
9+
A clear and concise description of what the bug is.
10+
11+
**To Reproduce**
12+
Steps to reproduce the behavior:
13+
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Device Info:**
26+
27+
- Android Version: [e.g. API 33 ]
28+
- Device Manufacturer [e.g. Samsung, Google]
29+
- Bluetooth Device: [ e.g. esp32 microcontroller, HC-05 bluetooth module ]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an new idea for this project
4+
title: "[FEAT] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem or this is a new thing? Please describe.**
10+
A clear and concise description of what the problem is or why this new feature is important
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Additional context**
16+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Pull Request
3+
about: Propose changes for review and merge
4+
---
5+
6+
## Description
7+
8+
Please include a summary of the change and which issue is fixed or feature is added.
9+
List any dependencies that are required for this change.
10+
11+
Mention the issues it closes #ISSUE_NUMBER_HERE (e.g., Closes #123)
12+
13+
## Type of change
14+
15+
Please delete options that are not relevant.
16+
17+
- [ ] Bug fix (non-breaking change which fixes an issue)
18+
- [ ] New feature (non-breaking change which adds functionality)
19+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as
20+
expected)
21+
- [ ] This change requires a documentation update
22+
23+
## Screenshots (if applicable)
24+
25+
---
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Android Build CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: '17'
21+
22+
- name: Grant execute permission to gradlew
23+
run: chmod +x gradlew
24+
25+
- name: Build with Gradle
26+
run: ./gradlew assembleDebug --stacktrace

CODE_OF_CONDUCT.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official email address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[mail](mailto://[email protected]).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the
118+
[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1,
119+
available at
120+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct/>.
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion).
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
<https://www.contributor-covenant.org/faq/>. Translations are available at
127+
<https://www.contributor-covenant.org/translations/>.

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to BTAndroidApp
2+
3+
Contributions are welcome to `BTAndroidApp` project!
4+
Your help is invaluable in making this app better for everyone. To ensure a smooth and effective
5+
collaboration, please follow these guidelines carefully.
6+
7+
---
8+
9+
## Our Contribution Workflow
10+
11+
To maintain project quality and coordination, we follow a specific workflow for contributions:
12+
13+
1. **Open an Issue First:**
14+
* Before starting any work, please **always open an issue** to discuss the bug, feature, or
15+
change you intend to work on.
16+
* This step is crucial for ensuring that the work aligns with project goals and avoids duplicate
17+
efforts.
18+
19+
2. **Discuss the Issue:**
20+
* We will discuss the issue with you to clarify requirements, approach, and feasibility.
21+
* Please participate actively in the discussion on the issue tracker.
22+
23+
3. **Wait for Approval to Work:**
24+
* Only after we have discussed the issue and explicitly ask you to proceed with implementing
25+
a solution, should you start coding.
26+
* This ensures that your valuable time is spent on features or fixes that the project needs and
27+
approves.
28+
29+
4. **Create a Dedicated Branch:**
30+
* Once approved to work, please create a new branch from `main` using one of the following
31+
conventions:
32+
* For new features: `feat/<descriptive_feature_name>`
33+
* For bug fixes: `bug/<bug-decription>`
34+
35+
---
36+
37+
## General Guidelines
38+
39+
- **Code of Conduct:** Please review and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) in all
40+
your interactions within this project.
41+
- **Pull Requests:**
42+
- When submitting your code, please
43+
use [Pull Request Template](/.github/PULL_REQUEST_TEMPLATE.md) and fill it out completely.
44+
- Link your pull request to the issue you worked on (e.g., `Closes #123`).
45+
- Be prepared for constructive feedback during the review process.
46+
47+
## Setting up the Development Environment
48+
49+
If you're unsure how to get the project running locally, here are the basic steps:
50+
51+
1. **Prerequisites:**
52+
* Java Development Kit (JDK) 17 or higher.
53+
* Android Studio (latest stable version recommended).
54+
* Android SDK Platform 34 (or the target API level of the app).
55+
56+
2. **Clone the repository:**
57+
```bash
58+
git clone https://github.com/tuuhin/BTAndroidApp.git
59+
cd BTAndroidApp
60+
```
61+
62+
3. **Open in Android Studio:**
63+
Open the cloned project in Android Studio. Android Studio should guide you through syncing Gradle
64+
files and downloading dependencies.
65+
66+
4. **Build and Run:**
67+
Ensure the project builds successfully (`./gradlew assembleDebug`) and runs on an emulator or
68+
physical device.
69+
70+
---
71+
72+
Thank you for your understanding and for contributing to the `BTAndroidApp`!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Tuhin Bhowmick
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,8 @@ an [issue](https://github.com/tuuhin/BTAndroidApp/issues/new)
7373

7474
### :man_cook: Contributing
7575

76-
Contributions are alaways welcomed from the community
77-
78-
- Fork the repository.
79-
- Create your feature branch (git checkout -b feature/YourFeature).
80-
- Commit your changes (git commit -am 'Add some feature').
81-
- Push to the branch (git push origin feature/YourFeature).
82-
- Create a new Pull Request.
76+
We welcome contributions to the `BTAndroidApp` project! Please take a moment to review
77+
our [Contribution Guidelines](CONTRIBUTING.md) before submitting pull requests or issues.
8378

8479
## :end: Conclusiion
8580

app/build.gradle.kts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,21 @@ android {
2929
}
3030

3131
signingConfigs {
32-
32+
// find if there is a properties file
3333
val keySecretFile = rootProject.file("keystore.properties")
34-
if (keySecretFile.exists()) return@signingConfigs
34+
if (!keySecretFile.exists()) return@signingConfigs
3535

36+
// load the properties
3637
val properties = Properties()
38+
keySecretFile.inputStream().use { properties.load(it) }
3739

40+
val userHome = System.getProperty("user.home")
3841
val storeFileName = properties.getProperty("STORE_FILE_NAME")
3942

40-
val keyStorePath = System.getenv("user.home")
41-
val keyStoreFolder = File(keyStorePath, "keystore")
42-
val keyStoreFile = File(keyStoreFolder, storeFileName)
43+
val keyStoreFolder = File(userHome, "keystore")
44+
if (!keyStoreFolder.exists()) return@signingConfigs
4345

46+
val keyStoreFile = File(keyStoreFolder, storeFileName)
4447
if (!keyStoreFile.exists()) return@signingConfigs
4548

4649
create("release") {

0 commit comments

Comments
 (0)