Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby File.read(File.join(__dir__, '.ruby-version')).strip
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
ruby ">= 2.6.10"

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
58 changes: 36 additions & 22 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.facebook.react")
}

apply plugin: 'com.google.gms.google-services' // firebase
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf'
// apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
apply from: "../../node_modules/react-native-config/android/dotenv.gradle"

import com.android.build.OutputFile
import com.android.build.VariantOutput
def enableSeparateBuildPerCPUArchitecture = true
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
Expand All @@ -20,14 +23,14 @@ def reactNativeArchitectures() {

react {
/* 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")
// 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. By default is just 'debug'.
Expand Down Expand Up @@ -58,6 +61,9 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

/* Autolinking */
autolinkLibrariesWithApp()
}

/**
Expand All @@ -81,6 +87,7 @@ def jscFlavor = 'org.webkit:android-jsc-intl:+'
android {
ndkVersion rootProject.ext.ndkVersion

buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion rootProject.ext.compileSdkVersion

namespace "com.lnflash"
Expand Down Expand Up @@ -143,36 +150,33 @@ android {
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
def abi = output.getFilter(VariantOutput.FilterType.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 10000000 + defaultConfig.versionCode
}
}
}

packagingOptions {
pickFirst '**/libjsc.so'
packaging {
jniLibs {
pickFirsts += ['**/libjsc.so']
}
}
}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation project(':react-native-get-random-values')
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

implementation("androidx.core:core-splashscreen:1.0.0")
implementation("com.google.mlkit:barcode-scanning:17.2.0")

implementation 'com.facebook.fresco:animated-gif:2.6.0'

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
Expand All @@ -186,7 +190,17 @@ configurations.all {
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
// Replace old support library with AndroidX
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support' && details.requested.name == 'appcompat-v7') {
details.useTarget 'androidx.appcompat:appcompat:1.6.1'
}
if (details.requested.group == 'com.android.support' && details.requested.name == 'support-v4') {
details.useTarget 'androidx.legacy:legacy-support-v4:1.0.0'
}
}
}

project.ext.vectoricons = [
iconFontNames: [ 'Ionicons.ttf' ]
Expand Down
2 changes: 0 additions & 2 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/ic_notification" />
Expand Down
75 changes: 0 additions & 75 deletions android/app/src/debug/java/com/lnflash/ReactNativeFlipper.java

This file was deleted.

3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/BootTheme"> <!-- Replace @style/AppTheme with @style/BootTheme -->
android:theme="@style/BootTheme"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
46 changes: 0 additions & 46 deletions android/app/src/main/java/com/lnflash/MainActivity.java

This file was deleted.

32 changes: 32 additions & 0 deletions android/app/src/main/java/com/lnflash/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.lnflash

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

// for react-native-screens
import android.os.Bundle
import com.zoontek.rnbootsplash.RNBootSplash

class MainActivity : ReactActivity() {

/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "LNFlash"

// react-native-screens override
override fun onCreate(savedInstanceState: Bundle?) {
RNBootSplash.init(this, R.style.BootTheme) // <- initialize the splash screen
super.onCreate(null)
}

/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
62 changes: 0 additions & 62 deletions android/app/src/main/java/com/lnflash/MainApplication.java

This file was deleted.

Loading