Skip to content

Commit af4154b

Browse files
feat: v1.0.0 - Initial stable release
- Android Screenshot Manager - MVVM + Hilt + Room + Coroutines - Foreground service (dataSync) - Scoped storage + media access - Dynamic locale support - Full test coverage
0 parents  commit af4154b

87 files changed

Lines changed: 11267 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
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: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
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 Information:**
26+
- Device: [e.g. Pixel 5]
27+
- OS: [e.g. Android 12]
28+
- App Version: [e.g. 1.0.0]
29+
30+
**Additional context**
31+
Add any other context about the problem here.
32+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.
20+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Description
2+
<!-- Provide a brief description of the changes in this PR -->
3+
4+
## Type of Change
5+
<!-- Mark the relevant option with an "x" -->
6+
- [ ] Bug fix (non-breaking change which fixes an issue)
7+
- [ ] New feature (non-breaking change which adds functionality)
8+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
9+
- [ ] Documentation update
10+
- [ ] Code refactoring
11+
- [ ] Performance improvement
12+
- [ ] Test addition/update
13+
14+
## Related Issue
15+
<!-- Link to the issue this PR addresses, if applicable -->
16+
Fixes #(issue number)
17+
18+
## Changes Made
19+
<!-- List the specific changes made in this PR -->
20+
-
21+
-
22+
-
23+
24+
## Testing
25+
<!-- Describe the tests you ran to verify your changes -->
26+
- [ ] Unit tests pass
27+
- [ ] Integration tests pass
28+
- [ ] Manual testing completed
29+
- [ ] Tested on physical device
30+
- [ ] Tested on emulator
31+
32+
## Screenshots (if applicable)
33+
<!-- Add screenshots to help explain your changes -->
34+
35+
## Checklist
36+
- [ ] My code follows the style guidelines of this project
37+
- [ ] I have performed a self-review of my own code
38+
- [ ] I have commented my code, particularly in hard-to-understand areas
39+
- [ ] I have made corresponding changes to the documentation
40+
- [ ] My changes generate no new warnings
41+
- [ ] I have added tests that prove my fix is effective or that my feature works
42+
- [ ] New and existing unit tests pass locally with my changes
43+
- [ ] Any dependent changes have been merged and published
44+
45+
## Additional Notes
46+
<!-- Add any additional notes or context about the PR here -->
47+

.github/workflows/build-apk.yaml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
name: Build APK
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
branches:
11+
- "*"
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Java
22+
uses: actions/setup-java@v4
23+
with:
24+
distribution: "temurin"
25+
java-version: "17"
26+
27+
- name: Setup Android SDK
28+
uses: android-actions/setup-android@v3
29+
30+
- name: Setup Gradle
31+
uses: gradle/actions/setup-gradle@v4
32+
33+
- name: Decode Keystore
34+
run: echo "${{ secrets.KEYSTORE_B64 }}" | base64 -d > app/keystore.jks
35+
env:
36+
KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }}
37+
38+
- name: Validate Keystore
39+
run: |
40+
md5=$(md5sum app/keystore.jks | awk '{print $1}')
41+
echo "Keystore MD5: $md5"
42+
if [ "$md5" != "9a8b86ee3370d37b2c8792ede9ff448a" ]; then
43+
echo "Keystore MD5 mismatch!"
44+
exit 1
45+
fi
46+
47+
- name: Decode Google Services JSON
48+
run: echo "${{ secrets.GOOGLE_SERVICES_JSON_B64 }}" | base64 -d > app/google-services.json
49+
env:
50+
GOOGLE_SERVICES_JSON_B64: ${{ secrets.GOOGLE_SERVICES_JSON_B64 }}
51+
52+
- name: Make gradlew executable
53+
run: chmod +x ./gradlew
54+
55+
- name: Build Debug APK
56+
run: ./gradlew assembleDebug
57+
58+
- name: Build Release APK
59+
run: ./gradlew assembleRelease -PstorePassword=${{ secrets.STORE_PASSWORD }} -PkeyPassword=${{ secrets.KEY_PASSWORD }} -PkeyAlias=${{ secrets.KEY_ALIAS }}
60+
61+
- name: Upload Debug APK
62+
if: success()
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: ko-debug-apk
66+
path: app/build/outputs/apk/debug/*.apk
67+
68+
- name: Upload Release APK
69+
if: success()
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: ko-release-apk
73+
path: app/build/outputs/apk/release/*.apk
74+
75+
- name: Prepare Release Assets and Metadata
76+
if: success()
77+
id: release-prep
78+
run: |
79+
release_dir="$GITHUB_WORKSPACE/release_staging"
80+
mkdir -p "$release_dir"
81+
82+
cp app/build/outputs/apk/debug/*.apk "$release_dir/Ko-debug.apk"
83+
cp app/build/outputs/apk/release/*.apk "$release_dir/Ko-release.apk"
84+
85+
version=$(grep '^version=' version.properties | cut -d'=' -f2)
86+
if [ -z "$version" ]; then
87+
echo "Failed to get version from version.properties"
88+
exit 1
89+
fi
90+
echo "Version: $version"
91+
92+
sha256_debug=$(sha256sum "$release_dir/Ko-debug.apk" | awk '{print $1}')
93+
sha256_release=$(sha256sum "$release_dir/Ko-release.apk" | awk '{print $1}')
94+
echo "SHA256 debug: $sha256_debug"
95+
echo "SHA256 release: $sha256_release"
96+
97+
build_date=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
98+
echo "Build Date: $build_date"
99+
100+
commit_hash_full=$(git rev-parse HEAD)
101+
commit_hash_short=$(git rev-parse --short=7 HEAD)
102+
commit_message=$(git log -1 --pretty=%B)
103+
if [ -z "$commit_message" ]; then
104+
commit_message="(No commit message provided)"
105+
fi
106+
echo "Commit message: '$commit_message'"
107+
108+
commit_title=$(echo "$commit_message" | head -n1)
109+
commit_body=$(echo "$commit_message" | tail -n +2 | grep -v '^$')
110+
111+
metadata_path="$release_dir/Ko.metadata.txt"
112+
{
113+
echo "Build Timestamp: $build_date"
114+
echo "Commit: $commit_hash_full"
115+
echo "SHA256 debug: $sha256_debug"
116+
echo "SHA256 release: $sha256_release"
117+
echo "Version: $version"
118+
echo "Commit Message:"
119+
echo "$commit_message"
120+
} > "$metadata_path"
121+
122+
release_notes_path="$release_dir/release_notes.md"
123+
{
124+
echo "Ko v$version"
125+
echo ""
126+
echo "Build Date: $build_date"
127+
echo "SHA256 debug: $sha256_debug (Ko-debug.apk)"
128+
echo "SHA256 release: $sha256_release (Ko-release.apk)"
129+
echo ""
130+
echo "Changes"
131+
echo ""
132+
echo "Built from commit: [$commit_hash_short](https://github.com/DarkPhilosophy/Ko/commit/$commit_hash_full)"
133+
echo "Commit message:"
134+
echo "## $commit_title"
135+
if [ -n "$commit_body" ]; then
136+
echo "$commit_body" | sed 's/^/- /'
137+
fi
138+
echo ""
139+
} > "$release_notes_path"
140+
141+
echo "version=$version" >> $GITHUB_OUTPUT
142+
echo "assets_path=$release_dir" >> $GITHUB_OUTPUT
143+
echo "release_notes_path=$release_notes_path" >> $GITHUB_OUTPUT
144+
145+
- name: Upload Build Artifact (for debugging/retention)
146+
if: success()
147+
uses: actions/upload-artifact@v4
148+
with:
149+
name: Ko-Build-${{ steps.release-prep.outputs.version || github.run_number }}
150+
path: ${{ steps.release-prep.outputs.assets_path }}/
151+
if-no-files-found: warn
152+
retention-days: 7
153+
154+
- name: Create Release on Tag
155+
if: startsWith(github.ref, 'refs/tags/v')
156+
uses: softprops/action-gh-release@v2
157+
with:
158+
name: Release - Ko v${{ steps.release-prep.outputs.version }}
159+
tag_name: ${{ github.ref_name }}
160+
body_path: ${{ steps.release-prep.outputs.release_notes_path }}
161+
files: |
162+
${{ steps.release-prep.outputs.assets_path }}/Ko-debug.apk
163+
${{ steps.release-prep.outputs.assets_path }}/Ko-release.apk
164+
${{ steps.release-prep.outputs.assets_path }}/Ko.metadata.txt
165+
draft: false
166+
prerelease: false
167+
env:
168+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169+
170+
- name: Create GitHub Release on 'main' branch
171+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
172+
uses: softprops/action-gh-release@v2
173+
with:
174+
name: Release - Ko v${{ steps.release-prep.outputs.version }}
175+
tag_name: v${{ steps.release-prep.outputs.version }}
176+
body_path: ${{ steps.release-prep.outputs.release_notes_path }}
177+
files: |
178+
${{ steps.release-prep.outputs.assets_path }}/Ko-debug.apk
179+
${{ steps.release-prep.outputs.assets_path }}/Ko-release.apk
180+
${{ steps.release-prep.outputs.assets_path }}/Ko.metadata.txt
181+
draft: false
182+
prerelease: false
183+
env:
184+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Validate Gradle Wrapper
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
validation:
13+
name: Validation
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
- name: Validate Gradle Wrapper
19+
uses: gradle/actions/wrapper-validation@v4
20+

.github/workflows/pre-merge.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Pre Merge Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
gradle:
13+
runs-on: ubuntu-latest
14+
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Java
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: "temurin"
23+
java-version: "17"
24+
25+
- name: Setup Android SDK
26+
uses: android-actions/setup-android@v3
27+
28+
- name: Setup Gradle
29+
uses: gradle/actions/setup-gradle@v4
30+
31+
- name: Decode Keystore
32+
run: echo "${{ secrets.KEYSTORE_B64 }}" | base64 -d > app/keystore.jks
33+
env:
34+
KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }}
35+
36+
- name: Decode Google Services JSON
37+
run: echo "${{ secrets.GOOGLE_SERVICES_JSON_B64 }}" | base64 -d > app/google-services.json
38+
env:
39+
GOOGLE_SERVICES_JSON_B64: ${{ secrets.GOOGLE_SERVICES_JSON_B64 }}
40+
41+
- name: Make gradlew executable
42+
run: chmod +x ./gradlew
43+
44+
- name: Run Gradle Build
45+
run: ./gradlew build --continue
46+
47+
- name: Check code formatting
48+
run: ./gradlew spotlessCheck
49+
50+
- name: Run Detekt static analysis
51+
run: ./gradlew detekt --continue
52+
53+
- name: Run Tests
54+
run: ./gradlew test --continue
55+
56+
- name: Upload Build Reports
57+
if: always()
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: build-reports
61+
path: |
62+
**/build/reports/
63+
**/build/test-results/
64+

0 commit comments

Comments
 (0)