mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +00:00
Add Java 8 API desugaring support.
This commit is contained in:
parent
bf06e91636
commit
2a4ac97880
@ -20,6 +20,8 @@ android {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 29
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
|
||||
multiDexEnabled true
|
||||
}
|
||||
dexOptions {
|
||||
javaMaxHeapSize "2g"
|
||||
@ -27,6 +29,9 @@ android {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
|
||||
// Flag to enable support for the new language APIs
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
@ -130,6 +135,9 @@ dependencies {
|
||||
*/
|
||||
}
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
|
||||
implementation 'androidx.media:media:1.1.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
|
@ -1,11 +1,2 @@
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
###
|
||||
# This 'android.enableR8' property only matters when the current
|
||||
# build variant has 'minifyEnabled true'.
|
||||
#
|
||||
# Set this to false to use ProGuard.
|
||||
# Set this to true to use R8.
|
||||
#
|
||||
# Default: true
|
||||
android.enableR8=false
|
||||
|
@ -1,13 +1,12 @@
|
||||
package org.kde.kdeconnect;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.DefaultLifecycleObserver;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
public class MyApplication extends Application {
|
||||
public class MyApplication extends MultiDexApplication {
|
||||
private static class LifecycleObserver implements DefaultLifecycleObserver {
|
||||
private boolean inForeground = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user