Skip to content
Merged

V46 #154

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
14 changes: 14 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
# Pre-commit: fast format check only (~15s).
# Fix violations: ./gradlew :app:spotlessApply

echo "[pre-commit] Checking code format..."
./gradlew :app:spotlessCheck -q
if [ $? -ne 0 ]; then
echo ""
echo " Format violations found."
echo " Run: ./gradlew :app:spotlessApply"
echo ""
exit 1
fi
echo "[pre-commit] Format OK"
19 changes: 19 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
# Pre-push: Android Lint check (runs before git push).
# Skip: SKIP_LINT=1 git push

if [ "$SKIP_LINT" = "1" ]; then
echo "[pre-push] Lint skipped (SKIP_LINT=1)"
exit 0
fi

echo "[pre-push] Running Android Lint..."
./gradlew :app:lintDebug -q
if [ $? -ne 0 ]; then
echo ""
echo " Lint errors found. Check: app/build/reports/lint-results-debug.html"
echo " To skip: SKIP_LINT=1 git push"
echo ""
exit 1
fi
echo "[pre-push] Lint OK"
39 changes: 30 additions & 9 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -47,7 +49,7 @@ jobs:
run: |
CODE=$(grep -oP '(?<=def appVersionCode = )\d+' app/build.gradle | head -n1)
echo "code=$CODE" >> $GITHUB_OUTPUT
echo "name=2.5.$CODE" >> $GITHUB_OUTPUT
echo "name=2.6.$CODE" >> $GITHUB_OUTPUT

- name: Decode keystore
run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > /tmp/release.jks
Expand All @@ -72,14 +74,13 @@ jobs:
id: notes
run: |
PREV=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$PREV" ]; then
NOTES=$(git log "$PREV"..HEAD --pretty=format:"- %s" --no-merges)
else
NOTES=$(git log --pretty=format:"- %s" --no-merges | head -30)
fi
echo "notes<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
RANGE=${PREV:+"$PREV..HEAD"}
{
echo 'notes<<EOF'
git log ${RANGE} --no-merges --format='### %s%n%n%b' | \
awk '/^$/{if(p)print ""; p=0; next} {p=1; print}'
echo 'EOF'
} >> "$GITHUB_OUTPUT"

- name: Create GitHub Release
uses: ncipollo/release-action@v1
Expand All @@ -91,3 +92,23 @@ jobs:
artifactErrorsFailBuild: true
makeLatest: true
token: ${{ secrets.GITHUB_TOKEN }}

# - name: Generate Play Store release notes
# run: |
# mkdir -p distribution/whatsnew
# PREV=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
# RANGE=${PREV:+"$PREV..HEAD"}
# git log ${RANGE} --no-merges --format='• %s' \
# | head -20 \
# | head -c 490 \
# > distribution/whatsnew/whatsnew-en-US

# - name: Publish to Google Play (Open Testing)
# uses: r0adkll/upload-google-play@v3
# with:
# serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
# packageName: com.pasich.mynotes
# releaseFiles: artifacts/MyNotes-v${{ steps.version.outputs.name }}.aab
# track: beta
# status: completed
# whatsNewDirectory: distribution/whatsnew
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# CHANGELOG

## [2.6.46] - 18.05.2026

**New**

- **Notification sound:** Changed default notification sound; choose a custom melody in
Settings → Media.
- **Notification volume:** Adjust notification volume directly from the app in Settings → Media.
- **Reminder repeat:** When setting a reminder, toggle "Repeat notification" to receive the
alert again every 5, 10, 15, 30, or 60 minutes until the reminder is cleared. Works for
both note and task reminders.

**Improvements**

- **Help:** Updated the in-app guide — added dedicated sections for Tasks and Reminders with
step-by-step descriptions of all key features.

## [2.5.45] - 10.05.2026

**New**
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ No tracking, no analytics, no cloud — full privacy by design.
If you find bugs, issues, or have ideas to improve the app,
please open a new [Issue](https://github.com/pasichDev/My-Notes/issues) in the project repository.

## Development

**Code style:** [Spotless](https://github.com/diffplug/spotless) + Google Java Format (AOSP, 4-space indent).

```bash
# Check formatting
./gradlew :app:spotlessCheck

# Auto-fix formatting
./gradlew :app:spotlessApply
```

**Git hooks** — install once after cloning:

```bash
git config core.hooksPath .githooks
```

- **pre-commit** — runs `spotlessCheck` (~15s). Fails fast on format violations.
- **pre-push** — runs `lintDebug` (~2–3 min). Skip with `SKIP_LINT=1 git push`.

## License

This project is licensed under the terms of the [Apache License 2.0](./LICENSE).
15 changes: 13 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.application'
id 'com.google.dagger.hilt.android'
id 'com.diffplug.spotless'
}

apply plugin: 'com.android.application'
Expand All @@ -9,8 +10,8 @@ apply from: "$projectDir/gradle/libs-task.gradle"
apply from: "$projectDir/gradle/changelog-task.gradle"


def appVersionCode = 45
def appVersionName = "2.5.${appVersionCode}"
def appVersionCode = 46
def appVersionName = "2.6.${appVersionCode}"

def gitCommitHashProvider = providers.exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
Expand Down Expand Up @@ -189,3 +190,13 @@ dependencies {
androidTestImplementation 'com.google.truth:truth:1.4.5'

}

spotless {
java {
target 'src/**/*.java'
googleJavaFormat('1.22.0').aosp() // 4-space indent (AOSP style)
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}
Loading
Loading