From 5e8d7da9e334ccd246d4549bffd01163eb2e8d58 Mon Sep 17 00:00:00 2001 From: NikitaFeodonit Date: Mon, 4 Nov 2019 21:58:41 +0300 Subject: [PATCH] Update 'build.gradle' and Java code for AndroidX lib --- build.gradle | 16 ++++++++++------ .../htmlgrapheaskamva/DrawOnBitmapLoader.java | 3 ++- .../htmlgrapheaskamva/HtmlGrapheasView.java | 14 +++++++------- .../hgkamva_api/HgKamvaApiJni.java | 5 ----- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build.gradle b/build.gradle index 6a09467..85fd829 100644 --- a/build.gradle +++ b/build.gradle @@ -73,6 +73,11 @@ if (rootProject.hasProperty("rootNativeBuildDir")) { rootNativeBuildDir = rootProject.rootNativeBuildDir } +def BUILD_SHARED_LIBS = false +if (rootProject.hasProperty("BUILD_SHARED_LIBS")) { + BUILD_SHARED_LIBS = rootProject.BUILD_SHARED_LIBS +} + //----------------------------------------------------------------------- // Module properties @@ -104,7 +109,7 @@ android { versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -140,13 +145,12 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation "com.android.support:appcompat-v7:${supportLibVer}" - implementation "com.android.support:support-compat:${supportLibVer}" - implementation "com.android.support:support-v4:${supportLibVer}" + implementation "androidx.appcompat:appcompat:1.1.0" + implementation "androidx.core:core:1.1.0" testImplementation "junit:junit:4.12" - androidTestImplementation "com.android.support.test:runner:1.0.2" - androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.2" + androidTestImplementation "androidx.test.ext:junit:1.1.1" + androidTestImplementation "androidx.test.espresso:espresso-core:3.2.0" } diff --git a/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/DrawOnBitmapLoader.java b/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/DrawOnBitmapLoader.java index 7efc16a..88f00c4 100644 --- a/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/DrawOnBitmapLoader.java +++ b/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/DrawOnBitmapLoader.java @@ -26,7 +26,8 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.Color; -import android.support.v4.content.AsyncTaskLoader; +import androidx.loader.content.AsyncTaskLoader; + import ru.htmlgrapheas.htmlgrapheaskamva.hgkamva_api.HgKamvaApiJni; diff --git a/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/HtmlGrapheasView.java b/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/HtmlGrapheasView.java index c3e7b2f..cb42cb1 100644 --- a/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/HtmlGrapheasView.java +++ b/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/HtmlGrapheasView.java @@ -32,13 +32,13 @@ import android.graphics.Color; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.LoaderManager; -import android.support.v4.content.Loader; -import android.support.v4.view.GestureDetectorCompat; -import android.support.v4.view.ViewCompat; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.view.GestureDetectorCompat; +import androidx.core.view.ViewCompat; +import androidx.loader.app.LoaderManager; +import androidx.loader.content.Loader; import android.text.TextUtils; import android.util.DisplayMetrics; import android.view.GestureDetector; diff --git a/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/hgkamva_api/HgKamvaApiJni.java b/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/hgkamva_api/HgKamvaApiJni.java index 715add6..8f113aa 100644 --- a/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/hgkamva_api/HgKamvaApiJni.java +++ b/platform/android/main/java/ru/htmlgrapheas/htmlgrapheaskamva/hgkamva_api/HgKamvaApiJni.java @@ -116,11 +116,6 @@ public native static void hgHtmlContext_loadMasterStylesheet( System.loadLibrary("expat"); - System.loadLibrary("icudata"); - System.loadLibrary("icuuc"); - System.loadLibrary("icui18n"); - System.loadLibrary("icuio"); // TODO: needed? - System.loadLibrary("freetype" + libSuffix); System.loadLibrary("harfbuzz"); System.loadLibrary("fontconfig");