Skip to content

Commit c4967b2

Browse files
Update build configurations and prepare for F-Droid publishing
- Added F-Droid build flavor with specific configurations and update check logic. - Enhanced update checking to support F-Droid, allowing for version checks against the F-Droid repository. - Improved settings screen to accommodate F-Droid specific links and actions. - Updated Gradle version and dependencies, including AGP and Hilt.
1 parent dfe12a1 commit c4967b2

21 files changed

Lines changed: 381 additions & 126 deletions

.github/workflows/build-release.yml

Lines changed: 61 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Manual-only release build (workflow_dispatch). No push/tag triggers.
22
#
33
# - Git tag: creates v{versionName} from app/build.gradle.kts at the workflow commit (github.sha).
4-
# - Build target (workflow input build_target):
5-
# - github: filepipe-v{version}-github.apk (GitHub Releases / sideload; GitHub distribution flavor)
6-
# - playstore: filepipe-v{version}-playstore.aab (Play Store upload; playstore distribution flavor)
7-
# - both: builds and uploads both artifacts
4+
# - Build toggles:
5+
# - build_github: filepipe-v{version}-github.apk (GitHub Releases / sideload; GitHub distribution flavor)
6+
# - build_fdroid: filepipe-v{version}-fdroid.apk (F-Droid distribution flavor)
7+
# - build_playstore: filepipe-v{version}-playstore.aab (Play Store upload; playstore distribution flavor)
88
# - GitHub Release: always draft; publish from the Releases UI when ready.
99
# - Run from any branch (e.g. main); the tagged commit is the commit that was built.
1010
#
@@ -21,15 +21,21 @@ name: Build and release
2121
on:
2222
workflow_dispatch:
2323
inputs:
24-
build_target:
25-
description: "Which release artifact(s) to build."
24+
build_github:
25+
description: "Build GitHub APK."
2626
required: true
27-
default: both
28-
type: choice
29-
options:
30-
- both
31-
- github
32-
- playstore
27+
default: true
28+
type: boolean
29+
build_fdroid:
30+
description: "Build F-Droid APK."
31+
required: true
32+
default: true
33+
type: boolean
34+
build_playstore:
35+
description: "Build Play Store AAB."
36+
required: true
37+
default: true
38+
type: boolean
3339
play_track:
3440
description: "Upload AAB + Play listing (needs PLAY_SERVICE_ACCOUNT_JSON_B64). internal / beta (open testing) / production, or none to skip."
3541
required: true
@@ -85,8 +91,12 @@ jobs:
8591
- name: Validate build target
8692
run: |
8793
set -euo pipefail
88-
if [ "${{ inputs.play_track }}" != "none" ] && [ "${{ inputs.build_target }}" = "github" ]; then
89-
echo "Play upload requires build_target=playstore or build_target=both."
94+
if [ "${{ inputs.build_github }}" != "true" ] && [ "${{ inputs.build_fdroid }}" != "true" ] && [ "${{ inputs.build_playstore }}" != "true" ]; then
95+
echo "Enable at least one build toggle."
96+
exit 1
97+
fi
98+
if [ "${{ inputs.play_track }}" != "none" ] && [ "${{ inputs.build_playstore }}" != "true" ]; then
99+
echo "Play upload requires build_playstore=true."
90100
exit 1
91101
fi
92102
@@ -117,21 +127,17 @@ jobs:
117127
- name: Build selected release artifacts
118128
run: |
119129
set -euo pipefail
120-
case "${{ inputs.build_target }}" in
121-
github)
122-
./gradlew :app:assembleGithubRelease --no-configuration-cache
123-
;;
124-
playstore)
125-
./gradlew :app:bundlePlaystoreRelease --no-configuration-cache
126-
;;
127-
both)
128-
./gradlew :app:assembleGithubRelease :app:bundlePlaystoreRelease --no-configuration-cache
129-
;;
130-
*)
131-
echo "Unexpected build_target"
132-
exit 1
133-
;;
134-
esac
130+
gradle_tasks=()
131+
if [ "${{ inputs.build_github }}" = "true" ]; then
132+
gradle_tasks+=(":app:assembleGithubRelease")
133+
fi
134+
if [ "${{ inputs.build_fdroid }}" = "true" ]; then
135+
gradle_tasks+=(":app:assembleFdroidRelease")
136+
fi
137+
if [ "${{ inputs.build_playstore }}" = "true" ]; then
138+
gradle_tasks+=(":app:bundlePlaystoreRelease")
139+
fi
140+
./gradlew "${gradle_tasks[@]}" --no-configuration-cache
135141
136142
- name: Collect and rename release assets
137143
run: |
@@ -141,29 +147,35 @@ jobs:
141147
mkdir -p "$out"
142148
143149
github_apk="app/build/outputs/apk/github/release/app-github-release.apk"
150+
fdroid_apk="app/build/outputs/apk/fdroid/release/app-fdroid-release.apk"
144151
play_aab="app/build/outputs/bundle/playstoreRelease/app-playstore-release.aab"
145152
146-
case "${{ inputs.build_target }}" in
147-
github|both)
148-
if [ ! -f "$github_apk" ]; then
149-
echo "Expected GitHub flavor APK not found: $github_apk"
150-
find app/build/outputs/apk -name '*.apk' -print || true
151-
exit 1
152-
fi
153-
cp "$github_apk" "$out/filepipe-v${version}-github.apk"
154-
;;
155-
esac
153+
if [ "${{ inputs.build_github }}" = "true" ]; then
154+
if [ ! -f "$github_apk" ]; then
155+
echo "Expected GitHub flavor APK not found: $github_apk"
156+
find app/build/outputs/apk -name '*.apk' -print || true
157+
exit 1
158+
fi
159+
cp "$github_apk" "$out/filepipe-v${version}-github.apk"
160+
fi
156161
157-
case "${{ inputs.build_target }}" in
158-
playstore|both)
159-
if [ ! -f "$play_aab" ]; then
160-
echo "Expected Play Store bundle not found: $play_aab"
161-
find app/build/outputs/bundle -name '*.aab' -print || true
162-
exit 1
163-
fi
164-
cp "$play_aab" "$out/filepipe-v${version}-playstore.aab"
165-
;;
166-
esac
162+
if [ "${{ inputs.build_fdroid }}" = "true" ]; then
163+
if [ ! -f "$fdroid_apk" ]; then
164+
echo "Expected F-Droid flavor APK not found: $fdroid_apk"
165+
find app/build/outputs/apk -name '*.apk' -print || true
166+
exit 1
167+
fi
168+
cp "$fdroid_apk" "$out/filepipe-v${version}-fdroid.apk"
169+
fi
170+
171+
if [ "${{ inputs.build_playstore }}" = "true" ]; then
172+
if [ ! -f "$play_aab" ]; then
173+
echo "Expected Play Store bundle not found: $play_aab"
174+
find app/build/outputs/bundle -name '*.aab' -print || true
175+
exit 1
176+
fi
177+
cp "$play_aab" "$out/filepipe-v${version}-playstore.aab"
178+
fi
167179
168180
ls -la "$out"
169181

README.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
# FilePipe
22

3-
<img alt="FilePipe Banner" src="./fastlane/metadata/android/en-US/images/featureGraphic.png" />
3+
<img alt="FilePipe Banner" src="fastlane/metadata/android/en-US/images/featureGraphic.png" />
44

55
FilePipe turns your chaotic storage into a perfectly organized library — automatically.
66

77
Ever wish your Downloads folder would just sort itself? Or that all your videos would gather in one place regardless of which app saved them?
88

99
That's exactly what <b>FilePipe</b> does. Set a rule, pick a schedule, and let the pipes do the work. Move or copy any media to its rightful place.
1010

11+
## 📦 Downloads
12+
13+
[<img src="app/src/main/res/drawable-nodpi/badge_playstore.png" alt="Get FilePipe on Play Store" height="80">](https://play.google.com/store/apps/details?id=dev.bikram.filepipe)
14+
[<img src="app/src/main/res/drawable-nodpi/badge_github.png" alt="Get FilePipe on GitHub" height="80">](https://github.com/bikram-agarwal/FilePipe/releases/latest)
15+
<!-- Coming soon. Placeholder code.
16+
[<img src="app/src/main/res/drawable-nodpi/badge_fdroid.png" alt="Get FilePipe on F-Droid" height="80">](https://f-droid.org/packages/dev.bikram.filepipe)
17+
-->
18+
1119
## 🛠️ How to use
1220

1321
1. **Choose access mode**: `Selective Access` for granular control or `All Files Access` for ease of use.
@@ -61,50 +69,60 @@ That's exactly what <b>FilePipe</b> does. Set a rule, pick a schedule, and let t
6169
<table>
6270
<tr>
6371
<td width="33%" align="center" valign="top">
64-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/1_rules.jpg" alt="Home Page: Rules" width="300" /><br />
72+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/1_rules.jpg" alt="Home Page: Rules" width="300" /><br />
6573
</td>
6674
<td width="33%" align="center" valign="top">
67-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/2_multiselect.jpg" alt="Light & Dark themes." width="300" /><br />
75+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2_multiselect.jpg" alt="Light & Dark themes." width="300" /><br />
6876
</td>
6977
<td width="33%" align="center" valign="top">
70-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/8_settings.jpg" alt="Extensive theming options. Make it your own." width="300" /><br />
78+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/8_settings.jpg" alt="Extensive theming options. Make it your own." width="300" /><br />
7179
</td>
7280
</tr>
7381

7482
<tr>
7583
<td width="33%" align="center" valign="top">
76-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/3_templates.jpg" alt="Rule creation templates" width="300" /><br />
84+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/3_templates.jpg" alt="Rule creation templates" width="300" /><br />
7785
</td>
7886
<td width="33%" align="center" valign="top">
79-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/4_edit.jpg" alt="Rule editing" width="300" /><br />
87+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/4_edit.jpg" alt="Rule editing" width="300" /><br />
8088
</td>
8189
<td width="33%" align="center" valign="top">
82-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/5_icons.jpg" alt="Set icons or your choice of emoji" width="300" /><br />
90+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/5_icons.jpg" alt="Set icons or your choice of emoji" width="300" /><br />
8391
</td>
8492
</tr>
8593

8694
<tr>
8795
<td width="33%" align="center" valign="top">
88-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/6_history.jpg" alt="All runs saved in history." width="300" /><br />
96+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/6_history.jpg" alt="All runs saved in history" width="300" /><br />
8997
</td>
9098
<td width="33%" align="center" valign="top">
91-
<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/7_history.jpg" alt="Per file list. Option to undo." width="300" /><br />
99+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/7_history.jpg" alt="Per file list. Option to undo." width="300" /><br />
92100
</td>
93101
<td width="33%" align="center" valign="top">
94102
<video src="https://github.com/user-attachments/assets/99e8bd81-65b2-4961-908d-1d8a5a79b981" controls alt="FilePipe Intro." width="300" /><br />
95103
</td>
96104
</tr>
97105
</table>
98106

99-
---
100-
101-
## 📥 Download / links
102-
103-
- [**Play Store**](https://play.google.com/store/apps/details?id=dev.bikram.filepipe)
104-
- [**GitHub**](https://github.com/bikram-agarwal/FilePipe/releases/latest)
107+
<table>
108+
<tr>
109+
<td width="50%" align="center" valign="top">
110+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/tablet_1_rules.jpg" alt="Home Page: Rules" width="450" /><br />
111+
</td>
112+
<td width="50%" align="center" valign="top">
113+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/tablet_2_multiselect.jpg" alt="Home Page: Rules Multi-select" width="450" /><br />
114+
</td>
115+
</tr>
105116

106-
- [Project site](https://bikram-agarwal.github.io/filepipe/)
107-
- [Privacy policy](https://bikram-agarwal.github.io/filepipe/privacy)
117+
<tr>
118+
<td width="50%" align="center" valign="top">
119+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/tablet_3_history.jpg" alt="All runs saved in history" width="450" /><br />
120+
</td>
121+
<td width="50%" align="center" valign="top">
122+
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/tablet_4_settings.jpg" alt="Extensive theming options. Make it your own." width="450" /><br />
123+
</td>
124+
</tr>
125+
</table>
108126

109127
---
110128

app/build.gradle.kts

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ extensions.configure<ApplicationExtension>("android") {
5656
applicationId = filePipeApplicationId
5757
minSdk = 31
5858
targetSdk = 37
59-
versionCode = 385
60-
versionName = "3.8.5"
59+
versionCode = 386
60+
versionName = "3.8.6"
6161

6262
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
6363

@@ -127,6 +127,17 @@ extensions.configure<ApplicationExtension>("android") {
127127
buildConfig = true
128128
}
129129

130+
dependenciesInfo {
131+
includeInApk = false
132+
includeInBundle = false
133+
}
134+
135+
packaging {
136+
jniLibs {
137+
keepDebugSymbols += "**/libdatastore_shared_counter.so"
138+
}
139+
}
140+
130141
flavorDimensions += "distribution"
131142
productFlavors {
132143
create("github") {
@@ -138,6 +149,15 @@ extensions.configure<ApplicationExtension>("android") {
138149
buildConfigField("String", "CHANGELOG_GITHUB_REPO", "\"bikram-agarwal/filepipe\"")
139150
buildConfigField("String", "CHANGELOG_GITHUB_BRANCH", "\"main\"")
140151
}
152+
create("fdroid") {
153+
dimension = "distribution"
154+
applicationIdSuffix = ".gh"
155+
buildConfigField("String", "GITHUB_REPO", "\"bikram-agarwal/filepipe\"")
156+
buildConfigField("Boolean", "SHOW_UPDATES", "true")
157+
buildConfigField("Boolean", "USE_PLAY_IN_APP_UPDATES", "false")
158+
buildConfigField("String", "CHANGELOG_GITHUB_REPO", "\"bikram-agarwal/filepipe\"")
159+
buildConfigField("String", "CHANGELOG_GITHUB_BRANCH", "\"main\"")
160+
}
141161
create("playstore") {
142162
dimension = "distribution"
143163
buildConfigField("String", "GITHUB_REPO", "\"\"")
@@ -148,6 +168,13 @@ extensions.configure<ApplicationExtension>("android") {
148168
}
149169
}
150170

171+
sourceSets {
172+
getByName("fdroid") {
173+
java.directories.add("src/github/java")
174+
kotlin.directories.add("src/github/java")
175+
}
176+
}
177+
151178
androidResources {
152179
ignoreAssetsPattern = "IconKitchen.zip"
153180
}
@@ -223,6 +250,7 @@ dependencies {
223250

224251
// Hilt
225252
implementation(libs.hilt.android)
253+
compileOnly(libs.errorprone.annotations)
226254
ksp(libs.hilt.compiler)
227255

228256
// Room

app/src/fdroid/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
4+
</manifest>

0 commit comments

Comments
 (0)