From 569f35dc63fdf2116c3e77eded67c1add53192a7 Mon Sep 17 00:00:00 2001 From: ekhiw Date: Tue, 5 Apr 2022 22:45:12 +0700 Subject: [PATCH 1/5] update project --- adblockwebview/build.gradle | 16 ++++++++-------- adblockwebview/src/main/AndroidManifest.xml | 3 ++- app/build.gradle | 20 ++++++++------------ app/src/main/AndroidManifest.xml | 1 + build.gradle | 10 +++++++--- gradle/wrapper/gradle-wrapper.properties | 6 +++--- 6 files changed, 29 insertions(+), 27 deletions(-) diff --git a/adblockwebview/build.gradle b/adblockwebview/build.gradle index 660684c..2adccf8 100644 --- a/adblockwebview/build.gradle +++ b/adblockwebview/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 24 - buildToolsVersion "24.0.3" + compileSdk 31 + buildToolsVersion "30.0.3" defaultConfig { - minSdkVersion 14 - targetSdkVersion 24 + minSdk 21 + targetSdk 31 versionCode 1 versionName "1.0.0" vectorDrawables.useSupportLibrary = true @@ -21,8 +21,8 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.2.1' - compile 'com.android.support:design:24.2.1' - compile 'com.android.support:cardview-v7:24.2.1' + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:24.2.1' + implementation 'com.android.support:design:24.2.1' + implementation 'com.android.support:cardview-v7:24.2.1' } diff --git a/adblockwebview/src/main/AndroidManifest.xml b/adblockwebview/src/main/AndroidManifest.xml index 196cf2b..aac5f5f 100644 --- a/adblockwebview/src/main/AndroidManifest.xml +++ b/adblockwebview/src/main/AndroidManifest.xml @@ -14,7 +14,8 @@ + android:configChanges="orientation|screenSize" + android:exported="true"/> diff --git a/app/build.gradle b/app/build.gradle index adad7c3..7145d82 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 24 - buildToolsVersion "24.0.3" + compileSdk 31 + buildToolsVersion "30.0.3" defaultConfig { applicationId "com.newera.adblockwebviewdemo" - minSdkVersion 14 - targetSdkVersion 24 + minSdk 21 + targetSdk 31 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -20,12 +20,8 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) - compile 'com.android.support:appcompat-v7:24.2.1' - compile 'com.android.support:design:24.2.1' - testCompile 'junit:junit:4.12' - compile project(path: ':adblockwebview') + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:24.2.1' + implementation 'com.android.support:design:24.2.1' + implementation project(path: ':adblockwebview') } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 268d317..e9f9b7e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,6 +11,7 @@ diff --git a/build.gradle b/build.gradle index c20bca1..e6b93dd 100644 --- a/build.gradle +++ b/build.gradle @@ -2,10 +2,12 @@ buildscript { repositories { - jcenter() + google() + mavenCentral() + maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } } dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' + classpath "com.android.tools.build:gradle:7.0.3" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -14,7 +16,9 @@ buildscript { allprojects { repositories { - jcenter() + google() + mavenCentral() + maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 04e285f..ea7ed7c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Dec 28 10:00:20 PST 2015 +#Tue Nov 09 17:11:52 WIB 2021 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +zipStoreBase=GRADLE_USER_HOME From ca144dada4c417b90624dde5281d554847353de9 Mon Sep 17 00:00:00 2001 From: ekhiw Date: Tue, 5 Apr 2022 22:50:18 +0700 Subject: [PATCH 2/5] update project setting --- .idea/compiler.xml | 18 +----------------- .idea/gradle.xml | 6 ++++-- .idea/jarRepositories.xml | 30 ++++++++++++++++++++++++++++++ .idea/misc.xml | 31 ++++++++++++++++++------------- .idea/modules.xml | 6 +++--- .idea/runConfigurations.xml | 12 ------------ .idea/vcs.xml | 6 ++++++ 7 files changed, 62 insertions(+), 47 deletions(-) create mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/runConfigurations.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 96cc43e..fb7f4a8 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,22 +1,6 @@ - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index e58ca7a..8fc5d4c 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,11 +1,13 @@ + - - - - - - - - - - - + diff --git a/.idea/modules.xml b/.idea/modules.xml index a7c0bf4..fd1f9fe 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,9 +2,9 @@ - - - + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 2599a42ee9041dc7588ee464430d50eec3f4c319 Mon Sep 17 00:00:00 2001 From: ekhiw Date: Tue, 5 Apr 2022 22:53:17 +0700 Subject: [PATCH 3/5] migrate to androidx --- .idea/misc.xml | 9 +++++++-- adblockwebview/build.gradle | 6 +++--- .../presenter/IWebViewPresenter.java | 2 +- .../presenter/WebViewPresenterImpl.java | 4 ++-- .../ui/AdBlocksWebViewActivity.java | 16 ++++++++-------- .../com/amnix/adblockwebview/util/AdBlocker.java | 2 +- .../adblockwebview/util/PermissionUtils.java | 4 ++-- .../src/main/res/layout/a_web_viewer.xml | 8 ++++---- .../src/main/res/layout/popup_menu.xml | 8 ++++---- adblockwebview/src/main/res/layout/toolbar.xml | 4 ++-- app/build.gradle | 6 +++--- .../newera/adblockwebviewdemo/MainActivity.java | 4 ++-- app/src/main/res/layout/activity_main.xml | 10 +++++----- app/src/main/res/layout/content_main.xml | 2 +- gradle.properties | 2 ++ 15 files changed, 47 insertions(+), 40 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 7a3b3c4..1b88011 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,12 @@ - - + +