buildscript { ext.MyidSdk = [ kotlinVersion: "2.0.21", minSdkVersion: 24, compileSdkVersion: 36, // Override with: ext { myIdCaptureSdkVersion = "3.1.9" } myIdCaptureSdkVersion: "3.1.9" ] ext.getExtOrDefault = { prop -> if (rootProject.ext.has(prop)) { return rootProject.ext.get(prop) } return MyidSdk[prop] } repositories { google() mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:8.7.2" // noinspection DifferentKotlinGradleVersion classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}" } } apply plugin: "com.android.library" if (project.extensions.findByName("kotlin") == null) { apply plugin: "kotlin-android" } apply plugin: "com.facebook.react" android { namespace "com.myidsdk" compileSdkVersion getExtOrDefault("compileSdkVersion") defaultConfig { minSdkVersion getExtOrDefault("minSdkVersion") } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } } // MyID artifacts live outside Maven Central. Registered on every project, not // just this one: a consuming app resolves our transitive dependencies against // its own repository set, so a module-level block here is not enough. // // Apps managing repositories centrally (FAIL_ON_PROJECT_REPOS) should set // myIdSkipRepositoryInjection=true and declare the URLs themselves. if (!rootProject.hasProperty("myIdSkipRepositoryInjection")) { rootProject.allprojects { repositories { maven { url "https://artifactory.aigroup.uz/artifactory/myid/" } maven { url "https://developer.huawei.com/repo/" } } } } repositories { google() mavenCentral() maven { url "https://artifactory.aigroup.uz/artifactory/myid/" } maven { url "https://developer.huawei.com/repo/" } } dependencies { implementation "com.facebook.react:react-android" // The debug artifact is a non-obfuscated build of the same SDK. Apps with // build types beyond debug/release need matchingFallbacks — see the README. debugImplementation "uz.myid.sdk.capture:myid-capture-sdk-debug:${getExtOrDefault('myIdCaptureSdkVersion')}" releaseImplementation "uz.myid.sdk.capture:myid-capture-sdk:${getExtOrDefault('myIdCaptureSdkVersion')}" }