From 5d443df017e66cef13eae978c943ce627bff414b Mon Sep 17 00:00:00 2001 From: "kr.mao" Date: Thu, 28 Jul 2022 18:10:53 +0800 Subject: [PATCH] fat aar ok +1 --- .../library/reactnative/RNInstanceManager.kt | 7 +- .../.libsforandroid/build.gradle | 70 ++++++++++--------- .../libs-reactnative/maven-metadata.xml | 3 +- .../libs-reactnative/maven-metadata.xml.md5 | 2 +- .../libs-reactnative/maven-metadata.xml.sha1 | 2 +- 5 files changed, 44 insertions(+), 40 deletions(-) diff --git a/mobile/react_native/tools/libsforandroid/.libsforandroid/app/libraries/library-reactnative/src/main/java/com/smart/library/reactnative/RNInstanceManager.kt b/mobile/react_native/tools/libsforandroid/.libsforandroid/app/libraries/library-reactnative/src/main/java/com/smart/library/reactnative/RNInstanceManager.kt index d4b2c8ddc..733e6ae57 100644 --- a/mobile/react_native/tools/libsforandroid/.libsforandroid/app/libraries/library-reactnative/src/main/java/com/smart/library/reactnative/RNInstanceManager.kt +++ b/mobile/react_native/tools/libsforandroid/.libsforandroid/app/libraries/library-reactnative/src/main/java/com/smart/library/reactnative/RNInstanceManager.kt @@ -16,7 +16,8 @@ import com.facebook.react.bridge.Promise import com.facebook.react.bridge.ReactContext import com.facebook.react.common.LifecycleState import com.facebook.react.devsupport.DevLoadingViewController -import com.facebook.react.devsupport.RedBoxHandler +import com.facebook.react.devsupport.interfaces.ErrorType +import com.facebook.react.devsupport.interfaces.RedBoxHandler import com.facebook.react.devsupport.interfaces.StackFrame import com.facebook.react.shell.MainPackageConfig import com.facebook.react.shell.MainReactPackage @@ -31,7 +32,7 @@ import com.smart.library.util.STLogUtil import com.smart.library.util.STReflectUtil import com.smart.library.util.STToastUtil import com.smart.library.util.cache.STCacheManager -import com.swmansion.gesturehandler.react.RNGestureHandlerPackage +import com.swmansion.gesturehandler.RNGestureHandlerPackage import com.swmansion.reanimated.ReanimatedPackage import com.th3rdwave.safeareacontext.SafeAreaContextPackage import io.reactivex.Flowable @@ -302,7 +303,7 @@ object RNInstanceManager { .setApplication(application) .setUIImplementationProvider(UIImplementationProvider()) .setRedBoxHandler(object : RedBoxHandler { - override fun handleRedbox(title: String?, stack: Array?, errorType: RedBoxHandler.ErrorType?) { + override fun handleRedbox(title: String?, stack: Array?, errorType: ErrorType?) { STLogUtil.e(TAG, "handleRedbox errorType:${errorType?.name}, title:$title, stack:$stack") } diff --git a/mobile/react_native/tools/libsforandroid/.libsforandroid/build.gradle b/mobile/react_native/tools/libsforandroid/.libsforandroid/build.gradle index f69755f58..d6f1de055 100644 --- a/mobile/react_native/tools/libsforandroid/.libsforandroid/build.gradle +++ b/mobile/react_native/tools/libsforandroid/.libsforandroid/build.gradle @@ -1,34 +1,27 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlinVersion = "1.3.71" + ext.kotlinVersion = "1.6.10" + ext.kotlinxCoroutinesVersion = "1.4.1" ext.ankoVersion = "0.8.2" + ext.walleVersion = "1.1.6" ext.godeyeVersion = "3.2.1" ext.godeyeMethodCanaryVersion = "0.15.2" - ext.walleVersion = "1.1.6" ext.reactNativeVersion = "0.69.3" repositories { google() - jcenter() + maven { url 'https://jitpack.io' } + maven { url 'https://plugins.gradle.org/m2/' } mavenCentral() - maven { - url 'https://maven.google.com/' - name 'Google' - } - maven { - url("https://jitpack.io") - } - maven { - url("https://dl.bintray.com/kotlin/dokka") - } } dependencies { //noinspection GradleDependency - classpath 'com.android.tools.build:gradle:4.1.1' - classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion" - //noinspection DifferentKotlinGradleVersion + classpath 'com.android.tools.build:gradle:4.1.3' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" + + classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion" classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.30" classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5" // https://github.com/bintray/gradle-bintray-plugin classpath 'com.github.kezong:fat-aar:1.3.8' // https://github.com/kezong/fat-aar-android @@ -44,15 +37,10 @@ allprojects { flatDir { dirs "file://$rootProject.projectDir/../repo" } flatDir { dirs "file://${gradle.ext.modules.reactNative.nodeModulesPath}/react-native/android/com/facebook/react/react-native/${reactNativeVersion}" } - maven { url "https://jitpack.io" } - mavenLocal() google() - jcenter() + maven { url 'https://jitpack.io' } + maven { url 'https://plugins.gradle.org/m2/' } mavenCentral() - maven { - url 'https://maven.google.com/' - name 'Google' - } } gradle.projectsEvaluated { tasks.withType(JavaCompile) { @@ -62,6 +50,17 @@ allprojects { tasks.withType(Javadoc) { options.encoding = "UTF-8" } + + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { + kotlinOptions { + jvmTarget = "1.8" + } + } + + tasks.withType(JavaCompile).configureEach { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } } task clean(type: Delete) { @@ -87,25 +86,28 @@ ext { // https://dl.google.com/dl/android/maven2/index.html // https://developer.android.google.cn/studio/releases/gradle-plugin#updating-plugin // 设置为 29 报错 Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PRO - targetSdkVersion = 28 - compileSdkVersion = 28 - buildToolsVersion = "28.0.3" //"28.0.3" + targetSdkVersion = 30 + compileSdkVersion = 30 + buildToolsVersion = "30.0.0" //"28.0.3" // App dependencies supportLibraryVersion = "28.0.0" // "28.0.0" constraintLayoutVersion = "2.0.0-beta3" // AndroidX - androidXVersion = "1.0.0" - androidXCoreVersion = "1.3.1" + androidXVersion = "1.1.0" + androidXViewPagerVersion = "1.0.0" + androidXCardViewVersion = "1.0.0" + androidXLegacySupportV4Version = "1.0.0" + androidXCoreVersion = "1.3.2" androidXMultidexVersion = "2.0.1" - androidXAnnotationVersion = "1.1.0" - androidXAppCompatVersion = "1.1.0" - androidXRecyclerViewVersion = "1.1.0" + androidXAnnotationVersion = "1.2.0" + androidXAppCompatVersion = "1.2.0" + androidXRecyclerViewVersion = "1.2.0-rc01" androidXVectorDrawableVersion = "1.1.0" - androidXFragmentVersion = "1.2.5" - androidXConstraintlayoutVersion = "2.0.0-rc1" - androidXMaterialVersion = "1.2.1" + androidXFragmentVersion = "1.3.2" + androidXConstraintlayoutVersion = "2.0.4" + androidXMaterialVersion = "1.3.0" androidXLifecycleVersion = "2.3.0-beta01" smartRefreshLayoutVersion = "2.0.1" diff --git a/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml b/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml index 5e09df1ef..f893bebe7 100644 --- a/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml +++ b/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml @@ -5,7 +5,8 @@ 0.62.2.1-SNAPSHOT + 0.69.3.1-SNAPSHOT - 20201029060941 + 20220728094805 diff --git a/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.md5 b/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.md5 index 6bb8568f6..2aeb36e41 100644 --- a/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.md5 +++ b/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.md5 @@ -1 +1 @@ -7c77482af606ad939ce13d3c6ac35ef9 \ No newline at end of file +38e5f5603fd5475af6de377e1efbbbc1 \ No newline at end of file diff --git a/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.sha1 b/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.sha1 index b21f3fca9..5c6dbfdf8 100644 --- a/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.sha1 +++ b/mobile/react_native/tools/libsforandroid/repo/com/smart/library/libs-reactnative/maven-metadata.xml.sha1 @@ -1 +1 @@ -88102eea067ca34f41a6127a538cb3f6631fa004 \ No newline at end of file +c2131d462363b8535be14bcb37f85c3252431c66 \ No newline at end of file