Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file removed .DS_Store
Binary file not shown.
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage me"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: checkboxes
attributes:
label: Is there a StackOverflow question about this issue?
description: Please search [StackOverflow](https://stackoverflow.com/questions/tagged/android-jetpack) if an issue with an answer already exists for the bug you encountered.
options:
- label: I have searched StackOverflow
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant logcat output
description: Please copy and paste any relevant logcat output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Feature request
description: File a feature request
title: "[FR]: "
labels: ["enhancement", "triage me"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for this feature request.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: describe-problem
attributes:
label: Describe the problem
description: Is your feature request related to a problem? Please describe.
placeholder: I'm always frustrated when...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution
description: Please describe the solution you'd like. A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Pull request
about: Create a pull request
label: 'triage me'
---
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass (`./gradlew spotlessApply` to automatically apply formatting)
- [ ] Appropriate docs were updated (if necessary)

Is this your first Pull Request?
- [ ] Run `./tools/setup.sh`
- [ ] Import the code formatting style as explained in [the setup script](/tools/setup.sh#L40).

Fixes #<issue_number_goes_here> 🦕
44 changes: 44 additions & 0 deletions .github/scripts/dependency-update-report-mail-sender.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module.exports = ({ }) => {
const execSync = require('child_process').execSync
execSync(`npm install nodemailer`) // Install nodemailer
const nodemailer = require('nodemailer')
const transporter = nodemailer.createTransport({
host: "smtp.live.com", // Host for hotmail
port: 587,
secureConnection: false,
auth: {
user: `${process.env.MAIL_USERNAME}`,
pass: `${process.env.MAIL_PASSWORD}`
},
tls: {
ciphers: 'SSLv3'
}
});
path = require('path')
console.log("Current directory:", __dirname);
let reqPath = path.join(__dirname, '../../GitHubRepos/app/build/dependencyUpdates/report.html')
console.log("reqPath :", reqPath);
const report = require('fs').readFileSync(reqPath)

const mailOptions = {
from: {
name: 'GitHubRepos',
address: process.env.MAIL_USERNAME
},
to: 'khalid64927@gmail.com', // Use your main account to get the email
subject: 'Dependency update report of GitHubRepos ¯\\_(ツ)_/¯',
text: `${report}`,
attachments : [
{ // utf-8 string as an attachment
filename: 'build.gradle.kts',
path: reqPath
}
]
};

transporter.sendMail(mailOptions, (error, info) => {
if (error) {
console.log(error)
}
});
}
52 changes: 42 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,64 @@
name: Android CI Build

on: pull_request
on:
pull_request:
workflow_dispatch:
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v1
- name: Checkout
uses: actions/checkout@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run Spotless
run: cd GitHubRepos && ./gradlew app:spotlessCheck
run: cd GitHubRepos && ./gradlew app:spotlessCheck --stacktrace

- name: Run Lint
run: cd GitHubRepos && ./gradlew app:lintProdDebug --stacktrace

- name: Run Tests
run: cd GitHubRepos && ./gradlew app:testProdDebugUnitTest
- name: Run Jacoco
run: cd GitHubRepos && ./gradlew jacocoTestReport --stacktrace

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0-preview1'
bundler-cache: true

- name: Run Danger
if: github.event_name == 'pull_request'
run: |
# install danger and its dependencies using bundler
cd GitHubRepos && gem install bundler
# install all bundles from Gemfile
bundle install --jobs 4 --retry 3
# execute danger for this PR
bundle exec danger --dangerfile=Dangerfile --danger_id=danger-pr
env:
# the token used by danger to report the results on the PR
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: cd GitHubRepos && ./gradlew app:assembleProdDebug
run: cd GitHubRepos && ./gradlew app:assembleProdDebug --stacktrace

# TODO: fix OSS errors
#- name: OSS Scan
# run: cd GitHubRepos && ./gradlew dependencyCheckAnalyze --info
- name: OSS Scan
run: cd GitHubRepos && ./gradlew app:dependencyCheckAnalyze --info


27 changes: 27 additions & 0 deletions .github/workflows/dependency-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check Dependency Updates
on:
schedule:
- cron: "37 13 * * SAT"
workflow_dispatch:
jobs:
dependency-updates:
runs-on: ubuntu-latest
steps:
# Removed some steps for brevity
- name: Checkout code
uses: actions/checkout@v2

- name: Log dependency update report
run: cat GitHubRepos/app/build/dependencyUpdates/report.html

- name: 💌 Send email report
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
uses: actions/github-script@v3
env:
MAIL_USERNAME: ${{ secrets.MAIL_USERNAME }}
MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }}
with:
script: |
const scriptPath = '/./.github/scripts/dependency-update-report-mail-sender.js'
const script = require(`${process.env.GITHUB_WORKSPACE}${scriptPath}`)
script({ })
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/build
/captures
.externalNativeBuild
.cxx
.DG_Store
/.DS_Store
/buildSrc/build/
Binary file removed GitHubRepos/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions GitHubRepos/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
BUNDLE_RETRY: "3"
BUNDLE_JOBS: "4"
BUNDLE_PATH: "vendor/bundle"
2 changes: 2 additions & 0 deletions GitHubRepos/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
.externalNativeBuild
.cxx
.DG_Store
/.DS_Store
/buildSrc/build/
/.idea/shelf/
.DS_Store
2 changes: 1 addition & 1 deletion GitHubRepos/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions GitHubRepos/.idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions GitHubRepos/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions GitHubRepos/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions GitHubRepos/.idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions GitHubRepos/.idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading