Skip to content

Commit

Permalink
desugar, multidex
Browse files Browse the repository at this point in the history
  • Loading branch information
XiangRongLin committed Nov 28, 2020
1 parent e00a706 commit d3d1888
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
12 changes: 9 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ android {
versionCode 953
versionName "0.19.8"

multiDexEnabled true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

Expand All @@ -28,7 +30,6 @@ android {

buildTypes {
debug {
multiDexEnabled true
debuggable true

// suffix the app id and the app name with git branch name
Expand Down Expand Up @@ -66,6 +67,9 @@ android {
}

compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true

sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
encoding 'utf-8'
Expand Down Expand Up @@ -140,7 +144,9 @@ afterEvaluate {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation "frankiesardo:icepick:${icepickVersion}"
kapt "frankiesardo:icepick-processor:${icepickVersion}"
Expand All @@ -154,7 +160,7 @@ dependencies {
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
implementation "com.squareup.leakcanary:leakcanary-object-watcher-android:${leakCanaryVersion}"

debugImplementation "androidx.multidex:multidex:2.0.1"
implementation "androidx.multidex:multidex:2.0.1"

testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:3.3.3'
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/schabi/newpipe/App.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.schabi.newpipe;

import android.annotation.TargetApi;
import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
Expand All @@ -10,6 +9,7 @@
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;

import com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache;
Expand Down Expand Up @@ -63,7 +63,7 @@
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/

public class App extends Application {
public class App extends MultiDexApplication {
protected static final String TAG = App.class.toString();
@SuppressWarnings("unchecked")
private static final Class<? extends ReportSenderFactory>[]
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri May 01 19:39:41 CEST 2020
#Sat Oct 17 06:10:46 IST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

0 comments on commit d3d1888

Please sign in to comment.