diff --git a/android/build.gradle b/android/build.gradle index 13c7e43..43ce383 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,3 @@ - - // android/build.gradle // based on: @@ -12,17 +10,15 @@ // original location: // - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle -def DEFAULT_COMPILE_SDK_VERSION = 29 -def DEFAULT_BUILD_TOOLS_VERSION = '29.0.3' -def DEFAULT_MIN_SDK_VERSION = 21 -def DEFAULT_TARGET_SDK_VERSION = 29 +def DEFAULT_COMPILE_SDK_VERSION = 35 +def DEFAULT_BUILD_TOOLS_VERSION = '35.0.0' +def DEFAULT_MIN_SDK_VERSION = 24 +def DEFAULT_TARGET_SDK_VERSION = 35 def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } -apply plugin: 'com.android.library' - buildscript { // The Android Gradle plugin is only required when opening the android folder stand-alone. // This avoids unnecessary downloads and potential conflicts when the library is included as a @@ -31,10 +27,10 @@ buildscript { if (project == rootProject) { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:8.2.2' } } } @@ -42,14 +38,21 @@ buildscript { apply plugin: 'com.android.library' android { + namespace 'com.trietho' compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + defaultConfig { minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) versionCode 1 versionName "1.0" } + + buildFeatures { + buildConfig = true + } + lintOptions { abortOnError false } @@ -58,6 +61,8 @@ android { repositories { // ref: https://www.baeldung.com/maven-local-repository mavenLocal() + google() + mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" @@ -66,8 +71,6 @@ repositories { // Android JSC is installed from npm url "$rootDir/../node_modules/jsc-android/dist" } - google() - jcenter() } dependencies {