Browse Source

Update gradle version, fix crash on kitkat caused by old gradle plugin version

master
Anthony Restaino 9 years ago
parent
commit
8763f35668
  1. 12
      app/build.gradle
  2. 7
      app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java
  3. 2
      build.gradle

12
app/build.gradle

@ -5,15 +5,24 @@ apply plugin: 'com.getkeepsafe.dexcount' @@ -5,15 +5,24 @@ apply plugin: 'com.getkeepsafe.dexcount'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionName "4.2.3.1"
generatedDensities = []
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
sourceSets {
lightningPlus.setRoot('src/LightningPlus')
lightningLite.setRoot('src/LightningLite')
}
buildTypes {
debug {
minifyEnabled false
@ -27,6 +36,7 @@ android { @@ -27,6 +36,7 @@ android {
proguardFiles 'proguard-project.txt'
}
}
productFlavors {
lightningPlus {
buildConfigField "boolean", "FULL_VERSION", "true"
@ -39,9 +49,11 @@ android { @@ -39,9 +49,11 @@ android {
versionCode 86
}
}
lintOptions {
abortOnError true
}
packagingOptions {
exclude '.readme'
}

7
app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
package acr.browser.lightning.view;
import android.Manifest;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
@ -12,6 +13,7 @@ import android.os.Message; @@ -12,6 +13,7 @@ import android.os.Message;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.webkit.GeolocationPermissions;
@ -31,12 +33,13 @@ import acr.browser.lightning.utils.Preconditions; @@ -31,12 +33,13 @@ import acr.browser.lightning.utils.Preconditions;
class LightningChromeClient extends WebChromeClient {
private static final String TAG = LightningChromeClient.class.getSimpleName();
private static final String[] PERMISSIONS = new String[]{Manifest.permission.ACCESS_FINE_LOCATION};
@NonNull private final Activity mActivity;
@NonNull private final LightningView mLightningView;
@NonNull private final UIController mUIController;
@NonNull private final Bus eventBus;
LightningChromeClient(@NonNull Activity activity, @NonNull LightningView lightningView) {
Preconditions.checkNonNull(activity);
@ -44,7 +47,6 @@ class LightningChromeClient extends WebChromeClient { @@ -44,7 +47,6 @@ class LightningChromeClient extends WebChromeClient {
mActivity = activity;
mUIController = (UIController) activity;
mLightningView = lightningView;
eventBus = BrowserApp.getBus(activity);
}
@Override
@ -158,6 +160,7 @@ class LightningChromeClient extends WebChromeClient { @@ -158,6 +160,7 @@ class LightningChromeClient extends WebChromeClient {
mUIController.openFileChooser(uploadMsg);
}
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback,
WebChromeClient.FileChooserParams fileChooserParams) {
mUIController.showFileChooser(filePathCallback);

2
build.gradle

@ -3,7 +3,7 @@ buildscript { @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.2.1'
}

Loading…
Cancel
Save