Skip to content

Commit

Permalink
Merge pull request #107 from Crazy-Marvin/development
Browse files Browse the repository at this point in the history
Flashy v1.5
  • Loading branch information
CrazyMarvin authored Nov 14, 2022
2 parents 33a0679 + 8190aef commit 838c8e1
Show file tree
Hide file tree
Showing 100 changed files with 3,204 additions and 757 deletions.
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/java
{
"name": "Java",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update the VARIANT arg to pick a Java version: 8, 11, 17
// Append -bullseye or -buster to pin to an OS version.
// Use the -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "17-bullseye",
// Options
"INSTALL_MAVEN": "true",
"MAVEN_VERSION": "3.8.5",
"INSTALL_GRADLE": "false",
"NODE_VERSION": "lts/*"
}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"maven.executable.path": "/usr/local/sdkman/candidates/maven/current/bin/mvn"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
59 changes: 59 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,60 @@
# Contributing to Flashy

Thank you for choosing to contribute to our project! We appreciate your input and want to make contributing to this project as simple and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

Check out the [README](https://github.com/Crazy-Marvin/Flashy/blob/trunk/README.md) file for an overview of the project.

## Any contributions you make will be under the Apache License 2.0

When you submit code changes, they are subject to the same [Apache License](https://www.apache.org/licenses/LICENSE-2.0) as the project. If you have any concerns, please contact the project maintainers.

## How to Contribute Code

These are the steps you should take to contribute to this project:

- Create an issue on the Github repository to discuss the proposed change.
- Fork the repository and contribute to the forked repo in a new branch `yourfeature`
- Send a pull request to the origin `development` branch be reviewed.

Use [Android Studio](https://developer.android.com/studio/) to edit the source.

Following a successful PR review, the project maintainer will merge your contribution into the project.

Releases are based on the `trunk` branch. A maintainer will create a tagged release and attach a signed .apk. The .apk will go to Google Play too then. F-Droid checks this repository and will start a build when one of their build servers is available.

Hooray! You have successfully contributed to Flashy!

## How to Contribute Translations

The translation is managed by Weblate which is accessible under [https://hosted.weblate.org/engage/flashy/](https://hosted.weblate.org/engage/flashy/).
We have two components:
- `Flashy` for the app itself
- `Metadata` for the store description (F-Droid & Google Play) and changelogs
- `Glossary` is not used yet

Hooray! You have successfully contributed to Flashy!

## How to Open a Bug Report or Feature Request

We use GitHub issues for the management of issues, bugs and features. You may open an issue by following [https://github.com/Crazy-Marvin/Flashy/issues/new/choose](https://github.com/Crazy-Marvin/Flashy/issues/new/choose).

Hooray! You have successfully contributed to Flashy!

## How to Report a Security Vulnerability

Please send me an e-mail to [[email protected]](mailto:[email protected]?subject=Flashy%20Security%20Vulnerability). I may give you information how to community encrypted. More details may be found in the [`SECURITY.md`](https://github.com/Crazy-Marvin/Flashy/blob/trunk/.github/SECURITY.md)

Hooray! You have successfully contributed to Flashy!

## How to Contribute Money

Please send an e-mail to [[email protected]](mailto:[email protected]?subject=Flashy%20Donation) to discuss the details.
You may find some options on [this page](https://poopjournal.rocks/blog/donate/) too.

Hooray! You have successfully contributed to Flashy!
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@

custom: ["https://poopjournal.rocks/blog/donate/"]
3 changes: 2 additions & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@

Please report security vulnerabilities to [[email protected]](mailto:[email protected]?subject=Flashy%20Security%20Vulnerability).
It would be awesome if you could prepare a fix too.
2 changes: 1 addition & 1 deletion .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Please send an e-mail to [[email protected]](mailto:[email protected]?subject=Flashy%20Support) or open issue here on GitHub.
44 changes: 44 additions & 0 deletions .github/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/java
{
"name": "Java",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update the VARIANT arg to pick a Java version: 8, 11, 17
// Append -bullseye or -buster to pin to an OS version.
// Use the -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "17-bullseye",
// Options
"INSTALL_MAVEN": "true",
"MAVEN_VERSION": "3.8.5",
"INSTALL_GRADLE": "false",
"NODE_VERSION": "lts/*"
}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"maven.executable.path": "/usr/local/sdkman/candidates/maven/current/bin/mvn"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@ name: CI
on: push
jobs:
build:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: "📥 Check-out"
uses: actions/checkout@v2
- name: "🧪 Gradle Wrapper Validation"
uses: gradle/wrapper-validation-action@v1
- name: "🧰 Install JDK"
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: 'adopt'
java-version: 11
java-package: jdk
- name: "🧰 Install Android SDK"
uses: malinskiy/action-android/install-sdk@release/0.0.5
uses: malinskiy/action-android/install-sdk@release/0.1.4
with:
acceptLicense: yes
- name: "🏗 Build"
run: ./gradlew assembleDebug
- name: "🧪 Code coverage"
run: ./gradlew jacocoTestReport
- name: "📤 Upload code coverage"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
yml: .codecov.yml
Expand Down
3 changes: 2 additions & 1 deletion .idea/misc.xml

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

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

33 changes: 27 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,49 @@ android {
applicationId "rocks.poopjournal.flashy"
minSdkVersion 19
targetSdkVersion 33
versionCode 5
versionName "1.4"
versionCode 6
versionName "1.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
resConfigs "en", "cs", "hr", "lt", "nb-rNO", "pt-rBR", "tr"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
namespace 'com.poopjournal.flashy'
buildFeatures {
viewBinding true
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
// Sets Java compatibility to Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'rocks.poopjournal.flashy'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.preference:preference:1.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.android.material:material:1.7.0'
coreLibraryDesugaring ('com.android.tools:desugar_jdk_libs') {
version {
strictly ("1.2.0") //2.0.0 requires gradle 7.4.0-alpha10
}
}

implementation 'me.tankery.lib:circularSeekBar:1.4.1'
//to resolve dependency conflicts
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
}
80 changes: 74 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.WRITE_SETTINGS"

<uses-permission
android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.CAMERA"
android:maxSdkVersion="23"/>
<uses-permission
android:name="android.permission.CAMERA"
android:maxSdkVersion="23" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:localeConfig="@xml/locales_config"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".activities.SettingsActivity"
android:exported="false"
android:label="@string/settings"
android:parentActivityName=".activities.MainActivity">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>

<service
android:name=".QSTileService"
android:exported="true"
Expand All @@ -25,17 +41,69 @@
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>

<receiver
android:name=".FlashlightWidgetProvider"
android:exported="false">
android:name=".widgets.FlashlightWidgetProvider"
android:exported="false"
android:label="@string/flashlight">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>

<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/flashlight_widget" />
</receiver>
<activity android:name=".MainActivity" android:configChanges="orientation"
<receiver
android:name=".widgets.ScreenBrightnessWidgetProvider"
android:exported="false"
android:label="@string/maximize_screen_brightness">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>

<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/screen_widget" />
</receiver>
<receiver
android:name=".widgets.SOSWidgetProvider"
android:exported="false"
android:label="@string/sos">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>

<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/sos_widget" />
</receiver>

<activity
android:name=".activities.GrantSystemWritePermissionActivity"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>

<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity
android:name=".activities.AboutActivity"
android:exported="false"
android:parentActivityName=".activities.MainActivity"
android:label="@string/about">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity
android:name=".activities.MainActivity"
android:configChanges="orientation"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Loading

0 comments on commit 838c8e1

Please sign in to comment.