Skip to content

Commit 0008fcd

Browse files
Merge branch 'main' into feature/sort-by-standard
2 parents f184ee0 + 2bed1ad commit 0008fcd

9 files changed

Lines changed: 78 additions & 37 deletions

File tree

.github/actions/common-setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ runs:
44
using: 'composite'
55
steps:
66
- name: Set up JDK
7-
uses: actions/setup-java@v4
7+
uses: actions/setup-java@v5
88
with:
99
distribution: zulu
1010
java-version: 21

.github/workflows/android-ci.yml

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,73 +21,83 @@ on:
2121

2222
jobs:
2323
ktlint:
24-
runs-on: ubuntu-22.04
24+
runs-on: ubuntu-24.04
2525
steps:
26-
- uses: actions/checkout@v4
27-
- uses: ./.github/actions/common-setup
26+
- name: Checkout
27+
uses: actions/checkout@v6
28+
- name: Common setup
29+
uses: ./.github/actions/common-setup
2830
- name: ktlint check
2931
run: bash ./gradlew ktlintCheck --stacktrace
3032
- name: Upload ktlint report
31-
uses: actions/upload-artifact@v4
33+
uses: actions/upload-artifact@v7
3234
with:
3335
name: ktlint-report
3436
path: app/build/reports/ktlint
3537

3638
lint:
37-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-24.04
3840
steps:
39-
- uses: actions/checkout@v4
40-
- uses: ./.github/actions/common-setup
41+
- name: Checkout
42+
uses: actions/checkout@v6
43+
- name: Common setup
44+
uses: ./.github/actions/common-setup
4145
- name: lint
4246
run: bash ./gradlew lintDebug --stacktrace
4347
- name: Upload lint report
44-
uses: actions/upload-artifact@v4
48+
uses: actions/upload-artifact@v7
4549
with:
4650
name: lint-report
4751
path: app/build/reports/lint-results*.*
4852

4953
test:
50-
runs-on: ubuntu-22.04
54+
runs-on: ubuntu-24.04
5155
steps:
52-
- uses: actions/checkout@v4
53-
- uses: ./.github/actions/common-setup
56+
- name: Checkout
57+
uses: actions/checkout@v6
58+
- name: Common setup
59+
uses: ./.github/actions/common-setup
5460
- name: unit tests
5561
run: bash ./gradlew testDebugUnitTest --stacktrace
5662
- name: Upload test results
57-
uses: actions/upload-artifact@v4
63+
uses: actions/upload-artifact@v7
5864
with:
5965
name: test-results
6066
path: app/build/reports/tests
6167

6268
coverage:
63-
runs-on: ubuntu-22.04
69+
runs-on: ubuntu-24.04
6470
needs: test
6571
steps:
66-
- uses: actions/checkout@v4
67-
- uses: ./.github/actions/common-setup
72+
- name: Checkout
73+
uses: actions/checkout@v6
74+
- name: Common setup
75+
uses: ./.github/actions/common-setup
6876
- name: coverage
6977
run: bash ./gradlew jacocoTestCoverageVerification --stacktrace
7078
- name: Upload JaCoCo report
71-
uses: actions/upload-artifact@v4
79+
uses: actions/upload-artifact@v7
7280
with:
7381
name: jacoco-report
7482
path: app/build/reports/jacoco
7583
- name: upload coverage to Codecov
76-
uses: codecov/codecov-action@v4
84+
uses: codecov/codecov-action@v6
7785
with:
7886
token: ${{ secrets.CODECOV_TOKEN }}
7987
file: ./app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml
8088

8189
build-apk:
82-
runs-on: ubuntu-22.04
90+
runs-on: ubuntu-24.04
8391
needs: [ktlint, lint, test, coverage]
8492
steps:
85-
- uses: actions/checkout@v4
86-
- uses: ./.github/actions/common-setup
93+
- name: Checkout
94+
uses: actions/checkout@v6
95+
- name: Common setup
96+
uses: ./.github/actions/common-setup
8797
- name: build apk
8898
run: bash ./gradlew assembleDebug --stacktrace
8999
- name: artifact apk
90-
uses: actions/upload-artifact@v4
100+
uses: actions/upload-artifact@v7
91101
with:
92102
name: artifact-apk
93103
path: app/build/outputs/apk/debug
@@ -100,7 +110,7 @@ jobs:
100110
matrix:
101111
api-level: [35]
102112
steps:
103-
- uses: actions/checkout@v4
113+
- uses: actions/checkout@v6
104114
- uses: ./.github/actions/common-setup
105115
- name: Enable KVM
106116
run: |
@@ -110,7 +120,7 @@ jobs:
110120
- name: Gradle cache
111121
uses: gradle/actions/setup-gradle@v4
112122
- name: AVD cache
113-
uses: actions/cache@v4
123+
uses: actions/cache@v5
114124
id: avd-cache
115125
with:
116126
path: |
@@ -131,13 +141,13 @@ jobs:
131141
api-level: ${{ matrix.api-level }}
132142
script: ./gradlew connectedDebugAndroidTest -x assembleDebug -x assembleDebugAndroidTest
133143
- name: Upload test results
134-
uses: actions/upload-artifact@v4
144+
uses: actions/upload-artifact@v7
135145
if: always()
136146
with:
137147
name: emulator-test-results-${{ matrix.api-level }}
138148
path: app/build/reports/androidTests
139149
- name: Publish test results
140-
uses: mikepenz/action-junit-report@v5
150+
uses: mikepenz/action-junit-report@v6
141151
if: always()
142152
with:
143153
report_paths: 'app/build/outputs/androidTest-results/connected/**/*.xml'

.github/workflows/close-empty-xml.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout PR branch
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v6
1313
- name: Fetch base branch
1414
run: |
1515
git fetch origin ${{ github.event.pull_request.base.ref }}

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ jobs:
3030
language: [ 'java-kotlin' ]
3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v6
3434
- name: set up JDK 21
35-
uses: actions/setup-java@v4
35+
uses: actions/setup-java@v5
3636
with:
3737
distribution: 'zulu'
3838
java-version: '21'

.github/workflows/compare-src.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ubuntu-latest
5757
steps:
5858
- name: Checkout WiFiAnalyzer
59-
uses: actions/checkout@v4
59+
uses: actions/checkout@v6
6060
with:
6161
path: wifianalyzer
6262
- name: Clone target repository
@@ -99,7 +99,7 @@ jobs:
9999
find filtered_targetrepo -type f | sort > right_files.txt || true
100100
comm -3 left_files.txt right_files.txt > file_changes.txt || true
101101
- name: Upload diff and summary as artifacts
102-
uses: actions/upload-artifact@v4
102+
uses: actions/upload-artifact@v7
103103
with:
104104
name: src-comparison
105105
path: |
@@ -128,12 +128,12 @@ jobs:
128128
echo "Warning: targetrepo/gradlew not found; proceeding without wrapper"
129129
fi
130130
- name: Set up JDK 17
131-
uses: actions/setup-java@v4
131+
uses: actions/setup-java@v5
132132
with:
133133
distribution: 'temurin'
134134
java-version: '17'
135135
- name: Cache Gradle
136-
uses: actions/cache@v4
136+
uses: actions/cache@v5
137137
with:
138138
path: |
139139
~/.gradle/caches
@@ -162,7 +162,7 @@ jobs:
162162
- name: Upload APKs if present
163163
if: always()
164164
continue-on-error: true
165-
uses: actions/upload-artifact@v4
165+
uses: actions/upload-artifact@v7
166166
with:
167167
name: targetrepo-apks
168168
path: |

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
issues: write
1010
pull-requests: write
1111
steps:
12-
- uses: actions/stale@v9
12+
- uses: actions/stale@v10
1313
with:
1414
repo-token: ${{ secrets.GITHUB_TOKEN }}
1515
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ WiFiAnalyzer is an Android application for analyzing WiFi networks. It helps use
2222
| Code Style | ktlint |
2323
| License | GNU General Public License v3.0 (GPLv3) |
2424

25+
clearAdditional repository-specific versions and toolchain (source-of-truth files shown):
26+
27+
- Kotlin: 2.3.20 (top-level `build.gradle` ext.kotlin_version)
28+
- Android Gradle Plugin (AGP): 9.1.1 (top-level `build.gradle` classpath `com.android.tools.build:gradle:9.1.1`)
29+
- Note: the top-level `build.gradle` also adds `gradlePluginPortal()` to repositories and includes additional classpath entries used by the build:
30+
- `org.jetbrains.kotlin:kotlin-allopen:$kotlin_version`
31+
- `com.github.ben-manes:gradle-versions-plugin:0.53.0`
32+
- Gradle wrapper: 9.4.1 (`gradle/wrapper/gradle-wrapper.properties` distributionUrl)
33+
- JDK: 21 is used in CI and repository setup (`.github/actions/common-setup/action.yml` and `.github/workflows/*` use setup-java with `java-version: 21`). Note: project `compileOptions` and `kotlinOptions.jvmTarget` are set to Java 17 in `app/build.gradle`.
34+
- Android compile/target SDK: compileSdk = 36, minSdk = 24 (see `app/build.gradle`).
35+
2536
## Project Structure
2637

2738
```
@@ -66,6 +77,10 @@ All source files must include the GPLv3 license header:
6677
Use ktlint for code formatting:
6778
- Check: `./gradlew ktlintCheck`
6879
- Format: `./gradlew ktlintFormat`
80+
81+
Repository-specific ktlint notes:
82+
- Plugin configured in `app/build.gradle` as `org.jlleitschuh.gradle.ktlint` (version `14.2.0`).
83+
- Baseline and rules: see `app/config/ktlint/baseline.xml` and project `.editorconfig` for formatting rules.
6984

7085
## Testing Requirements
7186

@@ -162,6 +177,22 @@ class MainActivityInstrumentedTest {
162177
| Run tests with coverage | `./gradlew jacocoTestCoverageVerification` |
163178
| Run instrumented tests | `./gradlew connectedDebugAndroidTest` |
164179

180+
### CI / GitHub Actions (what the repo runs)
181+
182+
- Workflows:
183+
- `.github/workflows/android-ci.yml` — main Android CI pipeline (jobs: ktlint, lint, test, coverage, build-apk, emulator-test). Runners use `ubuntu-24.04` / `ubuntu-latest` and a composite action `.github/actions/common-setup` to install JDK 21 and Gradle.
184+
- `.github/workflows/codeql-analysis.yml` — CodeQL analysis (language: `java-kotlin`, uses JDK 21).
185+
186+
- Important CI details and artifact/report locations (useful for reproducing or debugging locally):
187+
- ktlint report: `app/build/reports/ktlint` (CI uploads as `ktlint-report`).
188+
- lint report: `app/build/reports/lint-results*.*` (CI uploads as `lint-report`).
189+
- unit test reports: `app/build/reports/tests` (CI uploads as `test-results`). The unit test task invoked is `:app:testDebugUnitTest` / `./gradlew testDebugUnitTest`.
190+
- JaCoCo report (CI expects the XML): `app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml` (uploaded to Codecov using `secrets.CODECOV_TOKEN`).
191+
- APK artifact: `app/build/outputs/apk/debug` (uploaded as `artifact-apk`).
192+
- Instrumentation / emulator test outputs: `app/build/reports/androidTests` and `app/build/outputs/androidTest-results/connected/**/*.xml` for JUnit XMLs.
193+
194+
- Emulator job notes: the GitHub Action enables KVM, caches AVD (`~/.android/avd/*`) and runs `./gradlew connectedDebugAndroidTest`. Emulator caching and KVM are required for the `emulator-test` job in `android-ci.yml`.
195+
165196
## Privacy and Security Guidelines
166197

167198
1. **No Data Collection**: WiFiAnalyzer does not collect any personal/device information

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
// Compile Build Dependencies
3434
implementation fileTree(include: ["*.jar"], dir: "libs")
3535
implementation 'com.google.android.material:material:1.13.0'
36-
implementation 'androidx.annotation:annotation:1.9.1'
36+
implementation 'androidx.annotation:annotation:1.10.0'
3737
implementation 'androidx.appcompat:appcompat:1.7.1'
3838
implementation 'androidx.collection:collection-ktx:1.6.0'
3939
implementation 'androidx.core:core-ktx:1.18.0'

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ buildscript {
2828
gradlePluginPortal() // Added for plugin resolution
2929
}
3030
dependencies {
31-
classpath 'com.android.tools.build:gradle:9.1.0'
31+
classpath 'com.android.tools.build:gradle:9.1.1'
3232
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
3333
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
3434
classpath "com.github.ben-manes:gradle-versions-plugin:0.53.0"

0 commit comments

Comments
 (0)