Skip to content

Commit

Permalink
Dependency updates 20230628 (ankidroid#14046)
Browse files Browse the repository at this point in the history
* Bump org.jlleitschuh.gradle:ktlint-gradle from 11.4.1 to 11.4.2

Bumps org.jlleitschuh.gradle:ktlint-gradle from 11.4.1 to 11.4.2.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): require JDK17 for the build, use JDK17 in workflows

17+ is a requirement for new AndroidX library versions, fragment library
lint rules in particular are already failing our lint workflow because
they no longer operate on JDK11

* Bump lint_version from 30.4.2 to 31.0.2

Bumps `lint_version` from 30.4.2 to 31.0.2.

Updates `com.android.tools.lint:lint-api` from 30.4.2 to 31.0.2

Updates `com.android.tools.lint:lint` from 30.4.2 to 31.0.2

Updates `com.android.tools.lint:lint-tests` from 30.4.2 to 31.0.2

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

Signed-off-by: dependabot[bot] <[email protected]>

* build: bump JDK source/target compat to JDK11

This is needed for new versions of deps, it passes
jacocoAndroidTestReport target against an API21 emulator (current
minSdkVersion) so seems to be compatible with all required things

* Bump org.mockito.kotlin:mockito-kotlin from 4.1.0 to 5.0.0

Bumps [org.mockito.kotlin:mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 4.1.0 to 5.0.0.
- [Release notes](https://github.com/mockito/mockito-kotlin/releases)
- [Commits](mockito/mockito-kotlin@4.1.0...5.0.0)

---
updated-dependencies:
- dependency-name: org.mockito.kotlin:mockito-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): have gradle wrapper update PRs go into dependencies

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
mikehardy and dependabot[bot] authored Jun 28, 2023
1 parent 57fa827 commit e2bec74
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11" # ubuntu-latest is about to default to 11, force it everywhere
java-version: "17" # newer libraries require 17 now, force it everywhere

- name: Verify JDK11
# Default JDK varies depending on different runner flavors, make sure we are on 11
# Run a check that exits with error unless it is 11 version to future-proof against unexpected upgrades
run: java -fullversion 2>&1 | grep '11.0'
- name: Verify JDK17
# Default JDK varies depending on different runner flavors, make sure we are on 17
# Run a check that exits with error unless it is 17 version to future-proof against unexpected upgrades
run: java -fullversion 2>&1 | grep '17.0'
shell: bash

- name: Setup Gradle
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11" # ubuntu-latest is about to default to 11, force it everywhere
java-version: "17" # newer libraries require 17 now, force it everywhere

- name: Verify JDK11
# Default JDK varies depending on different runner flavors, make sure we are on 11
# Run a check that exits with error unless it is 11 version to future-proof against unexpected upgrades
run: java -fullversion 2>&1 | grep '11.0'
- name: Verify JDK17
# Default JDK varies depending on different runner flavors, make sure we are on 17
# Run a check that exits with error unless it is 17 version to future-proof against unexpected upgrades
run: java -fullversion 2>&1 | grep '17.0'
shell: bash

- name: Install Release Utilities
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/tests_emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11" # ubuntu-latest is about to default to 11, force it everywhere
java-version: "17" # newer libraries require 17 now, force it everywhere

- name: Verify JDK17
# Default JDK varies depending on different runner flavors, make sure we are on 17
# Run a check that exits with error unless it is 17 version to future-proof against unexpected upgrades
run: java -fullversion 2>&1 | grep '17.0'
shell: bash

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11" # ubuntu-latest is about to default to 11, force it everywhere
java-version: "17" # newer libraries require 17 now, force it everywhere

- name: Verify JDK11
# Default JDK varies depending on different runner flavors, make sure we are on 11
# Run a check that exits with error unless it is 11 version to future-proof against unexpected upgrades
run: java -fullversion 2>&1 | grep '11.0'
- name: Verify JDK17
# Default JDK varies depending on different runner flavors, make sure we are on 17
# Run a check that exits with error unless it is 17 version to future-proof against unexpected upgrades
run: java -fullversion 2>&1 | grep '17.0'
shell: bash

- name: Setup Gradle
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
set-distribution-checksum: false
base-branch: dependency-updates
target-branch: dependency-updates
8 changes: 4 additions & 4 deletions AnkiDroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
coreLibraryDesugaringEnabled true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
jvmTarget = JavaVersion.VERSION_11
}
ndkVersion "22.0.7026061"
}
Expand Down Expand Up @@ -364,7 +364,7 @@ dependencies {

testImplementation "org.junit.vintage:junit-vintage-engine:$junit_version"
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0"
testImplementation "org.mockito.kotlin:mockito-kotlin:5.0.0"
testImplementation "org.hamcrest:hamcrest:$hamcrest_version"
testImplementation 'net.lachlanmckee:timber-junit-rule:1.0.1'
// robolectricDownloader.gradle *may* need a new SDK jar entry if they release one or if we change targetSdk. Instructions in that gradle file.
Expand Down
12 changes: 8 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.gradle.internal.jvm.Jvm
buildscript {
// The version for the Kotlin plugin and dependencies
ext.kotlin_version = '1.8.22'
ext.lint_version = '30.4.2' // 31.0.1 stopped running lint checks in CI
ext.lint_version = '31.0.2' // 31.0.1 stopped running lint checks in CI
ext.acra_version = '5.10.1'
ext.ankidroid_backend_version = '0.1.21-anki2.1.61'
ext.hamcrest_version = '2.2'
Expand All @@ -31,7 +31,7 @@ buildscript {
classpath "com.github.BrantApps.gradle-amazon-app-store-publisher:amazonappstorepublisher:master-SNAPSHOT"

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.4.1"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.4.2"
}
configurations.all {
resolutionStrategy.eachDependency { details ->
Expand Down Expand Up @@ -116,13 +116,17 @@ subprojects {
ext {

jvmVersion = Jvm.current().javaVersion.majorVersion
if (jvmVersion != "11" && jvmVersion != "17" && jvmVersion != "18") {
if (jvmVersion != "17" && jvmVersion != "18") {
println "\n\n\n"
println "**************************************************************************************************************"
println "\n\n\n"
println "ERROR: AnkiDroid builds with JVM version 11, 17 or 18."
println "ERROR: AnkiDroid builds with JVM version 17 or 18."
println " Incompatible major version detected: '" + jvmVersion + "'"
println "\n\n\n"
println " If you receive this error because you want to use a newer JDK, we may accept PRs to support new versions."
println " Edit the main build.gradle file, find this message in the file, and add support for the new version."
println " Please make sure the `jacocoTestReport` target works on an emulator with our minSdkVersion (currently 21)."
println "\n\n\n"
println "**************************************************************************************************************"
println "\n\n\n"
System.exit(1)
Expand Down

0 comments on commit e2bec74

Please sign in to comment.