-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies and sample application (#1043)
Co-authored-by: kailash-b <[email protected]>
- Loading branch information
Showing
30 changed files
with
23,003 additions
and
16,609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 0 additions & 78 deletions
78
example/android/app/src/main/java/com/auth0example/MainApplication.java
This file was deleted.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
example/android/app/src/main/java/com/auth0example/MainApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.auth0example | ||
|
||
import android.app.Application | ||
import android.content.BroadcastReceiver | ||
import android.content.Intent | ||
import android.content.IntentFilter | ||
import android.os.Build | ||
import com.facebook.react.PackageList | ||
import com.facebook.react.ReactApplication | ||
import com.facebook.react.ReactHost | ||
import com.facebook.react.ReactNativeHost | ||
import com.facebook.react.ReactPackage | ||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load | ||
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost | ||
import com.facebook.react.defaults.DefaultReactNativeHost | ||
import com.facebook.react.soloader.OpenSourceMergedSoMapping | ||
import com.facebook.soloader.SoLoader | ||
|
||
class MainApplication : Application(), ReactApplication { | ||
|
||
override val reactNativeHost: ReactNativeHost = | ||
object : DefaultReactNativeHost(this) { | ||
override fun getPackages(): List<ReactPackage> = | ||
PackageList(this).packages.apply { | ||
// Packages that cannot be autolinked yet can be added manually here, for example: | ||
// add(MyReactNativePackage()) | ||
} | ||
|
||
override fun getJSMainModuleName(): String = "index" | ||
|
||
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG | ||
|
||
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED | ||
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED | ||
} | ||
|
||
override val reactHost: ReactHost | ||
get() = getDefaultReactHost(applicationContext, reactNativeHost) | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
SoLoader.init(this, OpenSourceMergedSoMapping) | ||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { | ||
// If you opted-in for the New Architecture, we load the native entry point for this app. | ||
load() | ||
} | ||
} | ||
|
||
override fun registerReceiver(receiver: BroadcastReceiver?, filter: IntentFilter?): Intent? { | ||
return if (Build.VERSION.SDK_INT >= 34 && applicationInfo.targetSdkVersion >= 34) { | ||
super.registerReceiver(receiver, filter, RECEIVER_EXPORTED) | ||
} else { | ||
super.registerReceiver(receiver, filter) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } | ||
plugins { id("com.facebook.react.settings") } | ||
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } | ||
rootProject.name = 'Auth0Example' | ||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) | ||
include ':app' | ||
includeBuild('../node_modules/react-native-gradle-plugin') | ||
includeBuild('../node_modules/@react-native/gradle-plugin') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
const path = require('path'); | ||
const pak = require('../package.json'); | ||
const { getConfig } = require('react-native-builder-bob/babel-config'); | ||
const pkg = require('../package.json'); | ||
|
||
module.exports = { | ||
presets: ['module:metro-react-native-babel-preset'], | ||
plugins: [ | ||
[ | ||
'module-resolver', | ||
{ | ||
extensions: ['.tsx', '.ts', '.js', '.json'], | ||
alias: { | ||
[pak.name]: path.join(__dirname, '..', pak.source), | ||
}, | ||
}, | ||
], | ||
], | ||
}; | ||
const root = path.resolve(__dirname, '..'); | ||
|
||
module.exports = getConfig( | ||
{ | ||
presets: ['module:@react-native/babel-preset'], | ||
}, | ||
{ root, pkg } | ||
); |
Oops, something went wrong.