0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 20:03:05 +02:00
Commit Graph

126 Commits

Author SHA1 Message Date
dependabot[bot]
4246143fa6 build(deps): bump annotation from 1.2.0 to 1.3.0
Bumps annotation from 1.2.0 to 1.3.0.

---
updated-dependencies:
- dependency-name: androidx.annotation:annotation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-04 20:45:40 -05:00
Mike Hardy
0e43472891 fix(android, api31): implement compileSdkVersion 31 compatibility
- added new CompatV31 object to compat infrastructure
- handled MediaRecorder() ctor deprecation by threading Context through, adding new Compat method
- handled Context.VIBRATOR_SERVICE deprecation with recommended new APIs in CompatV31 override
2021-11-04 17:03:01 -05:00
Mike Hardy
4bdb52ce11 build(deps): allow robolectric to move past previous api28 pin
robolectric api29+ required java9+ which was previously out of reach for us
when updating robolectric

Now with Android Studio 2020+ we are on JDK11 as a default, so this remnant
api28 pin may be removed

Reform the CI-flake-busting robolectric download to grab the new android.jar
implementations for api28+
2021-10-18 23:48:24 +01:00
David Allison
30d62a94c4 lint: pause 'copyright' error on legacy files
We need to get copyright for these, but want to disable
the lint warning for now so we can enable it as an error
on tests to prevent users from forgetting the header

Issue 8659 - getting the copyright
Issue 9538 - enable lint warnings on tests
2021-10-09 09:40:08 -05:00
dependabot[bot]
217e92deca build(deps): bump junit-vintage-engine from 5.8.0 to 5.8.1
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.8.0 to 5.8.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.8.0...r5.8.1)

---
updated-dependencies:
- dependency-name: org.junit.vintage:junit-vintage-engine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-28 12:32:36 -05:00
Mike Hardy
e8cb5562d7
Dependency updates 20210921 (#9534)
* build(deps): bump mockito-inline from 3.11.2 to 3.12.0

Bumps [mockito-inline](https://github.com/mockito/mockito) from 3.11.2 to 3.12.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.11.2...v3.12.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump mockito-inline from 3.12.0 to 3.12.1

Bumps [mockito-inline](https://github.com/mockito/mockito) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.12.0...v3.12.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump kotlin_version from 1.5.21 to 1.5.30

Bumps `kotlin_version` from 1.5.21 to 1.5.30.

Updates `kotlin-gradle-plugin` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

Updates `kotlin-stdlib` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

Updates `kotlin-stdlib-jdk7` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

Updates `kotlin-reflect` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk7
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump mockito-inline from 3.12.1 to 3.12.3

Bumps [mockito-inline](https://github.com/mockito/mockito) from 3.12.1 to 3.12.3.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.12.1...v3.12.3)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump mockito-inline from 3.12.3 to 3.12.4

Bumps [mockito-inline](https://github.com/mockito/mockito) from 3.12.3 to 3.12.4.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.12.3...v3.12.4)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump jackson-databind from 2.12.4 to 2.12.5

Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.4 to 2.12.5.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump gradle from 7.0.1 to 7.0.2

Bumps gradle from 7.0.1 to 7.0.2.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump lint_version from 30.0.1 to 30.0.2

Bumps `lint_version` from 30.0.1 to 30.0.2.

Updates `lint-api` from 30.0.1 to 30.0.2

Updates `lint` from 30.0.1 to 30.0.2

Updates `lint-tests` from 30.0.1 to 30.0.2

---
updated-dependencies:
- dependency-name: com.android.tools.lint:lint-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump junit-vintage-engine from 5.7.2 to 5.8.0

Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.7.2 to 5.8.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.0)

---
updated-dependencies:
- dependency-name: org.junit.vintage:junit-vintage-engine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump protobuf-java from 3.17.3 to 3.18.0

Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf) from 3.17.3 to 3.18.0.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.17.3...v3.18.0)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump kotlin_version from 1.5.30 to 1.5.31

Bumps `kotlin_version` from 1.5.30 to 1.5.31.

Updates `kotlin-gradle-plugin` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

Updates `kotlin-stdlib` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

Updates `kotlin-stdlib-jdk7` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

Updates `kotlin-reflect` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk7
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 22:19:41 -05:00
Dennis Titze
f39b7fa10f fix links to point to new documentation 2021-09-21 17:05:25 -05:00
Mike Hardy
5dae9d90f9 build(deps): bump android gradle plugin to 7.0.0
- ignore bcprov via ignorelist, can remove w/AGP7.1+ https://issuetracker.google.com/issues/159151549#comment12
- Triple-T publisher needs a switch to their agp7.0 track
- Obsolete versionCode/version/dexOptions removed (suggested by AGP migration task in Android Studio)
- AGP 7+ requires JDK11 to run, retire JDK8 from development
2021-07-31 14:58:53 -05:00
David Allison
fcf111c329 lint: remove "debug" config
After moving to AGP 7, we can no longer apply lintConfig on
`task.doFirst`

Since we're not using the baseline/debug config, we might as well
simplify this file and remove the implementation.

Baseline usage was never properly implemented, and was on Travis CI
which we are no longer using.

Related: 9338
2021-07-31 14:58:53 -05:00
Mike Hardy
eebe6bdff8
Dependency updates 20210713 (#9258)
* Bump lint_version from 27.2.1 to 27.2.2

Bumps `lint_version` from 27.2.1 to 27.2.2.

Updates `lint-api` from 27.2.1 to 27.2.2

Updates `lint` from 27.2.1 to 27.2.2

Updates `lint-tests` from 27.2.1 to 27.2.2

---
updated-dependencies:
- dependency-name: com.android.tools.lint:lint-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump robolectric from 4.5.1 to 4.6.1 (#9208)

* Bump lint_version from 27.2.1 to 27.2.2

Bumps `lint_version` from 27.2.1 to 27.2.2.

Updates `lint-api` from 27.2.1 to 27.2.2

Updates `lint` from 27.2.1 to 27.2.2

Updates `lint-tests` from 27.2.1 to 27.2.2

---
updated-dependencies:
- dependency-name: com.android.tools.lint:lint-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump robolectric from 4.5.1 to 4.6.1

Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.5.1 to 4.6.1.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.5.1...robolectric-4.6.1)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Ignore bcprov during jetifier runs

- jetifier still needed because of old material dialogs version, pending kotlin migration
- jetifier cannot handle JDK15 bytecode because of some other internal dependency with bcprov
- bcprov does not need jetifier processing though, so skipping it is okay

https://github.com/robolectric/robolectric/issues/6521#issuecomment-851736355

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Hardy <github@mikehardy.net>

* build(deps): bump jsoup from 1.13.1 to 1.14.1

Bumps [jsoup](https://github.com/jhy/jsoup) from 1.13.1 to 1.14.1.
- [Release notes](https://github.com/jhy/jsoup/releases)
- [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES)
- [Commits](https://github.com/jhy/jsoup/compare/jsoup-1.13.1...jsoup-1.14.1)

---
updated-dependencies:
- dependency-name: org.jsoup:jsoup
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump kotlin_version from 1.5.20 to 1.5.21

Bumps `kotlin_version` from 1.5.20 to 1.5.21.

Updates `kotlin-gradle-plugin` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Updates `kotlin-stdlib` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Updates `kotlin-stdlib-jdk7` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-16 10:09:11 -05:00
David Allison
aae98e787f api: Don't publish lint.jar
Our lint checks are internal and not for consumers.

Added in 018c1db71f

lintChecks performs the checks for the project
lintPublish publishes the checks into the aar

https://developer.android.com/studio/build/dependencies#dependency_configurations

Fixes 9214
2021-07-07 17:36:00 -05:00
David Allison
66b7ea6b19 api: ignore failing lint checks
In prep for 9214, which enables lint

Lint was previously disabled by accident
2021-07-07 17:36:00 -05:00
David Allison
1a08c583f3 Extract Kotlin version to variable
Review comment: keeps all Kotlin modules in sync

Note: adding this to the `ext { }` section didn't work for the main
build.gradle, but would be a better solution

Using
https://stackoverflow.com/questions/64834818/android-studio-could-not-get-unknown-property-kotlin-version
2021-06-23 23:16:23 -05:00
Shridhar
49a98af859 Migrate UiUtil to Kotlin 2021-05-28 20:12:33 +02:00
Mike Hardy
bd37e05495
Dependency updates 20210522 (#8906)
* Bump junit-vintage-engine from 5.7.1 to 5.7.2

Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.7.1...r5.7.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump fragment from 1.3.3 to 1.3.4

Bumps fragment from 1.3.3 to 1.3.4.

Signed-off-by: dependabot[bot] <support@github.com>

* Bump fragment-testing from 1.3.3 to 1.3.4

Bumps fragment-testing from 1.3.3 to 1.3.4.

Signed-off-by: dependabot[bot] <support@github.com>

* Bump annotations from 20.1.0 to 21.0.0

Bumps [annotations](https://github.com/JetBrains/java-annotations) from 20.1.0 to 21.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/20.1.0...21.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

* chore(dependencies): bump appcompat (rc01->stable) and some test only deps

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-22 12:19:03 -05:00
Mike Hardy
e21aaaf945 Remove unused libs dependency from AnkiDroid+api build.gradle
This was vestigial - it existed since the Eclipse build, prior to gradle build
7 years ago, and we have never vendored libs as far as I know. Removing
2021-04-24 11:48:36 -05:00
Mike Hardy
61cb6c3f05 Update to gradle 7.0
- API publishing needed a complete overhaul, tested locally, works
- JCenter is still needed for AnkiDroid as noted unfortunately...couple months to go
- Some artifact resolution performance complaints but local testing shows every single thing works
2021-04-15 23:21:34 -05:00
Mike Hardy
2d67ba15e7
Dependency updates 20210327 (#8362)
* Bump activity from 1.2.1 to 1.2.2

Bumps activity from 1.2.1 to 1.2.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump fragment-testing from 1.3.1 to 1.3.2

Bumps fragment-testing from 1.3.1 to 1.3.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump fragment from 1.3.1 to 1.3.2

Bumps fragment from 1.3.1 to 1.3.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump annotation from 1.1.0 to 1.2.0

Bumps annotation from 1.1.0 to 1.2.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-27 12:15:46 -05:00
Arthur Milchior
ec4eaf3678 Remove allow_empty from card projection
No idea:
1. why it was not detected by tests (they were passing when merged)
2. I added them here, were they clearly have nothing to do

Fixes #8311
2021-03-22 11:43:10 +01:00
Arthur Milchior
0e28ebd64c NF: Add options to control adding note with only empty card
Nothing is changed here, however it will help the next commit to follow anki 2.1.28
2021-03-22 07:04:56 +01:00
dependabot-preview[bot]
3870b01bba Bump junit-vintage-engine from 5.7.0 to 5.7.1
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.7.0 to 5.7.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.7.0...r5.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-10 11:34:17 -05:00
dependabot-preview[bot]
eb7087c0d7 Bump robolectric from 4.5 to 4.5.1
Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.5 to 4.5.1.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.5...robolectric-4.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-10 11:34:17 -05:00
dependabot-preview[bot]
e5a3b0a9ed Bump robolectric from 4.4 to 4.5
Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.4 to 4.5.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.4...robolectric-4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-10 11:34:17 -05:00
Mike Hardy
20900641d9
Update URL of API module upload tutorial 2020-12-20 14:01:32 -05:00
Mike Hardy
4bd36354d2
Fix javadoc parameter names in AddContentApi method
They all had trailing ':' on them, easy fix
2020-12-20 13:59:37 -05:00
Mike Hardy
037a61dba4
Fix javadoc compile classpath for API module 2020-12-20 13:58:39 -05:00
Mike Hardy
f5d4d9d0f9
Bump API version code to match version 2020-12-20 13:52:34 -05:00
Danny
d12cb05934 Bump API to 1.1.0 2020-12-20 13:50:21 -05:00
Mike Hardy
a656c7fc1f Bump API compileSdkVersion to 30 2020-12-20 13:22:29 -05:00
Arthur Milchior
480d3bf092 NF: remove redundant variable warning 2020-12-13 08:28:05 -05:00
Arthur Milchior
5128cc2c75 NF: init capacity of list, map and set 2020-12-09 11:27:39 -05:00
Arthur Milchior
5e7768fe1d NF: same for getDeckName (never called actually) 2020-10-28 22:46:26 -05:00
Arthur Milchior
3e4824db5f NF: simplify getModelName
This return null if data absent. It's always call with `long`
2020-10-28 22:46:26 -05:00
Arthur Milchior
84f1d231ad NF: Quicker split field
The function split is optimized for splitting around a char. We never used it because instead we used unicode encoding
in regexp. This small change will save plenty of time for all batch processing.
2020-10-23 13:38:06 -05:00
dependabot-preview[bot]
b16ac83de2 Bump junit-vintage-engine from 5.6.2 to 5.7.0
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.6.2 to 5.7.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.6.2...r5.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-04 17:19:10 -05:00
Mike Hardy
c602fd36be Update Robolectric to 4.4 / API to 29 in API project
This transitively required a bump to minSdkVersion 14 from 8
2020-10-04 17:19:10 -05:00
Kieran Brannigan
4d2cf42b05
Add media file insert to AnkiDroid API (#6641)
* Add AnkiMedia class to FlashCardsContract.java

* Add MEDIA uri to ContentProvider

* Insert MEDIA adds media file and returns Uri fname

* addMediaFromUri returns proper formatted String

This formatted string can be returned and inserted straight into the
field of a card.

* Replace assert call

Assert doesn't work in java, but if it ever gets fixed it could cause crashes. Best not to use it.

* Change StackTrace to specific Timber warning

* Refactor insert MEDIA case into a function call

* Improve documentation

* Add Nullable and NotNull annotations

* Extract internalizeUri to FileUtil.java

* Add example to javadoc

* Convert Timber.e to Timber.w

* Use temp-media cache dir instead of media.dir()

* Change annotations to androidx

UnitTest was throwing linting error because we were using jetbrains
annotations.

* Apply suggestions from code review

Co-authored-by: Mike Hardy <github@mikehardy.net>
2020-10-04 14:14:50 -05:00
Arthur Milchior
516bb9c1fa NF: remove C-style array 2020-09-30 22:55:33 +01:00
Arthur Milchior
a079a61fc0 NF: suppress warning of redundant escape when it does not seems redundant 2020-09-28 08:29:08 -05:00
Arthur Milchior
975a902915 NF: Remove warning about useless type in generic class constructors 2020-09-24 09:30:56 -05:00
Arthur Milchior
1f785c1b8c NF: Remove warning about parameter that could be final 2020-09-23 11:08:06 -05:00
David Allison
6d3342d6a7 DOCS: Fix JavaDoc compile errors
<pre> doesn't seem to be happy in a <p> (checked in validator)
2020-09-21 09:01:50 -05:00
Arthur Milchior
f4857037ce NF: supress warning for charset object
Because actually, it can't be used with our lowest version of the API supported
2020-09-21 07:16:02 -05:00
lukstbit
018c1db71f Update severity for time related lint violations 2020-08-30 18:24:56 -05:00
lukstbit
de3f38ee37 Add lint checks for new time api 2020-08-25 10:04:26 +02:00
David Allison
447647b84e LINT api: consistent noinspection OldTargetApi
Matches AnkiDroid folder
2020-06-04 20:52:55 -05:00
David Allison
99430e49b1 Upgrade API to Java 1.8 to allow JDK 14 compilation
Fixes #5955
2020-06-04 20:52:55 -05:00
Mike Hardy
4265acb367 Turn on most lint checks but filter by current baseline
If this is correct then future lint errors should break the build,
while existing ones will pass.

This should put a cap on the accretion of new lint while we start
to whittle down the existing pile
2020-05-15 12:00:07 -05:00
dependabot-preview[bot]
57e06706f3 Bump junit-vintage-engine from 5.6.1 to 5.6.2
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.6.1 to 5.6.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.6.1...r5.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-30 14:45:21 -05:00
Mike Hardy
cb49fb552e Upgrade to robolectric 4.3.1 with new Looper mode
This involved handling some timer differences, and accessing Context differently

The only troubling part was in AbstractFlashcardViewerTest - there's a thorny timing
issue there which I solved by coarsely hacking in a sleep
2020-04-13 14:48:58 -05:00