chore: Update dependencies and expand test coverage#46
Conversation
atorch
commented
Mar 7, 2026
- Bump minSdkVersion from 19 to 21
- Migrate mXparser from v4.2.0 (local JAR) to v6.1.0 (Maven)
- Update AndroidX libraries to latest stable versions
- Update Kotlin from 1.7.10 to 2.2.20
- Add comprehensive test coverage for math parser functionality
- Bump minSdkVersion from 19 to 21 - Migrate mXparser from v4.2.0 (local JAR) to v6.1.0 (Maven) - Update AndroidX libraries to latest stable versions - Update Kotlin from 1.7.10 to 2.2.20 - Add comprehensive test coverage for math parser functionality
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Android app’s dependency stack (including the math parser) and expands unit tests around mathematical expression parsing/answer checking.
Changes:
- Bump
minSdkVersionto 21 and update several AndroidX/Material dependencies. - Migrate mXparser usage from a local JAR to the Maven artifact (
MathParser.org-mXparser:6.1.0) and update the in-app string referencing the parser version. - Add a broad set of new unit tests covering additional math-parser inputs (percentages, constants, spacing, equivalences, etc.).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/build.gradle | Updates min SDK and swaps mXparser from local JAR usage to a Maven dependency; refreshes AndroidX/Material/Kotlin stdlib versions. |
| app/src/test/java/atorch/statspuzzles/AnswerCheckerTest.java | Adds extensive new unit coverage for expression formats and constants supported by the parser. |
| app/src/main/res/values/strings.xml | Updates the user-facing “new in this update” text to reference the new mXparser version. |
| app/libs/mXparser-v.4.2.0-jdk.1.7.jar | Legacy local JAR referenced by the PR’s migration context (binary change not shown in diff). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
| androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' | ||
| androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.1' | ||
| implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: []) |
There was a problem hiding this comment.
The module still includes a local fileTree(dir: 'libs', include: ['*.aar', '*.jar']) dependency, but there is no app/libs directory in the repo. Since this PR migrates mXparser to Maven, consider removing this fileTree (or narrowing it to specific artifacts) to avoid confusion and accidental re-introduction of local JARs later.
| implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: []) |
| @Test | ||
| public void testIncorrectAnswer() { | ||
| assertEquals(AnswerChecker.Result.INCORRECT, AnswerChecker.checkAnswer("1", "2")); | ||
| assertEquals(AnswerChecker.Result.INCORRECT, AnswerChecker.checkAnswer("0.50", "0.49")); |
There was a problem hiding this comment.
There is a stray tab-indented assertion here; it’s inconsistent with the surrounding indentation and may fail style checks. Please align it with the other assertEquals lines (spaces, same indent level).
| assertEquals(AnswerChecker.Result.INCORRECT, AnswerChecker.checkAnswer("0.50", "0.49")); | |
| assertEquals(AnswerChecker.Result.INCORRECT, AnswerChecker.checkAnswer("0.50", "0.49")); |