Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
if (project == rootProject) {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -18,7 +18,7 @@ buildscript {
}
} else {
repositories {
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -35,6 +35,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
namespace "com.reactnativecommunity.webview"
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
buildToolsVersion getExtOrDefault('buildToolsVersion')
defaultConfig {
Expand All @@ -52,14 +53,13 @@ android {
disable 'GradleCompatible'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}

repositories {
mavenCentral()
jcenter()
google()

def found = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,10 @@ public void setCacheEnabled(WebView view, boolean enabled) {
if (enabled) {
Context ctx = view.getContext();
if (ctx != null) {
view.getSettings().setAppCachePath(ctx.getCacheDir().getAbsolutePath());
view.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
view.getSettings().setAppCacheEnabled(true);
}
} else {
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
view.getSettings().setAppCacheEnabled(false);
}
}

Expand Down Expand Up @@ -523,7 +520,6 @@ public void setIncognito(WebView view, boolean enabled) {

// Disable caching
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
view.getSettings().setAppCacheEnabled(false);
view.clearHistory();
view.clearCache(true);

Expand Down