mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +03:00
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
35 changed files with 64 additions and 33 deletions
|
@ -342,14 +342,17 @@ subprojects { project ->
|
|||
if (it instanceof com.android.build.gradle.LibraryExtension) {
|
||||
libraryVariants.all { variant ->
|
||||
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
||||
if (outputFolder.exists()) {
|
||||
variant.addJavaSourceFoldersToModel(outputFolder)
|
||||
android.sourceSets.getAt(variant.name).java {
|
||||
srcDir(outputFolder)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (it instanceof com.android.build.gradle.AppExtension) {
|
||||
applicationVariants.all { variant ->
|
||||
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
||||
if (outputFolder.exists()) {
|
||||
variant.addJavaSourceFoldersToModel(outputFolder)
|
||||
android.sourceSets.getAt(variant.name).java {
|
||||
srcDir(outputFolder)
|
||||
|
@ -359,4 +362,5 @@ subprojects { project ->
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ ext.versions = [
|
|||
'targetCompat' : JavaVersion.VERSION_11,
|
||||
]
|
||||
|
||||
def gradle = "7.2.2"
|
||||
def gradle = "7.3.1"
|
||||
// Ref: https://kotlinlang.org/releases.html
|
||||
def kotlin = "1.7.20"
|
||||
def kotlinCoroutines = "1.6.4"
|
||||
|
|
|
@ -147,6 +147,7 @@ ext.groups = [
|
|||
'io.netty',
|
||||
'io.noties.markwon',
|
||||
'io.opencensus',
|
||||
'io.perfmark',
|
||||
'io.reactivex.rxjava2',
|
||||
'io.realm',
|
||||
'io.sentry',
|
||||
|
|
|
@ -18,6 +18,7 @@ apply plugin: 'com.android.library'
|
|||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
namespace "im.vector.lib.attachmentviewer"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="im.vector.lib.attachmentviewer" />
|
||||
<manifest />
|
||||
|
|
|
@ -20,6 +20,8 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace "im.vector.lib.core.utils"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
defaultConfig {
|
||||
minSdk versions.minSdk
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="im.vector.lib.core.utils" />
|
||||
<manifest />
|
||||
|
|
2
library/external/dialpad/build.gradle
vendored
2
library/external/dialpad/build.gradle
vendored
|
@ -2,6 +2,8 @@ apply plugin: 'com.android.library'
|
|||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
namespace "com.android.dialer.dialpadview"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.android.dialer.dialpadview" />
|
||||
<manifest />
|
||||
|
|
2
library/external/jsonviewer/build.gradle
vendored
2
library/external/jsonviewer/build.gradle
vendored
|
@ -18,6 +18,8 @@ buildscript {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace "org.billcarsonfr.jsonviewer"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
|
|
|
@ -1 +1 @@
|
|||
<manifest package="org.billcarsonfr.jsonviewer" />
|
||||
<manifest />
|
||||
|
|
|
@ -19,6 +19,8 @@ apply plugin: 'kotlin-android'
|
|||
apply plugin: 'kotlin-parcelize'
|
||||
|
||||
android {
|
||||
namespace "im.vector.lib.multipicker"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="im.vector.lib.multipicker">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application>
|
||||
<provider
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package im.vector.lib.multipicker
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.ContentResolver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
@ -34,6 +35,7 @@ class ContactPicker : Picker<MultiPickerContactType>() {
|
|||
* Call this function from onActivityResult(int, int, Intent).
|
||||
* Returns selected contact or empty list if user did not select any contacts.
|
||||
*/
|
||||
@SuppressLint("Recycle")
|
||||
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerContactType> {
|
||||
val contactList = mutableListOf<MultiPickerContactType>()
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace "im.vector.lib.strings"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
defaultConfig {
|
||||
minSdk versions.minSdk
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="im.vector.lib.strings" />
|
||||
<manifest />
|
||||
|
|
|
@ -21,6 +21,8 @@ plugins {
|
|||
|
||||
android {
|
||||
|
||||
namespace "im.vector.lib.ui.styles"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
defaultConfig {
|
||||
minSdk versions.minSdk
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="im.vector.lib.ui.styles">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application android:theme="@style/Theme.Vector.Light">
|
||||
<activity
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="im.vector.lib.ui.styles">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application android:supportsRtl="true" />
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace "org.matrix.android.sdk.flow"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.matrix.android.sdk.flow">
|
||||
|
||||
</manifest>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
|
|
|
@ -43,6 +43,8 @@ dokkaHtml {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace "org.matrix.android.sdk"
|
||||
|
||||
testOptions.unitTests.includeAndroidResources = true
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.matrix.android.sdk">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
|
|
@ -130,6 +130,7 @@ internal class FileUploader @Inject constructor(
|
|||
workingFile.outputStream().use {
|
||||
inputStream.copyTo(it)
|
||||
}
|
||||
inputStream.close()
|
||||
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
|
||||
|
||||
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
|
||||
// Ref: https://issuetracker.google.com/issues/144111441
|
||||
ndkVersion "21.3.6528147"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="im.vector.application">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:name="im.vector.app.VectorApplication"
|
||||
|
|
|
@ -4,6 +4,8 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace "im.vector.app.config"
|
||||
|
||||
compileSdk versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?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)
|
||||
|
||||
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
|
||||
// Ref: https://issuetracker.google.com/issues/144111441
|
||||
ndkVersion "21.3.6528147"
|
||||
|
|
|
@ -25,6 +25,7 @@ import io.mockk.every
|
|||
import io.mockk.mockk
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.amshove.kluent.shouldBeEqualTo
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel
|
||||
import org.matrix.android.sdk.api.session.room.model.Membership
|
||||
|
@ -36,6 +37,7 @@ import kotlin.coroutines.suspendCoroutine
|
|||
class RoomMemberListControllerTest {
|
||||
|
||||
@Test
|
||||
@Ignore("Too flaky")
|
||||
fun testControllerUserVerificationLevel() = runTest {
|
||||
val roomListController = RoomMemberListController(
|
||||
avatarRenderer = mockk {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="im.vector.app">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Needed for VOIP call to detect and switch to headset-->
|
||||
<uses-permission
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package im.vector.app.core.files
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.DownloadManager
|
||||
import android.content.ContentValues
|
||||
import android.content.Context
|
||||
|
@ -52,6 +53,7 @@ fun writeToFile(data: ByteArray, file: File) {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressLint("Recycle")
|
||||
fun addEntryToDownloadManager(
|
||||
context: Context,
|
||||
file: File,
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package im.vector.app.core.utils
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.app.DownloadManager
|
||||
import android.content.ActivityNotFoundException
|
||||
|
@ -256,6 +257,7 @@ private fun appendTimeToFilename(name: String): String {
|
|||
return """${filename}_$dateExtension.$fileExtension"""
|
||||
}
|
||||
|
||||
@SuppressLint("Recycle")
|
||||
suspend fun saveMedia(
|
||||
context: Context,
|
||||
file: File,
|
||||
|
|
|
@ -47,10 +47,12 @@ class KeysExporter @Inject constructor(
|
|||
when {
|
||||
output == null -> throw IllegalStateException("Exported file not found")
|
||||
output.statSize != expectedSize -> {
|
||||
throw UnexpectedExportKeysFileSizeException(
|
||||
val exception = UnexpectedExportKeysFileSizeException(
|
||||
expectedFileSize = expectedSize,
|
||||
actualFileSize = output.statSize
|
||||
)
|
||||
output.close()
|
||||
throw exception
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
package im.vector.app.features.crypto.keys
|
||||
|
||||
import android.net.Uri
|
||||
import android.os.ParcelFileDescriptor
|
||||
import im.vector.app.core.dispatchers.CoroutineDispatchers
|
||||
import im.vector.app.test.fakes.FakeContext
|
||||
import im.vector.app.test.fakes.FakeCryptoService
|
||||
import im.vector.app.test.fakes.FakeSession
|
||||
import io.mockk.every
|
||||
import io.mockk.justRun
|
||||
import io.mockk.mockk
|
||||
import io.mockk.verify
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -91,7 +91,10 @@ class KeysExporterTest {
|
|||
|
||||
private fun givenFileDescriptorWithSize(size: Long) {
|
||||
context.givenFileDescriptor(A_URI, mode = "r") {
|
||||
mockk<ParcelFileDescriptor>().also { every { it.statSize } returns size }
|
||||
mockk {
|
||||
every { statSize } returns size
|
||||
justRun { close() }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue