fix: Improve build.gradle

This commit is contained in:
Marc Rousavy 2023-08-21 14:08:10 +02:00
parent 1d12cd91cb
commit 07ba0e1a41

View File

@ -12,14 +12,12 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:7.4.1"
classpath "com.android.tools.build:gradle:7.4.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}
def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['VisionCamera_kotlinVersion']
def resolveBuildType() {
Gradle gradle = getGradle()
String tskReqStr = gradle.getStartParameter().getTaskRequests()['args'].toString()
@ -74,7 +72,6 @@ repositories {
android {
namespace "com.mrousavy.camera.example"
compileSdkVersion safeExtGet("compileSdkVersion", 28)
// Used to override the NDK path/version on internal CI or by allowing
// users to customize the NDK path/version from their root project (e.g. for M1 support)
@ -91,6 +88,7 @@ android {
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 21)
compileSdkVersion safeExtGet('compileSdkVersion', 33)
targetSdkVersion safeExtGet('targetSdkVersion', 33)
versionCode 1
versionName "1.0"
@ -141,19 +139,17 @@ android {
dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-android:+'
implementation "androidx.core:core-ktx:1.3.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.5.2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
implementation "androidx.exifinterface:exifinterface:1.3.6"
// Frame Processor integration (optional)
implementation project(":react-native-worklets-core")
// Skia Frame Processor integration (optional)
implementation project(":shopify_react-native-skia")
}
// Resolves "LOCAL_SRC_FILES points to a missing file, Check that libfb.so exists or that its path is correct".
tasks.whenTaskAdded { task ->
tasks.configureEach { task ->
if (task.name.contains("configureCMakeDebug")) {
rootProject.getTasksByName("packageReactNdkDebugLibs", true).forEach {
task.dependsOn(it)