Upgrade Gradle (7.4), AGP (7.1.2) and Kotlin Dependencies

This commit is contained in:
PixelyIon 2022-03-06 21:32:52 +05:30
parent 77e2797219
commit 62c16fa73e
8 changed files with 20 additions and 18 deletions

View File

@ -6,6 +6,8 @@ plugins {
}
android {
namespace 'emu.skyline'
compileSdkVersion 31
buildToolsVersion '31.0.0'
defaultConfig {
@ -58,7 +60,7 @@ android {
}
/* Linting */
lintOptions {
lint {
disable 'IconLocation'
}
@ -72,8 +74,8 @@ android {
}
/* Android Assets */
aaptOptions {
ignoreAssetsPattern "*.md"
androidResources {
ignoreAssetsPattern '*.md'
}
/* Vulkan Validation Layers */
@ -89,15 +91,15 @@ android {
dependencies {
/* Google */
implementation "androidx.core:core-ktx:1.7.0"
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation 'androidx.fragment:fragment-ktx:1.4.0'
implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
implementation 'com.google.android.flexbox:flexbox:3.0.0'

View File

@ -58,7 +58,7 @@ class SettingsActivity : AppCompatActivity() {
setPreferencesFromResource(R.xml.preferences, rootKey)
}
override fun onDisplayPreferenceDialog(preference : Preference?) {
override fun onDisplayPreferenceDialog(preference : Preference) {
if (preference is IntegerListPreference) {
// Check if dialog is already showing
if (parentFragmentManager.findFragmentByTag(DIALOG_FRAGMENT_TAG) != null)

View File

@ -142,7 +142,7 @@ class IntegerListPreference @JvmOverloads constructor(
getPersistedInt(0)
}
override fun onSaveInstanceState() : Parcelable {
override fun onSaveInstanceState() : Parcelable? {
val superState = super.onSaveInstanceState()
if (isPersistent)
// No need to save instance state since it's persistent

View File

@ -16,7 +16,7 @@ import emu.skyline.R
/**
* This preference is used to show licenses and the source of a library
*/
class LicensePreference @JvmOverloads constructor(context : Context?, attrs : AttributeSet? = null, defStyleAttr : Int = R.attr.dialogPreferenceStyle) : Preference(context, attrs, defStyleAttr) {
class LicensePreference @JvmOverloads constructor(context : Context, attrs : AttributeSet? = null, defStyleAttr : Int = R.attr.dialogPreferenceStyle) : Preference(context, attrs, defStyleAttr) {
/**
* The [FragmentManager] is used to show the [LicenseDialog] fragment
*/

View File

@ -14,7 +14,7 @@ import androidx.preference.R
/**
* This preference is used to set the theme to Light/Dark mode
*/
class ThemePreference @JvmOverloads constructor(context : Context?, attrs : AttributeSet? = null, defStyleAttr : Int = R.attr.dialogPreferenceStyle) : ListPreference(context, attrs, defStyleAttr) {
class ThemePreference @JvmOverloads constructor(context : Context, attrs : AttributeSet? = null, defStyleAttr : Int = R.attr.dialogPreferenceStyle) : ListPreference(context, attrs, defStyleAttr) {
/**
* This changes [AppCompatDelegate.sDefaultNightMode] based on what the user's selection is
*/

View File

@ -3,8 +3,8 @@
buildscript {
ext {
kotlin_version = '1.6.0'
lifecycle_version = '2.4.0'
hilt_version = '2.39.1'
lifecycle_version = '2.4.1'
hilt_version = '2.41'
}
repositories {
@ -12,7 +12,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.0-rc01'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"

View File

@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2g
org.gradle.jvmargs=-Xmx3g -XX:+UseParallelGC
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects

View File

@ -1,6 +1,6 @@
#Mon Jan 10 14:58:11 GMT 2022
#Sun Mar 06 15:49:50 GMT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME