/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
shared/android/app/build.gradle
179 строк
7 KB
chrisnojima
Store-derived mobile build numbers; play-publisher 3.12.1 (#29431)
17 июл 2026, 04:58
Не верифицирован
17 июл 2026, 04:58
b8576d1
Код
Авторство
О чём код?
import com.github.triplet.gradle.androidpublisher.ResolutionStrategy apply plugin: "com.android.application" apply plugin: "org.jetbrains.kotlin.android" apply plugin: "com.facebook.react" apply plugin: 'com.github.triplet.play' // KB: app version def VERSION_NAME = "6.7.0" // KB: local-build fallback only. Publishing via the play plugin (ResolutionStrategy.AUTO) // fetches the live version code from Play and increments it. def kbVersionCode = 10555519 /** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need. */ react { enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean() cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim()) bundleCommand = "export:embed" /* Folders */ // The root of your project, i.e. where "package.json" lives. Default is '../..' // root = file("../../") // The folder where the react-native NPM package is. Default is ../../node_modules/react-native // reactNativeDir = file("../../node_modules/react-native") // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen // codegenDir = file("../../node_modules/@react-native/codegen") // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js // cliFile = file("../../node_modules/react-native/cli.js") /* Variants */ // The list of variants to that are debuggable. For those we're going to // skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized". // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. // debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"] /* Bundling */ // A list containing the node command and its flags. Default is just 'node'. // nodeExecutableAndArgs = ["node"] // // The command to run when bundling. By default is 'bundle' // bundleCommand = "ram-bundle" // // The path to the CLI configuration file. Default is empty. // bundleConfig = file(../rn-cli.config.js) // // The name of the generated asset file containing your JS bundle // bundleAssetName = "MyApplication.android.bundle" // // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' // entryFile = file("index.android.js") // // A list of extra flags to pass to the 'bundle' commands. // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle // extraPackagerArgs = [] /* Hermes Commands */ // The hermes compiler command to run. By default it is 'hermesc' // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] /* Autolinking */ autolinkLibrariesWithApp() } /** * Set this to true in release builds to optimize the app using [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization). */ def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBuilds') ?: false).toBoolean() /** * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+' android { ndkVersion = rootProject.ext.ndkVersion buildToolsVersion rootProject.ext.buildToolsVersion compileSdk rootProject.ext.compileSdkVersion namespace = "io.keybase.ossifrage" defaultConfig { applicationId "io.keybase.ossifrage" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode kbVersionCode versionName VERSION_NAME buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" // KB added multiDexEnabled = true } signingConfigs { release { storeFile file(KB_RELEASE_STORE_FILE) storePassword KB_RELEASE_STORE_PASSWORD keyAlias KB_RELEASE_KEY_ALIAS keyPassword KB_RELEASE_KEY_PASSWORD } } buildTypes { debug { ndk { abiFilters = (findProperty('reactNativeArchitectures') ?: 'arm64-v8a').split(',').collect { it.trim() } } } release { signingConfig = signingConfigs.release minifyEnabled enableMinifyInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } releaseUnsigned.initWith(buildTypes.release) releaseUnsigned { applicationIdSuffix ".unsigned" signingConfig = buildTypes.debug.signingConfig matchingFallbacks = ['release'] manifestPlaceholders["usesCleartextTraffic"] = "false" } } bundle { language { enableSplit = true } density { enableSplit = true } abi { enableSplit = true } } play { track = 'internal' serviceAccountCredentials = file(KB_SERVICE_ACCT_JSON) resolutionStrategy = ResolutionStrategy.AUTO } } dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") if (hermesEnabled.toBoolean()) { implementation("com.facebook.react:hermes-android") } else { implementation jscFlavor } implementation 'androidx.work:work-runtime:2.11.2' implementation 'androidx.multidex:multidex:2.0.1' implementation "com.google.firebase:firebase-messaging:25.0.2" implementation "com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}" implementation 'org.msgpack:msgpack-core:0.9.12' implementation project(':keybaselib') implementation 'com.android.installreferrer:installreferrer:2.2' implementation "androidx.lifecycle:lifecycle-common-java8:2.10.0" implementation "androidx.lifecycle:lifecycle-process:2.10.0" } // This requires a google-services.json file locally. Drop it in // android/app/src/debug/google-services.json // android/app/src/releaseUnsigned/google-services.json apply plugin: 'com.google.gms.google-services'