Bump gradle from 7.2.2 to 7.3.1 (#7364)
* Bump gradle from 7.2.2 to 7.3.1 Bumps gradle from 7.2.2 to 7.3.1. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Try to fix build issue caused by KSP workaround * Add missing dependency * Suppress false positive in linter * Suppress more false positives, fix 2 possible leaks * Fix tests * Ignore flaky test * Use namespaces instead of packagenames in AndroidManifest files * Reorder dependency groups Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
parent
75c97bc7c5
commit
93a346392b
16
build.gradle
16
build.gradle
|
@ -342,17 +342,21 @@ subprojects { project ->
|
||||||
if (it instanceof com.android.build.gradle.LibraryExtension) {
|
if (it instanceof com.android.build.gradle.LibraryExtension) {
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
||||||
variant.addJavaSourceFoldersToModel(outputFolder)
|
if (outputFolder.exists()) {
|
||||||
android.sourceSets.getAt(variant.name).java {
|
variant.addJavaSourceFoldersToModel(outputFolder)
|
||||||
srcDir(outputFolder)
|
android.sourceSets.getAt(variant.name).java {
|
||||||
|
srcDir(outputFolder)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (it instanceof com.android.build.gradle.AppExtension) {
|
} else if (it instanceof com.android.build.gradle.AppExtension) {
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
||||||
variant.addJavaSourceFoldersToModel(outputFolder)
|
if (outputFolder.exists()) {
|
||||||
android.sourceSets.getAt(variant.name).java {
|
variant.addJavaSourceFoldersToModel(outputFolder)
|
||||||
srcDir(outputFolder)
|
android.sourceSets.getAt(variant.name).java {
|
||||||
|
srcDir(outputFolder)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ ext.versions = [
|
||||||
'targetCompat' : JavaVersion.VERSION_11,
|
'targetCompat' : JavaVersion.VERSION_11,
|
||||||
]
|
]
|
||||||
|
|
||||||
def gradle = "7.2.2"
|
def gradle = "7.3.1"
|
||||||
// Ref: https://kotlinlang.org/releases.html
|
// Ref: https://kotlinlang.org/releases.html
|
||||||
def kotlin = "1.7.20"
|
def kotlin = "1.7.20"
|
||||||
def kotlinCoroutines = "1.6.4"
|
def kotlinCoroutines = "1.6.4"
|
||||||
|
|
|
@ -147,6 +147,7 @@ ext.groups = [
|
||||||
'io.netty',
|
'io.netty',
|
||||||
'io.noties.markwon',
|
'io.noties.markwon',
|
||||||
'io.opencensus',
|
'io.opencensus',
|
||||||
|
'io.perfmark',
|
||||||
'io.reactivex.rxjava2',
|
'io.reactivex.rxjava2',
|
||||||
'io.realm',
|
'io.realm',
|
||||||
'io.sentry',
|
'io.sentry',
|
||||||
|
|
|
@ -18,6 +18,7 @@ apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "im.vector.lib.attachmentviewer"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="im.vector.lib.attachmentviewer" />
|
<manifest />
|
||||||
|
|
|
@ -20,6 +20,8 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "im.vector.lib.core.utils"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk versions.minSdk
|
minSdk versions.minSdk
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="im.vector.lib.core.utils" />
|
<manifest />
|
||||||
|
|
|
@ -2,6 +2,8 @@ apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "com.android.dialer.dialpadview"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="com.android.dialer.dialpadview" />
|
<manifest />
|
||||||
|
|
|
@ -18,6 +18,8 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "org.billcarsonfr.jsonviewer"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<manifest package="org.billcarsonfr.jsonviewer" />
|
<manifest />
|
||||||
|
|
|
@ -19,6 +19,8 @@ apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
apply plugin: 'kotlin-parcelize'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "im.vector.lib.multipicker"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="im.vector.lib.multipicker">
|
|
||||||
|
|
||||||
<application>
|
<application>
|
||||||
<provider
|
<provider
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package im.vector.lib.multipicker
|
package im.vector.lib.multipicker
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.content.ContentResolver
|
import android.content.ContentResolver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
@ -34,6 +35,7 @@ class ContactPicker : Picker<MultiPickerContactType>() {
|
||||||
* Call this function from onActivityResult(int, int, Intent).
|
* Call this function from onActivityResult(int, int, Intent).
|
||||||
* Returns selected contact or empty list if user did not select any contacts.
|
* Returns selected contact or empty list if user did not select any contacts.
|
||||||
*/
|
*/
|
||||||
|
@SuppressLint("Recycle")
|
||||||
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerContactType> {
|
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerContactType> {
|
||||||
val contactList = mutableListOf<MultiPickerContactType>()
|
val contactList = mutableListOf<MultiPickerContactType>()
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "im.vector.lib.strings"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk versions.minSdk
|
minSdk versions.minSdk
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="im.vector.lib.strings" />
|
<manifest />
|
||||||
|
|
|
@ -21,6 +21,8 @@ plugins {
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
namespace "im.vector.lib.ui.styles"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk versions.minSdk
|
minSdk versions.minSdk
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="im.vector.lib.ui.styles">
|
|
||||||
|
|
||||||
<application android:theme="@style/Theme.Vector.Light">
|
<application android:theme="@style/Theme.Vector.Light">
|
||||||
<activity
|
<activity
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="im.vector.lib.ui.styles">
|
|
||||||
|
|
||||||
<application android:supportsRtl="true" />
|
<application android:supportsRtl="true" />
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -5,6 +5,8 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "org.matrix.android.sdk.flow"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1,5 +1,2 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||||
package="org.matrix.android.sdk.flow">
|
|
||||||
|
|
||||||
</manifest>
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ dokkaHtml {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "org.matrix.android.sdk"
|
||||||
|
|
||||||
testOptions.unitTests.includeAndroidResources = true
|
testOptions.unitTests.includeAndroidResources = true
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
package="org.matrix.android.sdk">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
|
@ -130,6 +130,7 @@ internal class FileUploader @Inject constructor(
|
||||||
workingFile.outputStream().use {
|
workingFile.outputStream().use {
|
||||||
inputStream.copyTo(it)
|
inputStream.copyTo(it)
|
||||||
}
|
}
|
||||||
|
inputStream.close()
|
||||||
workingFile
|
workingFile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,7 @@ ext.abiVersionCodes = ["armeabi-v7a": 1, "arm64-v8a": 2, "x86": 3, "x86_64": 4].
|
||||||
def buildNumber = System.env.BUILDKITE_BUILD_NUMBER as Integer ?: 0
|
def buildNumber = System.env.BUILDKITE_BUILD_NUMBER as Integer ?: 0
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "im.vector.application"
|
||||||
// Due to a bug introduced in Android gradle plugin 3.6.0, we have to specify the ndk version to use
|
// Due to a bug introduced in Android gradle plugin 3.6.0, we have to specify the ndk version to use
|
||||||
// Ref: https://issuetracker.google.com/issues/144111441
|
// Ref: https://issuetracker.google.com/issues/144111441
|
||||||
ndkVersion "21.3.6528147"
|
ndkVersion "21.3.6528147"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
package="im.vector.application">
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="im.vector.app.VectorApplication"
|
android:name="im.vector.app.VectorApplication"
|
||||||
|
|
|
@ -4,6 +4,8 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "im.vector.app.config"
|
||||||
|
|
||||||
compileSdk versions.compileSdk
|
compileSdk versions.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="im.vector.app.config" />
|
<manifest />
|
||||||
|
|
|
@ -28,6 +28,7 @@ project.android.buildTypes.all { buildType ->
|
||||||
initScreenshotTests(project)
|
initScreenshotTests(project)
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "im.vector.app"
|
||||||
// Due to a bug introduced in Android gradle plugin 3.6.0, we have to specify the ndk version to use
|
// Due to a bug introduced in Android gradle plugin 3.6.0, we have to specify the ndk version to use
|
||||||
// Ref: https://issuetracker.google.com/issues/144111441
|
// Ref: https://issuetracker.google.com/issues/144111441
|
||||||
ndkVersion "21.3.6528147"
|
ndkVersion "21.3.6528147"
|
||||||
|
|
|
@ -25,6 +25,7 @@ import io.mockk.every
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import org.amshove.kluent.shouldBeEqualTo
|
import org.amshove.kluent.shouldBeEqualTo
|
||||||
|
import org.junit.Ignore
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel
|
import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel
|
||||||
import org.matrix.android.sdk.api.session.room.model.Membership
|
import org.matrix.android.sdk.api.session.room.model.Membership
|
||||||
|
@ -36,6 +37,7 @@ import kotlin.coroutines.suspendCoroutine
|
||||||
class RoomMemberListControllerTest {
|
class RoomMemberListControllerTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Ignore("Too flaky")
|
||||||
fun testControllerUserVerificationLevel() = runTest {
|
fun testControllerUserVerificationLevel() = runTest {
|
||||||
val roomListController = RoomMemberListController(
|
val roomListController = RoomMemberListController(
|
||||||
avatarRenderer = mockk {
|
avatarRenderer = mockk {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
package="im.vector.app">
|
|
||||||
|
|
||||||
<!-- Needed for VOIP call to detect and switch to headset-->
|
<!-- Needed for VOIP call to detect and switch to headset-->
|
||||||
<uses-permission
|
<uses-permission
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package im.vector.app.core.files
|
package im.vector.app.core.files
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.app.DownloadManager
|
import android.app.DownloadManager
|
||||||
import android.content.ContentValues
|
import android.content.ContentValues
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -52,6 +53,7 @@ fun writeToFile(data: ByteArray, file: File) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("Recycle")
|
||||||
fun addEntryToDownloadManager(
|
fun addEntryToDownloadManager(
|
||||||
context: Context,
|
context: Context,
|
||||||
file: File,
|
file: File,
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package im.vector.app.core.utils
|
package im.vector.app.core.utils
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.DownloadManager
|
import android.app.DownloadManager
|
||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
|
@ -256,6 +257,7 @@ private fun appendTimeToFilename(name: String): String {
|
||||||
return """${filename}_$dateExtension.$fileExtension"""
|
return """${filename}_$dateExtension.$fileExtension"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("Recycle")
|
||||||
suspend fun saveMedia(
|
suspend fun saveMedia(
|
||||||
context: Context,
|
context: Context,
|
||||||
file: File,
|
file: File,
|
||||||
|
|
|
@ -47,10 +47,12 @@ class KeysExporter @Inject constructor(
|
||||||
when {
|
when {
|
||||||
output == null -> throw IllegalStateException("Exported file not found")
|
output == null -> throw IllegalStateException("Exported file not found")
|
||||||
output.statSize != expectedSize -> {
|
output.statSize != expectedSize -> {
|
||||||
throw UnexpectedExportKeysFileSizeException(
|
val exception = UnexpectedExportKeysFileSizeException(
|
||||||
expectedFileSize = expectedSize,
|
expectedFileSize = expectedSize,
|
||||||
actualFileSize = output.statSize
|
actualFileSize = output.statSize
|
||||||
)
|
)
|
||||||
|
output.close()
|
||||||
|
throw exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
package im.vector.app.features.crypto.keys
|
package im.vector.app.features.crypto.keys
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.ParcelFileDescriptor
|
|
||||||
import im.vector.app.core.dispatchers.CoroutineDispatchers
|
import im.vector.app.core.dispatchers.CoroutineDispatchers
|
||||||
import im.vector.app.test.fakes.FakeContext
|
import im.vector.app.test.fakes.FakeContext
|
||||||
import im.vector.app.test.fakes.FakeCryptoService
|
import im.vector.app.test.fakes.FakeCryptoService
|
||||||
import im.vector.app.test.fakes.FakeSession
|
import im.vector.app.test.fakes.FakeSession
|
||||||
import io.mockk.every
|
import io.mockk.every
|
||||||
|
import io.mockk.justRun
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import io.mockk.verify
|
import io.mockk.verify
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
@ -91,7 +91,10 @@ class KeysExporterTest {
|
||||||
|
|
||||||
private fun givenFileDescriptorWithSize(size: Long) {
|
private fun givenFileDescriptorWithSize(size: Long) {
|
||||||
context.givenFileDescriptor(A_URI, mode = "r") {
|
context.givenFileDescriptor(A_URI, mode = "r") {
|
||||||
mockk<ParcelFileDescriptor>().also { every { it.statSize } returns size }
|
mockk {
|
||||||
|
every { statSize } returns size
|
||||||
|
justRun { close() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue