fix: Update libs and SDK to 32

This commit is contained in:
J-Jamet
2022-08-02 22:25:19 +02:00
parent ab23ec6d4d
commit b606909c65
6 changed files with 21 additions and 24 deletions

View File

@@ -93,7 +93,7 @@ android {
}
}
def room_version = "2.4.2"
def room_version = "2.4.3"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
@@ -101,14 +101,14 @@ dependencies {
implementation "androidx.appcompat:appcompat:$android_appcompat_version"
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.biometric:biometric:1.1.0'
implementation 'androidx.media:media:1.6.0'
// Lifecycle - LiveData - ViewModel - Coroutines
implementation "androidx.core:core-ktx:$android_core_version"
implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation 'androidx.fragment:fragment-ktx:1.5.1'
implementation "com.google.android.material:material:$android_material_version"
// Token auto complete
// From sources until https://github.com/splitwise/TokenAutoComplete/pull/422 fixed

View File

@@ -56,7 +56,7 @@ class ExternalFileHelper {
fun buildOpenDocument(onFileSelected: ((uri: Uri?) -> Unit)?) {
val resultCallback = ActivityResultCallback<Uri> { result ->
val resultCallback = ActivityResultCallback<Uri?> { result ->
result?.let { uri ->
UriUtil.takeUriPermission(activity?.contentResolver, uri)
onFileSelected?.invoke(uri)
@@ -91,7 +91,7 @@ class ExternalFileHelper {
fun buildCreateDocument(typeString: String = "application/octet-stream",
onFileCreated: (fileCreated: Uri?)->Unit) {
val resultCallback = ActivityResultCallback<Uri> { result ->
val resultCallback = ActivityResultCallback<Uri?> { result ->
onFileCreated.invoke(result)
}
@@ -150,7 +150,7 @@ class ExternalFileHelper {
class OpenDocument : ActivityResultContracts.OpenDocument() {
@SuppressLint("InlinedApi")
override fun createIntent(context: Context, input: Array<out String>): Intent {
override fun createIntent(context: Context, input: Array<String>): Intent {
return super.createIntent(context, input).apply {
addCategory(Intent.CATEGORY_OPENABLE)
addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION)
@@ -178,11 +178,10 @@ class ExternalFileHelper {
}
}
class CreateDocument(private val typeString: String) : ActivityResultContracts.CreateDocument() {
class CreateDocument(typeString: String) : ActivityResultContracts.CreateDocument(typeString) {
override fun createIntent(context: Context, input: String): Intent {
return super.createIntent(context, input).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = typeString
}
}
}

View File

@@ -1,16 +1,16 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.6.21'
ext.android_core_version = '1.7.0'
ext.android_appcompat_version = '1.4.1'
ext.android_material_version = '1.6.0'
ext.kotlin_version = '1.7.0'
ext.android_core_version = '1.8.0'
ext.android_appcompat_version = '1.4.2'
ext.android_material_version = '1.6.1'
ext.android_test_version = '1.4.0'
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

View File

@@ -5,14 +5,12 @@ plugins {
}
android {
compileSdkVersion 31
buildToolsVersion "31.0.0"
compileSdkVersion 32
buildToolsVersion "32.0.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 31
versionCode 1
versionName "1.0"
targetSdkVersion 32
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
compileSdkVersion 32
buildToolsVersion '32.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 31
targetSdkVersion 32
}
resourcePrefix 'classic_'

View File

@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
compileSdkVersion 32
buildToolsVersion '32.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 31
targetSdkVersion 32
}
resourcePrefix 'material_'