Files
self/packages/mobile-sdk-alpha/android/build.gradle.source
Justin Hernandez 077dcc47b4 [SELF-830] feat: demo app nfc scanning (#1236)
* save wip demo app nfc scanning

* save wip

* fix types

* Fix Android NFC scanning in demo app (#1241)

* fix tests

* fix pipelines

* fix linting

* WIP move to flows/onboarding/scan-nfc

* prettier and fix test

* fix test

* update lock

* update deps

* Feat/android prebuilt modules (#1292)

* move entire screen

* remove redundancy in components and utils

* fixes

* lint

* ignore

* remove unneeded

* fix imports

* remove unused

* Update packages/mobile-sdk-alpha/src/types/events.ts

Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>

* uuid not needed for demo app

* android: update ci check

* timeout fix, image temp fix

* prettier fix

* try rebuild deps every time

* Temporarily disable cache check in CI

* Revert "try rebuild deps every time"

This reverts commit a5c97210a5.

* ignore false positive

* Revert "Revert "try rebuild deps every time""

This reverts commit 4f44615fd6.

* fix?

* sanitize error message first

* remove TODO that has been taken care of

* MSDK: add ios prebuilts (#1308)

* add ios prebuilt

* remove outdate readme

* remove duplicates

* comment out unused

* add prettier ignore

* Update .gitguardian.yml to ignore iOS frameworks and build artifacts

* update gitguardian ignore paths

* migrate config version

* add ignored-matches

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>

* remove duplicated code

* exclude mobile-sdk native modules when `E2E_TESTING` flag is set

* app: disable ios msdk auto-linking

* add E2E_TESTING flag

---------

Co-authored-by: Leszek Stachowski <leszek.stachowski@self.xyz>
Co-authored-by: seshanthS <seshanth@protonmail.com>
Co-authored-by: Seshanth.S <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
2025-10-23 23:14:32 +05:30

187 lines
5.3 KiB
Plaintext

buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 23
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.0.12077973"
kotlinVersion = "1.9.24"
}
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.0")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven {
// When building from SDK: ../../../node_modules
// $rootDir is packages/mobile-sdk-alpha/android
url("$rootDir/../../../node_modules/react-native/android")
}
maven {
url("$rootDir/../../../node_modules/jsc-android/dist")
}
}
configurations.configureEach {
resolutionStrategy.dependencySubstitution {
substitute(platform(module('com.gemalto.jp2:jp2-android'))) using module('com.github.Tgo1014:JP2ForAndroid:1.0.4')
}
resolutionStrategy.force 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
ndkVersion rootProject.ext.ndkVersion
namespace "com.selfxyz.selfSDK"
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
// Configure AAR generation for split AAB support
splits {
abi {
enable true
reset()
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
universalApk false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
// sourceCompatibility JavaVersion.VERSION_17
// targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
// jvmTarget = '1.8'
}
lintOptions {
abortOnError false
}
sourceSets {
main {
java.srcDirs = ['src/main/java']
res.srcDirs = ['src/main/res']
}
}
buildFeatures {
viewBinding true
}
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
exclude 'META-INF/androidx.exifinterface_exifinterface.version'
pickFirst '**/libc++_shared.so'
pickFirst '**/libjsc.so'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
// React Native
implementation 'com.facebook.react:react-native:+'
// NFC and Passport Reading dependencies
// implementation 'org.jmrtd:jmrtd:1.7.4'
implementation 'org.jmrtd:jmrtd:0.7.35'
implementation 'net.sf.scuba:scuba-sc-android:0.0.23'
// Bouncy Castle for cryptography
implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.78.1'
// Commons IO for utilities
implementation 'commons-io:commons-io:2.11.0'
// OkHttp for network operations
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
// Gson for JSON handling
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.2'
implementation "com.github.fotoapparat:fotoapparat:2.7.0"
implementation 'androidx.multidex:multidex:2.0.1'
// RxJava dependencies
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// React Native dependencies
implementation 'com.facebook.react:react-android'
implementation 'com.facebook.react:react-native:+'
// MLKit dependencies
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.2'
implementation 'com.google.mlkit:text-recognition:16.0.0'
// Camera dependencies
implementation "androidx.camera:camera-core:1.3.2"
implementation "androidx.camera:camera-camera2:1.3.2"
implementation "androidx.camera:camera-lifecycle:1.3.2"
implementation "androidx.camera:camera-view:1.3.2"
// Utility dependencies
implementation 'com.google.guava:guava:31.1-android'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.github.mhshams:jnbis:2.0.2'
}
// Task to copy AAR files to dist directory for prebuilt distribution
task copyAarToDist(type: Copy) {
from 'build/outputs/aar'
into '../dist/android'
include '*.aar'
}
// Ensure AAR is copied after assembleRelease
afterEvaluate {
tasks.named('assembleRelease').configure {
finalizedBy copyAarToDist
}
}