Skip to content

Commit efc54ad

Browse files
authored
Update AGP and Dependencies (#71)
1 parent b461cc0 commit efc54ad

18 files changed

Lines changed: 159 additions & 96 deletions

File tree

.github/actionlint.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
paths:
2+
.github/workflows/**/*.{yml,yaml}:
3+
ignore:
4+
- '"inputs" section is alias node but mapping node is expected'
5+
- '"paths" section must be sequence node but got alias node with "" tag'
6+
- '"paths-ignore" section must be sequence node but got alias node with "" tag'

.github/workflows/draft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: "Checkout"
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323

2424
- name: "Draft Release Action"
2525
id: draft

.github/workflows/lint.yaml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,21 @@ jobs:
2020

2121
steps:
2222
- name: "Checkout"
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: "Debug event.json"
26-
if: ${{ !cancelled() }}
2726
continue-on-error: true
28-
run: |
29-
cat "${GITHUB_EVENT_PATH}"
27+
run: cat "${GITHUB_EVENT_PATH}"
28+
- name: "Debug CTX github"
29+
continue-on-error: true
30+
env:
31+
GITHUB_CTX: ${{ toJSON(github) }}
32+
run: echo "$GITHUB_CTX"
33+
- name: "Debug Environment"
34+
continue-on-error: true
35+
run: env
3036

31-
- name: "Kotlin Lint"
37+
- name: "ktlint"
3238
if: ${{ !cancelled() }}
3339
continue-on-error: true # TODO: Resolve KTLint Issues
3440
env:
@@ -41,36 +47,34 @@ jobs:
4147
${{ env.klint }} --version
4248
${{ env.klint }} --color 'app/src/main/java/**'
4349
44-
- name: "Prettier"
50+
- name: "prettier"
4551
if: ${{ !cancelled() }}
4652
run: |
4753
echo "::group::Install"
4854
npm install prettier
4955
echo "::endgroup::"
5056
npx prettier --check .
5157
52-
- name: "Yamllint"
58+
- name: "yamllint"
5359
if: ${{ !cancelled() }}
5460
env:
55-
CONFIG: "{extends: relaxed, ignore: [node_modules/,.github/disabled/], rules: {line-length: {max: 119}}}"
61+
CONFIG: .github/yamllint.yaml
5662
run: |
5763
echo "::group::List Files"
58-
yamllint -d '${{ env.CONFIG }}' --list-files .
64+
yamllint -c "${{ env.CONFIG }}" --list-files .
5965
echo "::endgroup::"
60-
yamllint -d '${{ env.CONFIG }}' .
66+
yamllint -c "${{ env.CONFIG }}" .
6167
62-
- name: "Actionlint"
68+
- name: "actionlint"
6369
if: ${{ !cancelled() }}
64-
run: |
65-
echo "::group::Download"
66-
loc=$(curl -sI https://github.com/rhysd/actionlint/releases/latest | grep -i '^location:')
67-
echo "loc: ${loc}"
68-
tag=$(echo "${loc}" | sed -E 's|.*/tag/v?(.*)|\1|' | tr -d '\t\r\n')
69-
echo "tag: ${tag}"
70-
url="https://github.com/rhysd/actionlint/releases/latest/download/actionlint_${tag}_linux_amd64.tar.gz"
71-
echo "url: ${url}"
72-
curl -sL "${url}" | tar xz -C "${RUNNER_TEMP}" actionlint
73-
file "${RUNNER_TEMP}/actionlint"
74-
"${RUNNER_TEMP}/actionlint" --version
75-
echo "::endgroup::"
76-
"${RUNNER_TEMP}/actionlint" -color -verbose -shellcheck= -pyflakes=
70+
uses: cssnr/actionlint-action@v1
71+
with:
72+
shellcheck_opts: -e SC2129
73+
74+
- name: "shellcheck"
75+
if: ${{ !cancelled() }}
76+
uses: ludeeus/action-shellcheck@master
77+
env:
78+
SHELLCHECK_OPTS: -x
79+
with:
80+
scandir: .github/scripts

.github/workflows/release.yaml

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: "Checkout"
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939

4040
- name: "Debug Event"
4141
continue-on-error: true
@@ -68,7 +68,7 @@ jobs:
6868
echo "::endgroup::"
6969
7070
- name: "Update Version"
71-
uses: chkfung/android-version-actions@v1.2.2
71+
uses: chkfung/android-version-actions@fcf89abef1c7afba2083146dcca0c6da4705ba4b # v1.2.3
7272
id: version
7373
with:
7474
gradlePath: ${{ env.gradle_file }}
@@ -97,10 +97,10 @@ jobs:
9797
9898
echo ${{ secrets.ANDROID_KEYSTORE_PASS }} | keytool -list -keystore ${{ env.key_file }}
9999
100-
- name: "Setup Node 22"
101-
uses: actions/setup-node@v4
100+
- name: "Setup Node 24"
101+
uses: actions/setup-node@v6
102102
with:
103-
node-version: 22
103+
node-version: 24
104104

105105
- name: "Prepare Build"
106106
working-directory: ".github/scripts"
@@ -114,7 +114,7 @@ jobs:
114114
ls -lAh app
115115
116116
- name: "Setup Java"
117-
uses: actions/setup-java@v4
117+
uses: actions/setup-java@v5
118118
with:
119119
distribution: "zulu"
120120
java-version: "17"
@@ -152,20 +152,17 @@ jobs:
152152
mv "${{ env.apk_path }}/${{ env.apk_file }}" "${{ env.apk_path }}/${{ env.signed_apk }}"
153153
154154
- name: "Upload APK to Artifacts"
155-
if: ${{ !github.event.act }}
156155
uses: actions/upload-artifact@v4
157156
with:
158157
name: release
159158
path: ${{ env.apk_path }}
160159

161160
- name: "Upload APK to Release"
162161
if: ${{ github.event_name == 'release' }}
163-
uses: svenstaro/upload-release-action@v2
162+
uses: cssnr/upload-release-action@v1
164163
with:
165-
file: ${{ env.apk_path }}/${{ env.signed_apk }}
166-
tag: ${{ github.ref }}
164+
files: ${{ env.apk_path }}/${{ env.signed_apk }}
167165
overwrite: true
168-
file_glob: true
169166

170167
#- name: "Gradle Bundle AAB"
171168
# if: ${{ !github.event.release.prerelease }}
@@ -178,11 +175,11 @@ jobs:
178175
# continue-on-error: true
179176
# run: |
180177
# echo "env.aab_path: ${{ env.aab_path }}"
181-
# ls -lAh ${{ env.aab_path }} ||:
178+
# ls -lAh "${{ env.aab_path }}" ||:
182179
# echo "env.debug_symbols: ${{ env.debug_symbols }}"
183-
# ls -lAh ${{ env.debug_symbols }} ||:
180+
# ls -lAh "${{ env.debug_symbols }}" ||:
184181
# echo "env.mapping_file: ${{ env.mapping_file }}"
185-
# ls -lAh $(dirname ${{ env.debug_symbols }}) ||:
182+
# ls -lAh "$(dirname "${{ env.debug_symbols }}")" ||:
186183

187184
#- name: "Sign Bundle"
188185
# if: ${{ !github.event.release.prerelease }}
@@ -197,21 +194,30 @@ jobs:
197194

198195
#- name: "Upload Bundle to Artifacts"
199196
# if: ${{ !github.event.release.prerelease }}
200-
# uses: actions/upload-artifact@v4
197+
# uses: actions/upload-artifact@v6
201198
# with:
202199
# name: bundle
203200
# path: ${{ env.aab_path }}
204201

202+
#- name: "Parse Release Notes"
203+
# if: ${{ github.event_name == 'release' && !github.event.release.prerelease }}
204+
# id: notes
205+
# run: |
206+
# body="${{ github.event.release.body }}"
207+
# summary="$(echo "${body%%#*}" | tr -d '\r' | sed ':a;N;$!ba;s/\n*$//')"
208+
# echo "summary<<EOF" >> "$GITHUB_OUTPUT"
209+
# echo "$summary" >> "$GITHUB_OUTPUT"
210+
# echo "EOF" >> "$GITHUB_OUTPUT"
211+
205212
#- name: "Generate Whats New"
206-
# if: ${{ !github.event.release.prerelease }}
213+
# if: ${{ github.event_name == 'release' && !github.event.release.prerelease }}
207214
# run: |
208215
# mkdir -p whatsNew
209-
# echo "GitHub Actions Build" > whatsNew/whatsnew-en-US
210-
# cat whatsNew/whatsnew-en-US
216+
# echo -n "${{ steps.notes.outputs.summary }}" > whatsNew/whatsnew-en-US
211217

212218
#- name: "Upload Google Play"
213219
# if: ${{ github.event_name == 'release' && !github.event.release.prerelease }}
214-
# uses: r0adkll/upload-google-play@v1
220+
# uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3
215221
# with:
216222
# serviceAccountJsonPlainText: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}
217223
# packageName: ${{ env.package_name }}
@@ -240,24 +246,24 @@ jobs:
240246
if: ${{ !github.event.act }}
241247
continue-on-error: true
242248
run: |
243-
echo -e "## Android Release\n\n" >> $GITHUB_STEP_SUMMARY
249+
echo -e "## Android Release\n\n" >> "$GITHUB_STEP_SUMMARY"
244250
245-
echo -e "Final APK: \`${{ env.signed_apk }}\`\n\n" >> $GITHUB_STEP_SUMMARY
251+
echo -e "Final APK: \`${{ env.signed_apk }}\`\n\n" >> "$GITHUB_STEP_SUMMARY"
246252
247-
echo -e "<details><summary>Build Artifacts</summary>\n\n" >> $GITHUB_STEP_SUMMARY
248-
echo -e "\`\`\`text\n$(ls -lAh ${{ env.apk_path }})\n\`\`\`\n\n" >> $GITHUB_STEP_SUMMARY
249-
echo -e "</details>\n\n" >> $GITHUB_STEP_SUMMARY
253+
echo -e "<details><summary>Build Artifacts</summary>\n\n" >> "$GITHUB_STEP_SUMMARY"
254+
echo -e "\`\`\`text\n$(ls -lAh ${{ env.apk_path }})\n\`\`\`\n\n" >> "$GITHUB_STEP_SUMMARY"
255+
echo -e "</details>\n\n" >> "$GITHUB_STEP_SUMMARY"
250256
251257
if [ -f "${{ env.apk_path }}/output-metadata.json" ];then
252-
echo -e "<details><summary>File: output-metadata.json</summary>\n\n" >> $GITHUB_STEP_SUMMARY
253-
echo -e "\`\`\`json\n$(cat ${{ env.apk_path }}/output-metadata.json)\n\`\`\`\n\n" >> $GITHUB_STEP_SUMMARY
254-
echo -e "</details>\n\n" >> $GITHUB_STEP_SUMMARY
258+
echo -e "<details><summary>File: output-metadata.json</summary>\n\n" >> "$GITHUB_STEP_SUMMARY"
259+
echo -e "\`\`\`json\n$(cat ${{ env.apk_path }}/output-metadata.json)\n\`\`\`\n\n" >> "$GITHUB_STEP_SUMMARY"
260+
echo -e "</details>\n\n" >> "$GITHUB_STEP_SUMMARY"
255261
fi
256262
257-
echo -e "\n\n---" >> $GITHUB_STEP_SUMMARY
263+
echo -e "\n\n---" >> "$GITHUB_STEP_SUMMARY"
258264
259265
- name: "Send Failure Notification"
260266
if: ${{ failure() && github.event_name == 'release' }}
261-
uses: sarisia/actions-status-discord@v1
267+
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
262268
with:
263269
webhook: ${{ secrets.DISCORD_WEBHOOK }}

.github/yamllint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: relaxed
2+
3+
ignore-from-file: .gitignore
4+
5+
rules:
6+
line-length:
7+
max: 119

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
[![Lint](https://img.shields.io/github/actions/workflow/status/django-files/android-client/lint.yaml?logo=github&logoColor=white&label=lint)](https://github.com/django-files/android-client/actions/workflows/lint.yaml)
55
[![Release](https://img.shields.io/github/actions/workflow/status/django-files/android-client/release.yaml?logo=github&logoColor=white&label=release)](https://github.com/django-files/android-client/actions/workflows/release.yaml)
66
[![AGP Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fdjango-files%2Fandroid-client%2Frefs%2Fheads%2Fmaster%2Fgradle%2Flibs.versions.toml&query=%24.versions.agp&logo=gradle&label=AGP)](https://github.com/django-files/android-client/blob/master/gradle/libs.versions.toml#L2)
7-
[![GitHub Repo Size](https://img.shields.io/github/repo-size/django-files/android-client?logo=bookstack&logoColor=white&label=repo%20size)](https://github.com/django-files/android-client)
8-
[![GitHub Top Language](https://img.shields.io/github/languages/top/django-files/android-client?logo=htmx)](https://github.com/django-files/android-client)
9-
[![GitHub Discussions](https://img.shields.io/github/discussions/django-files/android-client?logo=github)](https://github.com/django-files/android-client/discussions)
10-
[![GitHub Forks](https://img.shields.io/github/forks/django-files/android-client?style=flat&logo=github)](https://github.com/django-files/android-client/forks)
11-
[![GitHub Repo Stars](https://img.shields.io/github/stars/django-files/android-client?style=flat&logo=github)](https://github.com/django-files/android-client/stargazers)
12-
[![GitHub Org Stars](https://img.shields.io/github/stars/django-files?style=flat&logo=github&label=org%20stars)](https://django-files.github.io/)
7+
[![GitHub Last Commit](https://img.shields.io/github/last-commit/django-files/android-client?logo=listenhub&label=updated)](https://github.com/django-files/android-client/pulse)
8+
[![GitHub Repo Size](https://img.shields.io/github/repo-size/django-files/android-client?logo=buffer&label=repo%20size)](https://github.com/django-files/android-client?tab=readme-ov-file#readme)
9+
[![GitHub Top Language](https://img.shields.io/github/languages/top/django-files/android-client?logo=devbox)](https://github.com/django-files/android-client?tab=readme-ov-file#readme)
10+
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/django-files/android-client?logo=southwestairlines)](https://github.com/django-files/android-client/graphs/contributors)
11+
[![GitHub Issues](https://img.shields.io/github/issues/django-files/android-client?logo=codeforces&logoColor=white)](https://github.com/django-files/android-client/issues)
12+
[![GitHub Discussions](https://img.shields.io/github/discussions/django-files/android-client?logo=theconversation)](https://github.com/django-files/android-client/discussions)
13+
[![GitHub Forks](https://img.shields.io/github/forks/django-files/android-client?style=flat&logo=forgejo&logoColor=white)](https://github.com/django-files/android-client/forks)
14+
[![GitHub Repo Stars](https://img.shields.io/github/stars/django-files/android-client?style=flat&logo=gleam&logoColor=white)](https://github.com/django-files/android-client/stargazers)
15+
[![GitHub Org Stars](https://img.shields.io/github/stars/django-files?style=flat&logo=apachespark&logoColor=white&label=org%20stars)](https://django-files.github.io/)
1316
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
1417

1518
# Django Files Android App
@@ -338,3 +341,11 @@ You can also support other related projects:
338341
- [Django Files iOS App](https://github.com/django-files/ios-client)
339342
- [Django Files Android App](https://github.com/django-files/android-client)
340343
- [Django Files Web Extension](https://github.com/django-files/web-extension)
344+
345+
<a href="https://github.com/django-files/android-client/stargazers">
346+
<picture>
347+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=django-files/android-client&type=date&legend=bottom-right&theme=dark" />
348+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=django-files/android-client&type=date&legend=bottom-right" />
349+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=django-files/android-client&type=date&legend=bottom-right" />
350+
</picture>
351+
</a>

Taskfile.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# yaml-language-server: $schema=https://taskfile.dev/schema.json
2+
version: "3"
3+
4+
tasks:
5+
lint:
6+
desc: Lint
7+
cmds:
8+
- prettier --check .
9+
- yamllint -c .github/yamllint.yaml .
10+
- actionlint -shellcheck="-e SC2129"
11+
- shellcheck .github/scripts/prepare.sh
12+
13+
format:
14+
desc: Format
15+
aliases: [fmt]
16+
cmd: |
17+
prettier --write .
18+
19+
build:
20+
desc: Build (recommended android studio)
21+
vars:
22+
GRADLEW: 'gradlew{{if eq OS "windows"}}.bat{{end}}'
23+
cmd: |
24+
./{{.GRADLEW}} assemble {{.CLI_ARGS}}

app/build.gradle.kts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import com.android.build.api.dsl.ApplicationExtension
12
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
33
import java.util.Properties
44

55
plugins {
66
alias(libs.plugins.android.application)
7-
alias(libs.plugins.kotlin.android)
7+
//alias(libs.plugins.kotlin.android)
88
//alias(libs.plugins.kotlin.kapt)
99
alias(libs.plugins.ksp)
1010
alias(libs.plugins.google.services)
@@ -15,7 +15,7 @@ plugins {
1515
//id("androidx.navigation.safeargs.kotlin") version "2.8.9" // Use the correct version
1616
}
1717

18-
android {
18+
configure<ApplicationExtension> {
1919
namespace = "com.djangofiles.djangofiles"
2020
compileSdk = 36
2121

@@ -66,11 +66,11 @@ android {
6666
//kotlinOptions {
6767
// jvmTarget = "17"
6868
//}
69-
tasks.withType<KotlinJvmCompile>().configureEach {
70-
compilerOptions {
71-
jvmTarget.set(JvmTarget.JVM_17)
72-
}
73-
}
69+
//tasks.withType<KotlinJvmCompile>().configureEach {
70+
// compilerOptions {
71+
// jvmTarget.set(JvmTarget.JVM_17)
72+
// }
73+
//}
7474

7575
buildFeatures {
7676
viewBinding = true
@@ -79,6 +79,8 @@ android {
7979
}
8080
}
8181

82+
kotlin { compilerOptions { jvmTarget.set(JvmTarget.JVM_17) } }
83+
8284
dependencies {
8385
implementation(libs.androidx.core.ktx)
8486
implementation(libs.androidx.appcompat)

app/src/main/java/com/djangofiles/djangofiles/db/AlbumDao.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ data class AlbumEntity(
7272
)
7373

7474

75-
@Database(entities = [AlbumEntity::class], version = 1)
75+
@Database(entities = [AlbumEntity::class], version = 1, exportSchema = false)
7676
abstract class AlbumDatabase : RoomDatabase() {
7777
abstract fun albumDao(): AlbumDao
7878

app/src/main/java/com/djangofiles/djangofiles/db/ServerDao.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ data class Server(
5959
)
6060

6161

62-
@Database(entities = [Server::class], version = 3)
62+
@Database(entities = [Server::class], version = 3, exportSchema = false)
6363
abstract class ServerDatabase : RoomDatabase() {
6464
abstract fun serverDao(): ServerDao
6565

0 commit comments

Comments
 (0)