mattermost-mobile/libraries/@mattermost/secure-pdf-viewer/android/build.gradle
Rahim Rahman 522812e126
feat(MM-65147): upgrade to react-native 0.77.3 (#9253)
* feat(MM-65147): upgrade to react-native 0.77.3
* basic iOS & Android changes
* patch packages
* react-native-network-client temporary until fix upstream
* local updates
* delete patch for react-native-network-client
* update react-native-network-client@1.9.0
* update RNN patch package to fix kotlin bug
* revert unneeded changes
* changes based on PR review
* ensure insert not happening if any of the values are null
* update watermelondb to 2.81.0
* update watermelon patch file name
* update secure-pdf-viewer to use latest lib
* fix typescript errors
* update podfile.lock
* update podfile.lock
* update podfile.lock again?
* podfile.lock update again
* temporarily update hermes engine
* temp
* fix alamo issue.
* revert changes to pod update
* pod update vs pod install
* remove cache for a bit
* revert the pod caching
* oops
* update podfile.lock again
* fix(MM-66825): dynamic patching of 16kb pagesize (#9361)
* fix(MM-66825): dynamic patching of 16kb pagesize
* fix lint and tsc errors
* add npx patch-package
* run patcing somewhere else instead, but this will break  iOS
* move reinstall around
* simplify script
* expo-image wasn't updating
* update caching restore key
* using git apply
* fix lint issues
* readme changes
* remove some wrong instructions
* remove redundant npx patch-package
* update build script
2025-12-22 07:35:38 -07:00

71 lines
2 KiB
Groovy

buildscript {
ext.safeExtGet = {prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
repositories {
google()
gradlePluginPortal()
}
def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : "1.9.25"
dependencies {
classpath("com.android.tools.build:gradle:8.6.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}
def isNewArchitectureEnabled() {
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}
apply plugin: 'com.android.library'
apply plugin: 'org.jetbrains.kotlin.android'
if (isNewArchitectureEnabled()) {
apply plugin: 'com.facebook.react'
}
android {
compileSdkVersion safeExtGet('compileSdkVersion', 34)
namespace "com.mattermost.securepdfviewer"
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 24)
targetSdkVersion safeExtGet('targetSdkVersion', 34)
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
}
}
packagingOptions {
exclude 'lib/arm64-v8a/libc++_shared.so'
exclude 'lib/x86_64/libc++_shared.so'
exclude 'lib/armeabi-v7a/libc++_shared.so'
exclude 'lib/x86/libc++_shared.so'
}
sourceSets {
main {
if (isNewArchitectureEnabled()) {
java.srcDirs += ['src/newarch']
} else {
java.srcDirs += ['src/oldarch']
}
}
}
}
repositories {
google()
mavenCentral()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$projectDir/../node_modules/react-native/android"
}
}
dependencies {
implementation 'com.facebook.react:react-native'
implementation 'androidx.security:security-crypto:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation 'com.github.mattermost:mattermost-android-pdfium:v1.1.0'
}