Skip to content

Commit b9aeb4d

Browse files
authored
Merge branch 'main' into cleanup
2 parents 5d255b3 + 5457f48 commit b9aeb4d

File tree

1,986 files changed

+59725
-57126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,986 files changed

+59725
-57126
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ d6d6f93f2df24d89e7875756bddcba67059d16b2
440440
057dff3fbc728b169a0b3cfd3f36c9e25a49477c
441441
e3078a2eac2dd0f2bde939250b8fcb41a059a03e
442442
57958d263252e9914b2c25ef68bffedc1abc292e
443+
1bb384727b7857f3e804f864430cb73e5eebf508
443444

444445
# Removal of wildcards throughout the codebase
445446
c63e93a09f86e455ea8c1e9ba13e6ae572550957

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@ _Please, go through these checks before submitting the PR._
2525
- [ ] You have performed a self-review of your own code
2626
- [ ] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
2727
- [ ] UI Changes: You have tested your change using the [Google Accessibility Scanner](https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.auditor)
28+
29+
<!--- Uncomment this section ONLY if this PR introduces new resources (external libraries, icons etc)
30+
## Licenses
31+
_For each new external resource, add a row to the table below:_
32+
33+
| Library | Description | License |
34+
| --- | --- | --- |
35+
| Sample Icon Library | Sample Description | [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) |
36+
37+
**Maintainers:**
38+
39+
* [ ] Add the https://github.com/ankidroid/Anki-Android/labels/Licenses label
40+
* [ ] Update the [licenses](https://github.com/ankidroid/Anki-Android/wiki/Licences) wiki when merging
41+
--->

.github/workflows/assignees.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pull-requests: write
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/github-script@v7
16+
- uses: actions/github-script@v8
1717
with:
1818
script: |
1919

.github/workflows/codeql.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
workflow_dispatch:
16+
push:
17+
branches: [ "main", "*release*" ]
18+
pull_request:
19+
branches: [ "main", "*release*" ]
20+
schedule:
21+
- cron: '42 12 * * 1'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze (${{ matrix.language }})
26+
# Runner size impacts CodeQL analysis time. To learn more, please see:
27+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
28+
# - https://gh.io/supported-runners-and-hardware-resources
29+
# - https://gh.io/using-larger-runners (GitHub.com only)
30+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32+
permissions:
33+
# required for all workflows
34+
security-events: write
35+
36+
# required to fetch internal or private CodeQL packs
37+
packages: read
38+
39+
# only required for workflows in private repositories
40+
actions: read
41+
contents: read
42+
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
include:
47+
- language: actions
48+
build-mode: none
49+
- language: java-kotlin
50+
build-mode: manual
51+
- language: javascript-typescript
52+
build-mode: none
53+
- language: python
54+
build-mode: none
55+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
56+
# Use `c-cpp` to analyze code written in C, C++ or both
57+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
58+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
59+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
60+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
61+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
62+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v5
66+
67+
# Add any setup steps before running the `github/codeql-action/init` action.
68+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
69+
# or others). This is typically only required for manual builds.
70+
# - name: Setup runtime (example)
71+
# uses: actions/setup-example@v1
72+
73+
# Initializes the CodeQL tools for scanning.
74+
- name: Initialize CodeQL
75+
uses: github/codeql-action/init@v4
76+
with:
77+
languages: ${{ matrix.language }}
78+
build-mode: ${{ matrix.build-mode }}
79+
# If you wish to specify custom queries, you can do so here or in a config file.
80+
# By default, queries listed here will override any specified in a config file.
81+
# Prefix the list here with "+" to use these queries and those in the config file.
82+
83+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
84+
# queries: security-extended,security-and-quality
85+
86+
# AnkiDroid requires JDK21+ to build, current runners default to 17
87+
- name: Configure JDK
88+
if: matrix.language == 'java-kotlin'
89+
uses: actions/setup-java@v5
90+
with:
91+
distribution: "temurin"
92+
java-version: "21" # also change jitpack.yml
93+
94+
# If the analyze step fails for one of the languages you are analyzing with
95+
# "We were unable to automatically build your code", modify the matrix above
96+
# to set the build mode to "manual" for that language. Then modify this step
97+
# to build your code.
98+
# ℹ️ Command-line programs to run using the OS shell.
99+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
100+
- name: Run manual build steps
101+
if: matrix.build-mode == 'manual'
102+
shell: bash
103+
run: |
104+
./gradlew assemblePlayRelease
105+
106+
- name: Perform CodeQL Analysis
107+
uses: github/codeql-action/analyze@v4
108+
with:
109+
category: "/language:${{matrix.language}}"

.github/workflows/compare_apk_size.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
KEYALIAS: nrkeystorealias
3131
steps:
3232
- name: Configure JDK
33-
uses: actions/setup-java@v4
33+
uses: actions/setup-java@v5
3434
with:
3535
distribution: "temurin"
3636
java-version: "21"
@@ -43,13 +43,13 @@ jobs:
4343
shell: bash
4444

4545
- name: Setup Gradle
46-
uses: gradle/actions/setup-gradle@v4
46+
uses: gradle/actions/setup-gradle@v5
4747
timeout-minutes: 5
4848
with:
4949
cache-read-only: true
5050

5151
- name: Checkout PR
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@v5
5353
with:
5454
fetch-depth: 0
5555
ref: 'refs/pull/${{ github.event.inputs.prNumber }}/head'
@@ -84,7 +84,7 @@ jobs:
8484
run: echo OLDSIZE=`ls -lrt AnkiDroid/build/outputs/apk/play/release/AnkiDroid-play-arm64-v8a-release.apk | awk '{print $5}'` >> $GITHUB_ENV
8585

8686
- name: Post comment
87-
uses: actions/github-script@v7
87+
uses: actions/github-script@v8
8888
with:
8989
script: |
9090
var inputs = ${{ toJSON(inputs) }}

.github/workflows/conflict.yaml

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

1717
steps:
1818
- name: Check for conflicts and label conflict
19-
uses: actions/github-script@v7
19+
uses: actions/github-script@v8
2020
with:
2121
script: |
2222
async function getPullRequestList() {

.github/workflows/label.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
pull-requests: write
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/github-script@v7
15+
- uses: actions/github-script@v8
1616
with:
1717
script: |
1818
let removeLabelsList = [
@@ -78,7 +78,7 @@ jobs:
7878
pull-requests: write
7979
runs-on: ubuntu-latest
8080
steps:
81-
- uses: actions/github-script@v7
81+
- uses: actions/github-script@v8
8282
with:
8383
script: |
8484
const I18N_FILES = [
@@ -182,7 +182,7 @@ jobs:
182182
pull-requests: write
183183
runs-on: ubuntu-latest
184184
steps:
185-
- uses: actions/github-script@v7
185+
- uses: actions/github-script@v8
186186
with:
187187
script: |
188188
const creator = context.payload.sender.login

.github/workflows/lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ jobs:
1919
timeout-minutes: 20
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323
with:
2424
fetch-depth: 1
2525

2626
- name: Configure JDK
27-
uses: actions/setup-java@v4
27+
uses: actions/setup-java@v5
2828
with:
2929
distribution: "temurin"
3030
java-version: "21"
3131

3232
- name: Setup Gradle
33-
uses: gradle/actions/setup-gradle@v4
33+
uses: gradle/actions/setup-gradle@v5
3434
timeout-minutes: 5
3535
with:
3636
# Only write to the cache for builds on the 'main' branches, stops branches evicting main cache
@@ -52,14 +52,14 @@ jobs:
5252
# "lintPlayRelease" doesn't test androidTest
5353
# "lintPlayDebug" doesn't test the API
5454
# "lintVitalFullRelease": if `main` resources are only used in `androidTest` (#15741)
55-
run: ./gradlew lintPlayDebug :api:lintDebug ktLintCheck lintVitalFullRelease lint-rules:test --daemon
55+
run: ./gradlew lintPlayDebug :api:lintDebug :libanki:lintDebug ktLintCheck lintVitalFullRelease lint-rules:test --daemon
5656

5757
lintJavascript:
5858
name: Lint Javascript
5959
timeout-minutes: 20
6060
runs-on: ubuntu-latest
6161
steps:
62-
- uses: actions/checkout@v4
62+
- uses: actions/checkout@v5
6363
with:
6464
fetch-depth: 1
6565

@@ -69,7 +69,7 @@ jobs:
6969
# npm install --location=global prettier
7070
# prettier --check AnkiDroid/**/*.js
7171
- name: Prettify AnkiDroid javascript code
72-
uses: creyD/prettier_action@v4.5
72+
uses: creyD/prettier_action@v4.6
7373
with:
7474
prettier_options: --check AnkiDroid/**/*.js
7575
dry: True

.github/workflows/milestone.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
issues: write
1414
pull-requests: write
1515
steps:
16-
- uses: actions/github-script@v7
16+
- uses: actions/github-script@v8
1717
with:
1818
script: |
1919
await github.rest.issues.update({
2020
owner: context.repo.owner,
2121
repo: context.repo.repo,
2222
issue_number: ${{ github.event.pull_request.number }},
23-
milestone: 67
23+
milestone: 71
2424
});
2525
2626
// graphql query to get referenced issues to merged pull request
@@ -51,7 +51,7 @@ jobs:
5151
owner: context.repo.owner,
5252
repo: context.repo.repo,
5353
issue_number: issue.number,
54-
milestone: 67
54+
milestone: 71
5555
});
5656
}
5757

.github/workflows/opencollective_notices.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
pull-requests: write
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/github-script@v7
23+
- uses: actions/github-script@v8
2424
with:
2525
script: |
2626
// First get the month we are working on and prepare our PR query range

0 commit comments

Comments
 (0)