You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Mobile: Upgrade to React Native 0.74.1 (#10401)
This commit is contained in:
		
							
								
								
									
										5
									
								
								.github/workflows/build-android.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/build-android.yml
									
									
									
									
										vendored
									
									
								
							| @@ -25,6 +25,11 @@ jobs: | ||||
|         run: | | ||||
|           sudo apt-get update || true | ||||
|           sudo apt-get install -y libsecret-1-dev | ||||
|  | ||||
|       - uses: actions/setup-java@v4 | ||||
|         with: | ||||
|           distribution: 'temurin' | ||||
|           java-version: '20' | ||||
|            | ||||
|       - uses: actions/checkout@v4 | ||||
|  | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
 | ||||
| index 0f52b73c61625db2a3081c0950b6bdd2b06e3d40..b0fc3de4be0b3a26b638683613c63c783c2739bb 100644
 | ||||
| index 8a719ca35af1cc3a4192c5c5f8258fd4f7fea990..5f8831f81cd164a4f627423427ead92fa286b115 100644
 | ||||
| --- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
 | ||||
| +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
 | ||||
| @@ -38,7 +38,7 @@ import com.facebook.react.uimanager.common.ViewUtil;
 | ||||
| @@ -37,7 +37,7 @@ import com.facebook.react.uimanager.common.ViewUtil;
 | ||||
|  import java.util.ArrayList; | ||||
|  import java.util.List; | ||||
|  import java.util.Queue; | ||||
| @@ -11,7 +11,7 @@ index 0f52b73c61625db2a3081c0950b6bdd2b06e3d40..b0fc3de4be0b3a26b638683613c63c78 | ||||
|  import java.util.concurrent.atomic.AtomicReference; | ||||
|   | ||||
|  /** | ||||
| @@ -151,7 +151,10 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
 | ||||
| @@ -149,7 +149,10 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
 | ||||
|    } | ||||
|   | ||||
|    private class ConcurrentOperationQueue { | ||||
| @@ -104,11 +104,11 @@ | ||||
|     "react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch", | ||||
|     "eslint": "patch:eslint@8.52.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch", | ||||
|     "app-builder-lib@24.4.0": "patch:app-builder-lib@npm%3A24.4.0#./.yarn/patches/app-builder-lib-npm-24.4.0-05322ff057.patch", | ||||
|     "react-native@0.71.10": "patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch", | ||||
|     "nanoid": "patch:nanoid@npm%3A3.3.7#./.yarn/patches/nanoid-npm-3.3.7-98824ba130.patch", | ||||
|     "pdfjs-dist": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch", | ||||
|     "@react-native-community/slider": "patch:@react-native-community/slider@npm%3A4.4.4#./.yarn/patches/@react-native-community-slider-npm-4.4.4-d78e472f48.patch", | ||||
|     "husky": "patch:husky@npm%3A3.1.0#./.yarn/patches/husky-npm-3.1.0-5cc13e4e34.patch", | ||||
|     "chokidar@^2.0.0": "3.5.3" | ||||
|     "chokidar@^2.0.0": "3.5.3", | ||||
|     "react-native@0.74.1": "patch:react-native@npm%3A0.74.1#./.yarn/patches/react-native-npm-0.74.1-754c02ae9e.patch" | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -1,4 +1,9 @@ | ||||
| source 'https://rubygems.org' | ||||
|  | ||||
| # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version | ||||
| ruby '>= 2.6.10' | ||||
| gem 'cocoapods', '>= 1.11.3' | ||||
| ruby ">= 2.6.10" | ||||
|  | ||||
| # Cocoapods 1.15 introduced a bug which breaks the build. We will remove the upper | ||||
| # bound in the template on Cocoapods with next React Native release. | ||||
| gem 'cocoapods', '>= 1.13', '< 1.15' | ||||
| gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' | ||||
|   | ||||
| @@ -1,28 +1,28 @@ | ||||
| apply plugin: "com.android.application" | ||||
| apply plugin: "org.jetbrains.kotlin.android" | ||||
| apply plugin: "com.facebook.react" | ||||
|  | ||||
| import com.android.build.OutputFile | ||||
| import org.apache.tools.ant.taskdefs.condition.Os | ||||
|  | ||||
| /* This is the configuration block to customize your React Native Android app. | ||||
| /** | ||||
|  * 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 { | ||||
|     /* 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 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'. | ||||
|     //   If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. | ||||
|     // debuggableVariants = ["liteDebug", "prodDebug"] | ||||
|  | ||||
|     /* Bundling */ | ||||
|     //   A list containing the node command and its flags. Default is just 'node'. | ||||
|     // nodeExecutableAndArgs = ["node"] | ||||
| @@ -42,6 +42,7 @@ react { | ||||
|     //   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" | ||||
| @@ -50,14 +51,6 @@ react { | ||||
|     // hermesFlags = ["-O", "-output-source-map"] | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Set this to true to create four separate APKs instead of one, | ||||
|  * one for each native architecture. This is useful if you don't | ||||
|  * use App Bundles (https://developer.android.com/guide/app-bundle/) | ||||
|  * and want to have separate APKs to upload to the Play Store. | ||||
|  */ | ||||
| def enableSeparateBuildPerCPUArchitecture = false | ||||
|  | ||||
| /** | ||||
|  * Set this to true to Run Proguard on Release builds to minify the Java bytecode. | ||||
|  */ | ||||
| @@ -74,36 +67,12 @@ def enableProguardInReleaseBuilds = false | ||||
|  * give correct results when using with locales other than en-US. Note that | ||||
|  * this variant is about 6MiB larger per architecture than default. | ||||
|  */ | ||||
|   | ||||
| // We need the intl variant to support natural sorting of notes. | ||||
| // https://github.com/laurent22/joplin/pull/4272 | ||||
| def jscFlavor = 'org.webkit:android-jsc-intl:+' | ||||
|  | ||||
| /** | ||||
|  * Private function to get the list of Native Architectures you want to build. | ||||
|  * This reads the value from reactNativeArchitectures in your gradle.properties | ||||
|  * file and works together with the --active-arch-only flag of react-native run-android. | ||||
|  */ | ||||
| def reactNativeArchitectures() { | ||||
|     def value = project.getProperties().get("reactNativeArchitectures") | ||||
|     return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] | ||||
| } | ||||
| def jscFlavor = 'org.webkit:android-jsc:+' | ||||
|  | ||||
| android { | ||||
|     ndkVersion rootProject.ext.ndkVersion | ||||
|  | ||||
|     compileSdkVersion rootProject.ext.compileSdkVersion | ||||
|  | ||||
|     compileOptions { | ||||
|         sourceCompatibility JavaVersion.VERSION_1_8 | ||||
|         targetCompatibility JavaVersion.VERSION_1_8 | ||||
|     } | ||||
|  | ||||
|     // dexOptions { | ||||
|     //     // To fix "GC overhead limit exceeded" | ||||
|     //     // https://stackoverflow.com/q/32133013/561309 | ||||
|     //     javaMaxHeapSize "4g" | ||||
|     // } | ||||
|     buildToolsVersion rootProject.ext.buildToolsVersion | ||||
|     compileSdk rootProject.ext.compileSdkVersion | ||||
|  | ||||
|     namespace "net.cozic.joplin" | ||||
|     defaultConfig { | ||||
| @@ -120,17 +89,7 @@ android { | ||||
|         missingDimensionStrategy 'react-native-camera', 'general' | ||||
|  | ||||
|         // Needed to fix: The number of method references in a .dex file cannot exceed 64K | ||||
|         multiDexEnabled true    | ||||
|     } | ||||
|  | ||||
|     splits { | ||||
|         abi { | ||||
|             reset() | ||||
|             enable enableSeparateBuildPerCPUArchitecture | ||||
|             universalApk false  // If true, also generate a universal APK | ||||
|             // include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" | ||||
|             include (*reactNativeArchitectures()) | ||||
|         } | ||||
|         multiDexEnabled true | ||||
|     } | ||||
|     signingConfigs { | ||||
|         debug { | ||||
| @@ -147,7 +106,7 @@ android { | ||||
| 				keyPassword JOPLIN_RELEASE_KEY_PASSWORD | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|     } | ||||
|     buildTypes { | ||||
|         debug { | ||||
|             signingConfig signingConfigs.debug | ||||
| @@ -160,32 +119,6 @@ android { | ||||
|             proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // applicationVariants are e.g. debug, release | ||||
|     applicationVariants.all { variant -> | ||||
|         variant.outputs.each { output -> | ||||
|             // For each separate APK per architecture, set a unique version code as described here: | ||||
|             // https://developer.android.com/studio/build/configure-apk-splits.html | ||||
|             // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. | ||||
|             def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] | ||||
|             def abi = output.getFilter(OutputFile.ABI) | ||||
|             if (abi != null) {  // null for the universal-debug, universal-release variants | ||||
|                 output.versionCodeOverride = | ||||
|                         defaultConfig.versionCode * 1000 + versionCodes.get(abi) | ||||
|             } | ||||
|  | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // To fix this error: | ||||
|     // | ||||
|     // > Execution failed for task ':app:lintVitalRelease' | ||||
|     // | ||||
|     // https://stackoverflow.com/a/62603296/561309 | ||||
|     // lintOptions { | ||||
|     //     disable 'InvalidPackage' | ||||
|     //     checkReleaseBuilds false | ||||
|     // } | ||||
| } | ||||
|  | ||||
| dependencies { | ||||
| @@ -195,27 +128,14 @@ dependencies { | ||||
|         exclude group: 'com.google.android.gms', module: 'play-services-vision' | ||||
|     } | ||||
|  | ||||
|     // implementation fileTree(dir: "libs", include: ["*.jar"]) | ||||
|  | ||||
|     // The version of react-native is set by the React Native Gradle Plugin | ||||
|     implementation("com.facebook.react:react-android") | ||||
|  | ||||
|     implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.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 { | ||||
|         implementation jscFlavor | ||||
|     } | ||||
|  | ||||
|     // Needed to fix: The number of method references in a .dex file cannot exceed 64K | ||||
|     // implementation 'com.android.support:multidex:2.0.1' | ||||
| } | ||||
|  | ||||
| apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) | ||||
|   | ||||
| @@ -7,7 +7,5 @@ | ||||
|     <application | ||||
|         android:usesCleartextTraffic="true" | ||||
|         tools:targetApi="28" | ||||
|         tools:ignore="GoogleAppIndexingWarning"> | ||||
|         <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" /> | ||||
|     </application> | ||||
|         tools:ignore="GoogleAppIndexingWarning"/> | ||||
| </manifest> | ||||
|   | ||||
| @@ -1,75 +0,0 @@ | ||||
| /** | ||||
|  * Copyright (c) Meta Platforms, Inc. and affiliates. | ||||
|  * | ||||
|  * <p>This source code is licensed under the MIT license found in the LICENSE file in the root | ||||
|  * directory of this source tree. | ||||
|  */ | ||||
| package net.cozic.joplin; | ||||
|  | ||||
| import android.content.Context; | ||||
| import com.facebook.flipper.android.AndroidFlipperClient; | ||||
| import com.facebook.flipper.android.utils.FlipperUtils; | ||||
| import com.facebook.flipper.core.FlipperClient; | ||||
| import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; | ||||
| import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; | ||||
| import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; | ||||
| import com.facebook.flipper.plugins.inspector.DescriptorMapping; | ||||
| import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; | ||||
| import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; | ||||
| import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; | ||||
| import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; | ||||
| import com.facebook.react.ReactInstanceEventListener; | ||||
| import com.facebook.react.ReactInstanceManager; | ||||
| import com.facebook.react.bridge.ReactContext; | ||||
| import com.facebook.react.modules.network.NetworkingModule; | ||||
| import okhttp3.OkHttpClient; | ||||
|  | ||||
| /** | ||||
|  * Class responsible of loading Flipper inside your React Native application. This is the debug | ||||
|  * flavor of it. Here you can add your own plugins and customize the Flipper setup. | ||||
|  */ | ||||
| public class ReactNativeFlipper { | ||||
|   public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { | ||||
|     if (FlipperUtils.shouldEnableFlipper(context)) { | ||||
|       final FlipperClient client = AndroidFlipperClient.getInstance(context); | ||||
|  | ||||
|       client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); | ||||
|       client.addPlugin(new DatabasesFlipperPlugin(context)); | ||||
|       client.addPlugin(new SharedPreferencesFlipperPlugin(context)); | ||||
|       client.addPlugin(CrashReporterPlugin.getInstance()); | ||||
|  | ||||
|       NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); | ||||
|       NetworkingModule.setCustomClientBuilder( | ||||
|           new NetworkingModule.CustomClientBuilder() { | ||||
|             @Override | ||||
|             public void apply(OkHttpClient.Builder builder) { | ||||
|               builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); | ||||
|             } | ||||
|           }); | ||||
|       client.addPlugin(networkFlipperPlugin); | ||||
|       client.start(); | ||||
|  | ||||
|       // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized | ||||
|       // Hence we run if after all native modules have been initialized | ||||
|       ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); | ||||
|       if (reactContext == null) { | ||||
|         reactInstanceManager.addReactInstanceEventListener( | ||||
|             new ReactInstanceEventListener() { | ||||
|               @Override | ||||
|               public void onReactContextInitialized(ReactContext reactContext) { | ||||
|                 reactInstanceManager.removeReactInstanceEventListener(this); | ||||
|                 reactContext.runOnNativeModulesQueueThread( | ||||
|                     new Runnable() { | ||||
|                       @Override | ||||
|                       public void run() { | ||||
|                         client.addPlugin(new FrescoFlipperPlugin()); | ||||
|                       } | ||||
|                     }); | ||||
|               } | ||||
|             }); | ||||
|       } else { | ||||
|         client.addPlugin(new FrescoFlipperPlugin()); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @@ -1,35 +0,0 @@ | ||||
| package net.cozic.joplin; | ||||
|  | ||||
| import com.facebook.react.ReactActivity; | ||||
| import com.facebook.react.ReactActivityDelegate; | ||||
| import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; | ||||
| import com.facebook.react.defaults.DefaultReactActivityDelegate; | ||||
|  | ||||
| public class MainActivity extends ReactActivity { | ||||
|  | ||||
|   /** | ||||
|    * Returns the name of the main component registered from JavaScript. This is used to schedule | ||||
|    * rendering of the component. | ||||
|    */ | ||||
|   @Override | ||||
|   protected String getMainComponentName() { | ||||
|     return "Joplin"; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link | ||||
|    * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React | ||||
|    * (aka React 18) with two boolean flags. | ||||
|    */ | ||||
|   @Override | ||||
|   protected ReactActivityDelegate createReactActivityDelegate() { | ||||
|     return new DefaultReactActivityDelegate( | ||||
|       this, | ||||
|       getMainComponentName(), | ||||
|       // If you opted-in for the New Architecture, we enable the Fabric Renderer. | ||||
|       DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled | ||||
|       // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). | ||||
|       DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled | ||||
|       );     | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,22 @@ | ||||
| package net.cozic.joplin | ||||
|  | ||||
| import com.facebook.react.ReactActivity | ||||
| import com.facebook.react.ReactActivityDelegate | ||||
| import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled | ||||
| import com.facebook.react.defaults.DefaultReactActivityDelegate | ||||
|  | ||||
| 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 = "Joplin" | ||||
|  | ||||
|   /** | ||||
|    * 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) | ||||
| } | ||||
| @@ -1,94 +0,0 @@ | ||||
| package net.cozic.joplin; | ||||
|  | ||||
| import android.app.Application; | ||||
| import android.database.CursorWindow; | ||||
| import android.webkit.WebView; | ||||
|  | ||||
| // import androidx.multidex.MultiDex; | ||||
|  | ||||
| import com.facebook.react.PackageList; | ||||
| import com.facebook.react.ReactApplication; | ||||
| import com.oblador.vectoricons.VectorIconsPackage; | ||||
| import com.facebook.react.ReactNativeHost; | ||||
| import com.facebook.react.ReactPackage; | ||||
| import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; | ||||
| import com.facebook.react.defaults.DefaultReactNativeHost; | ||||
| import com.facebook.soloader.SoLoader; | ||||
|  | ||||
| import net.cozic.joplin.share.SharePackage; | ||||
| import net.cozic.joplin.ssl.SslPackage; | ||||
| import net.cozic.joplin.textinput.TextInputPackage; | ||||
|  | ||||
| import java.lang.reflect.Field; | ||||
| import java.util.List; | ||||
|  | ||||
| public class MainApplication extends Application implements ReactApplication { | ||||
|  | ||||
|   // Needed to fix: The number of method references in a .dex file cannot exceed 64K | ||||
|   // @Override | ||||
|   // protected void attachBaseContext(Context base) { | ||||
|   //    super.attachBaseContext(base); | ||||
|   //    MultiDex.install(this); | ||||
|   // } | ||||
|  | ||||
|   private final ReactNativeHost mReactNativeHost = | ||||
|       new DefaultReactNativeHost(this) { | ||||
|         @Override | ||||
|         public boolean getUseDeveloperSupport() { | ||||
|           return BuildConfig.DEBUG; | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|         protected List<ReactPackage> getPackages() { | ||||
|           @SuppressWarnings("UnnecessaryLocalVariable") | ||||
|           List<ReactPackage> packages = new PackageList(this).getPackages(); | ||||
|           // Packages that cannot be autolinked yet can be added manually here, for example: | ||||
|           packages.add(new SharePackage()); | ||||
|           packages.add(new SslPackage()); | ||||
|           packages.add(new TextInputPackage()); | ||||
|           return packages; | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|         protected String getJSMainModuleName() { | ||||
|           return "index"; | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|         protected boolean isNewArchEnabled() { | ||||
|           return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; | ||||
|         } | ||||
|         @Override | ||||
|         protected Boolean isHermesEnabled() { | ||||
|           return BuildConfig.IS_HERMES_ENABLED; | ||||
|         } | ||||
|       }; | ||||
|  | ||||
|   @Override | ||||
|   public ReactNativeHost getReactNativeHost() { | ||||
|     return mReactNativeHost; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public void onCreate() { | ||||
|     super.onCreate(); | ||||
|  | ||||
|     // To try to fix the error "Row too big to fit into CursorWindow" | ||||
| 		// https://github.com/andpor/react-native-sqlite-storage/issues/364#issuecomment-526423153 | ||||
| 		// https://github.com/laurent22/joplin/issues/1767#issuecomment-515617991 | ||||
| 		try { | ||||
| 			Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize"); | ||||
|             field.setAccessible(true); | ||||
|             field.set(null, 50 * 1024 * 1024); //the 102400 is the new size added | ||||
| 		} catch (Exception e) { | ||||
| 			e.printStackTrace(); | ||||
|     } | ||||
|      | ||||
|     SoLoader.init(this, /* native exopackage */ false); | ||||
|     if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { | ||||
|       // If you opted-in for the New Architecture, we load the native entry point for this app. | ||||
|       DefaultNewArchitectureEntryPoint.load(); | ||||
|     } | ||||
|     ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,59 @@ | ||||
| package net.cozic.joplin | ||||
|  | ||||
| import android.app.Application | ||||
| import android.database.CursorWindow | ||||
| 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.soloader.SoLoader | ||||
| import net.cozic.joplin.share.SharePackage | ||||
| import net.cozic.joplin.ssl.SslPackage | ||||
| import net.cozic.joplin.textinput.TextInputPackage | ||||
|  | ||||
| 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(SharePackage()) | ||||
|                     add(SslPackage()) | ||||
|                     add(TextInputPackage()) | ||||
|                 } | ||||
|  | ||||
|         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(this.applicationContext, reactNativeHost) | ||||
|  | ||||
|     override fun onCreate() { | ||||
|         super.onCreate() | ||||
|  | ||||
|         // To try to fix the error "Row too big to fit into CursorWindow" | ||||
|         // https://github.com/andpor/react-native-sqlite-storage/issues/364#issuecomment-526423153 | ||||
|         // https://github.com/laurent22/joplin/issues/1767#issuecomment-515617991 | ||||
|         try { | ||||
|             val field = CursorWindow::class.java.getDeclaredField("sCursorWindowSize") | ||||
|             field.isAccessible = true | ||||
|             field[null] = 50 * 1024 * 1024 //the 102400 is the new size added | ||||
|         } catch (e: Exception) { | ||||
|             e.printStackTrace() | ||||
|         } | ||||
|  | ||||
|         SoLoader.init(this,  /* native exopackage */false) | ||||
|         if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { | ||||
|             // If you opted-in for the New Architecture, we load the native entry point for this app. | ||||
|             load() | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -16,7 +16,7 @@ | ||||
|        android:insetTop="@dimen/abc_edit_text_inset_top_material" | ||||
|        android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"> | ||||
|     <selector> | ||||
|         <!--  | ||||
|         <!-- | ||||
|           This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I). | ||||
|           The item below with state_pressed="false" and state_focused="false" causes a NullPointerException. | ||||
|           NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)' | ||||
|   | ||||
| @@ -1,18 +0,0 @@ | ||||
| /** | ||||
|  * Copyright (c) Meta Platforms, Inc. and affiliates. | ||||
|  * | ||||
|  * <p>This source code is licensed under the MIT license found in the LICENSE file in the root | ||||
|  * directory of this source tree. | ||||
|  */ | ||||
| package net.cozic.joplin; | ||||
| import android.content.Context; | ||||
| import com.facebook.react.ReactInstanceManager; | ||||
| /** | ||||
|  * Class responsible of loading Flipper inside your React Native application. This is the release | ||||
|  * flavor of it so it's empty as we don't want to load Flipper. | ||||
|  */ | ||||
| public class ReactNativeFlipper { | ||||
|   public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { | ||||
|     // Do nothing as we don't want to initialize Flipper on Release. | ||||
|   } | ||||
| } | ||||
| @@ -2,23 +2,23 @@ | ||||
|  | ||||
| buildscript { | ||||
|     ext { | ||||
|         buildToolsVersion = "33.0.0" | ||||
|         minSdkVersion = 21 | ||||
|         buildToolsVersion = "34.0.0" | ||||
|         minSdkVersion = 23 | ||||
|  | ||||
|         compileSdkVersion = 33 | ||||
|         targetSdkVersion = 33 | ||||
|         compileSdkVersion = 34 | ||||
|         targetSdkVersion = 34 | ||||
|  | ||||
|         // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. | ||||
|         ndkVersion = "23.1.7779620" | ||||
|         ndkVersion = "26.1.10909125" | ||||
|         kotlinVersion = "1.9.22" | ||||
|     } | ||||
|     repositories { | ||||
|         google() | ||||
|         mavenCentral() | ||||
|     } | ||||
|     dependencies { | ||||
|         classpath("com.android.tools.build:gradle:7.3.1") | ||||
|         classpath("com.android.tools.build:gradle") | ||||
|         classpath("com.facebook.react:react-native-gradle-plugin") | ||||
|         classpath("de.undercouch:gradle-download-task:5.0.1") | ||||
|         classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") | ||||
|     } | ||||
| } | ||||
|  | ||||
| @@ -55,3 +55,5 @@ allprojects { | ||||
|         maven { url 'https://www.jitpack.io' } | ||||
|     } | ||||
| } | ||||
|   | ||||
| apply plugin: "com.facebook.react.rootproject" | ||||
|   | ||||
| @@ -25,9 +25,6 @@ android.useAndroidX=true | ||||
| # Automatically convert third-party libraries to use AndroidX | ||||
| android.enableJetifier=true | ||||
|  | ||||
| # Version of flipper SDK to use with React Native | ||||
| FLIPPER_VERSION=0.125.0 | ||||
|  | ||||
| # Use this property to specify which architecture you want to build. | ||||
| # You can also override it from the CLI using | ||||
| # ./gradlew <task> -PreactNativeArchitectures=x86_64 | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							| @@ -1,5 +1,7 @@ | ||||
| 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.6-all.zip | ||||
| networkTimeout=10000 | ||||
| validateDistributionUrl=true | ||||
| zipStoreBase=GRADLE_USER_HOME | ||||
| zipStorePath=wrapper/dists | ||||
|   | ||||
							
								
								
									
										43
									
								
								packages/app-mobile/android/gradlew
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										43
									
								
								packages/app-mobile/android/gradlew
									
									
									
									
										vendored
									
									
								
							| @@ -55,7 +55,7 @@ | ||||
| #       Darwin, MinGW, and NonStop. | ||||
| # | ||||
| #   (3) This script is generated from the Groovy template | ||||
| #       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt | ||||
| #       https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt | ||||
| #       within the Gradle project. | ||||
| # | ||||
| #       You can find Gradle at https://github.com/gradle/gradle/. | ||||
| @@ -80,13 +80,11 @@ do | ||||
|     esac | ||||
| done | ||||
|  | ||||
| APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit | ||||
|  | ||||
| APP_NAME="Gradle" | ||||
| # This is normally unused | ||||
| # shellcheck disable=SC2034 | ||||
| APP_BASE_NAME=${0##*/} | ||||
|  | ||||
| # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||||
| DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' | ||||
| # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) | ||||
| APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit | ||||
|  | ||||
| # Use the maximum available, or set MAX_FD != -1 to use that value. | ||||
| MAX_FD=maximum | ||||
| @@ -133,22 +131,29 @@ location of your Java installation." | ||||
|     fi | ||||
| else | ||||
|     JAVACMD=java | ||||
|     which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||||
|     if ! command -v java >/dev/null 2>&1 | ||||
|     then | ||||
|         die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||||
|  | ||||
| Please set the JAVA_HOME variable in your environment to match the | ||||
| location of your Java installation." | ||||
|     fi | ||||
| fi | ||||
|  | ||||
| # Increase the maximum file descriptors if we can. | ||||
| if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then | ||||
|     case $MAX_FD in #( | ||||
|       max*) | ||||
|         # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. | ||||
|         # shellcheck disable=SC2039,SC3045 | ||||
|         MAX_FD=$( ulimit -H -n ) || | ||||
|             warn "Could not query maximum file descriptor limit" | ||||
|     esac | ||||
|     case $MAX_FD in  #( | ||||
|       '' | soft) :;; #( | ||||
|       *) | ||||
|         # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. | ||||
|         # shellcheck disable=SC2039,SC3045 | ||||
|         ulimit -n "$MAX_FD" || | ||||
|             warn "Could not set maximum file descriptor limit to $MAX_FD" | ||||
|     esac | ||||
| @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then | ||||
|     done | ||||
| fi | ||||
|  | ||||
| # Collect all arguments for the java command; | ||||
| #   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of | ||||
| #     shell script including quotes and variable substitutions, so put them in | ||||
| #     double quotes to make sure that they get re-expanded; and | ||||
| #   * put everything else in single quotes, so that it's not re-expanded. | ||||
|  | ||||
| # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||||
| DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' | ||||
|  | ||||
| # Collect all arguments for the java command: | ||||
| #   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, | ||||
| #     and any embedded shellness will be escaped. | ||||
| #   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be | ||||
| #     treated as '${Hostname}' itself on the command line. | ||||
|  | ||||
| set -- \ | ||||
|         "-Dorg.gradle.appname=$APP_BASE_NAME" \ | ||||
| @@ -205,6 +214,12 @@ set -- \ | ||||
|         org.gradle.wrapper.GradleWrapperMain \ | ||||
|         "$@" | ||||
|  | ||||
| # Stop when "xargs" is not available. | ||||
| if ! command -v xargs >/dev/null 2>&1 | ||||
| then | ||||
|     die "xargs is not available" | ||||
| fi | ||||
|  | ||||
| # Use "xargs" to parse quoted args. | ||||
| # | ||||
| # With -n1 it outputs one arg per line, with the quotes and backslashes removed. | ||||
| @@ -231,4 +246,4 @@ eval "set -- $( | ||||
|         tr '\n' ' ' | ||||
|     )" '"$@"' | ||||
|  | ||||
| exec "$JAVACMD" "$@" | ||||
| exec "$JAVACMD" "$@" | ||||
|   | ||||
							
								
								
									
										55
									
								
								packages/app-mobile/android/gradlew.bat
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										55
									
								
								packages/app-mobile/android/gradlew.bat
									
									
									
									
										vendored
									
									
								
							| @@ -14,7 +14,7 @@ | ||||
| @rem limitations under the License. | ||||
| @rem | ||||
|  | ||||
| @if "%DEBUG%" == "" @echo off | ||||
| @if "%DEBUG%"=="" @echo off | ||||
| @rem ########################################################################## | ||||
| @rem | ||||
| @rem  Gradle startup script for Windows | ||||
| @@ -25,7 +25,8 @@ | ||||
| if "%OS%"=="Windows_NT" setlocal | ||||
|  | ||||
| set DIRNAME=%~dp0 | ||||
| if "%DIRNAME%" == "" set DIRNAME=. | ||||
| if "%DIRNAME%"=="" set DIRNAME=. | ||||
| @rem This is normally unused | ||||
| set APP_BASE_NAME=%~n0 | ||||
| set APP_HOME=%DIRNAME% | ||||
|  | ||||
| @@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome | ||||
|  | ||||
| set JAVA_EXE=java.exe | ||||
| %JAVA_EXE% -version >NUL 2>&1 | ||||
| if "%ERRORLEVEL%" == "0" goto init | ||||
| if %ERRORLEVEL% equ 0 goto execute | ||||
|  | ||||
| echo. | ||||
| echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||||
| echo. | ||||
| echo Please set the JAVA_HOME variable in your environment to match the | ||||
| echo location of your Java installation. | ||||
| echo. 1>&2 | ||||
| echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 | ||||
| echo. 1>&2 | ||||
| echo Please set the JAVA_HOME variable in your environment to match the 1>&2 | ||||
| echo location of your Java installation. 1>&2 | ||||
|  | ||||
| goto fail | ||||
|  | ||||
| @@ -54,48 +55,36 @@ goto fail | ||||
| set JAVA_HOME=%JAVA_HOME:"=% | ||||
| set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||||
|  | ||||
| if exist "%JAVA_EXE%" goto init | ||||
| if exist "%JAVA_EXE%" goto execute | ||||
|  | ||||
| echo. | ||||
| echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||||
| echo. | ||||
| echo Please set the JAVA_HOME variable in your environment to match the | ||||
| echo location of your Java installation. | ||||
| echo. 1>&2 | ||||
| echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 | ||||
| echo. 1>&2 | ||||
| echo Please set the JAVA_HOME variable in your environment to match the 1>&2 | ||||
| echo location of your Java installation. 1>&2 | ||||
|  | ||||
| goto fail | ||||
|  | ||||
| :init | ||||
| @rem Get command-line arguments, handling Windows variants | ||||
|  | ||||
| if not "%OS%" == "Windows_NT" goto win9xME_args | ||||
|  | ||||
| :win9xME_args | ||||
| @rem Slurp the command line arguments. | ||||
| set CMD_LINE_ARGS= | ||||
| set _SKIP=2 | ||||
|  | ||||
| :win9xME_args_slurp | ||||
| if "x%~1" == "x" goto execute | ||||
|  | ||||
| set CMD_LINE_ARGS=%* | ||||
|  | ||||
| :execute | ||||
| @rem Setup the command line | ||||
|  | ||||
| set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||||
|  | ||||
|  | ||||
| @rem Execute Gradle | ||||
| "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | ||||
| "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* | ||||
|  | ||||
| :end | ||||
| @rem End local scope for the variables with windows NT shell | ||||
| if "%ERRORLEVEL%"=="0" goto mainEnd | ||||
| if %ERRORLEVEL% equ 0 goto mainEnd | ||||
|  | ||||
| :fail | ||||
| rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | ||||
| rem the _cmd.exe /c_ return code! | ||||
| if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | ||||
| exit /b 1 | ||||
| set EXIT_CODE=%ERRORLEVEL% | ||||
| if %EXIT_CODE% equ 0 set EXIT_CODE=1 | ||||
| if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% | ||||
| exit /b %EXIT_CODE% | ||||
|  | ||||
| :mainEnd | ||||
| if "%OS%"=="Windows_NT" endlocal | ||||
|   | ||||
| @@ -3,4 +3,4 @@ include ':react-native-vector-icons' | ||||
| project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') | ||||
| 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') | ||||
| @@ -1,3 +1,3 @@ | ||||
| module.exports = { | ||||
| 	presets: ['module:metro-react-native-babel-preset'], | ||||
| 	presets: ['module:@react-native/babel-preset'], | ||||
| }; | ||||
|   | ||||
| @@ -19,7 +19,7 @@ import biometricAuthenticate from '../../biometrics/biometricAuthenticate'; | ||||
| import configScreenStyles, { ConfigScreenStyles } from './configScreenStyles'; | ||||
| import NoteExportButton, { exportButtonDescription, exportButtonDefaultTitle } from './NoteExportSection/NoteExportButton'; | ||||
| import SettingsButton from './SettingsButton'; | ||||
| import Clipboard from '@react-native-community/clipboard'; | ||||
| import Clipboard from '@react-native-clipboard/clipboard'; | ||||
| import { ReactElement, ReactNode } from 'react'; | ||||
| import SectionHeader from './SectionHeader'; | ||||
| import ExportProfileButton, { exportProfileButtonTitle } from './NoteExportSection/ExportProfileButton'; | ||||
|   | ||||
| @@ -97,8 +97,7 @@ const configScreenStyles = (themeId: number): ConfigScreenStyles => { | ||||
| 		paddingTop: 3, | ||||
| 	}; | ||||
|  | ||||
|  | ||||
| 	const styles: ConfigScreenStyleSheet = { | ||||
| 	const styleSheet = StyleSheet.create<ConfigScreenStyleSheet>({ | ||||
| 		body: { | ||||
| 			flex: 1, | ||||
| 			justifyContent: 'flex-start', | ||||
| @@ -205,9 +204,7 @@ const configScreenStyles = (themeId: number): ConfigScreenStyles => { | ||||
| 			fontWeight: 'bold', | ||||
| 		}, | ||||
| 		sidebarButtonDescriptionText, | ||||
| 	}; | ||||
|  | ||||
| 	const styleSheet = StyleSheet.create(styles); | ||||
| 	}); | ||||
|  | ||||
| 	return { | ||||
| 		styleSheet, | ||||
|   | ||||
| @@ -10,7 +10,7 @@ import { uuidgen } from '@joplin/lib/uuid'; | ||||
| import { Button } from 'react-native-paper'; | ||||
| import createRootStyle from '../../utils/createRootStyle'; | ||||
| import ScreenHeader from '../ScreenHeader'; | ||||
| import Clipboard from '@react-native-community/clipboard'; | ||||
| import Clipboard from '@react-native-clipboard/clipboard'; | ||||
| const Icon = require('react-native-vector-icons/Ionicons').default; | ||||
| import Logger from '@joplin/utils/Logger'; | ||||
|  | ||||
|   | ||||
| @@ -17,7 +17,7 @@ import Note from '@joplin/lib/models/Note'; | ||||
| import BaseItem from '@joplin/lib/models/BaseItem'; | ||||
| import Resource from '@joplin/lib/models/Resource'; | ||||
| import Folder from '@joplin/lib/models/Folder'; | ||||
| const Clipboard = require('@react-native-community/clipboard').default; | ||||
| const Clipboard = require('@react-native-clipboard/clipboard').default; | ||||
| const md5 = require('md5'); | ||||
| const { BackButtonService } = require('../../services/back-button.js'); | ||||
| import NavService, { OnNavigateCallback as OnNavigateCallback } from '@joplin/lib/services/NavService'; | ||||
|   | ||||
| @@ -223,7 +223,6 @@ | ||||
| 			buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Joplin" */; | ||||
| 			buildPhases = ( | ||||
| 				335ACF4DE85695BEBB18D8A3 /* [CP] Check Pods Manifest.lock */, | ||||
| 				FD10A7F022414F080027D42C /* Start Packager */, | ||||
| 				13B07F871A680F5B00A75B9A /* Sources */, | ||||
| 				13B07F8C1A680F5B00A75B9A /* Frameworks */, | ||||
| 				13B07F8E1A680F5B00A75B9A /* Resources */, | ||||
| @@ -334,7 +333,7 @@ | ||||
| 			); | ||||
| 			runOnlyForDeploymentPostprocessing = 0; | ||||
| 			shellPath = /bin/sh; | ||||
| 			shellScript = "export NODE_BINARY=/usr/local/bin/node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; | ||||
| 			shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; | ||||
| 		}; | ||||
| 		027E2AA6B101F8CFCA582EC1 /* [CP] Check Pods Manifest.lock */ = { | ||||
| 			isa = PBXShellScriptBuildPhase; | ||||
| @@ -430,7 +429,7 @@ | ||||
| 				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", | ||||
| 				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", | ||||
| 				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", | ||||
| 				"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", | ||||
| 				"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", | ||||
| 			); | ||||
| 			name = "[CP] Copy Pods Resources"; | ||||
| 			outputPaths = ( | ||||
| @@ -453,32 +452,13 @@ | ||||
| 				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", | ||||
| 				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", | ||||
| 				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", | ||||
| 				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", | ||||
| 				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", | ||||
| 			); | ||||
| 			runOnlyForDeploymentPostprocessing = 0; | ||||
| 			shellPath = /bin/sh; | ||||
| 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Joplin/Pods-Joplin-resources.sh\"\n"; | ||||
| 			showEnvVarsInLog = 0; | ||||
| 		}; | ||||
| 		FD10A7F022414F080027D42C /* Start Packager */ = { | ||||
| 			isa = PBXShellScriptBuildPhase; | ||||
| 			buildActionMask = 2147483647; | ||||
| 			files = ( | ||||
| 			); | ||||
| 			inputFileListPaths = ( | ||||
| 			); | ||||
| 			inputPaths = ( | ||||
| 			); | ||||
| 			name = "Start Packager"; | ||||
| 			outputFileListPaths = ( | ||||
| 			); | ||||
| 			outputPaths = ( | ||||
| 			); | ||||
| 			runOnlyForDeploymentPostprocessing = 0; | ||||
| 			shellPath = /bin/sh; | ||||
| 			shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n  if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n    if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n      echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n      exit 2\n    fi\n  else\n    open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n  fi\nfi\n"; | ||||
| 			showEnvVarsInLog = 0; | ||||
| 		}; | ||||
| /* End PBXShellScriptBuildPhase section */ | ||||
|  | ||||
| /* Begin PBXSourcesBuildPhase section */ | ||||
| @@ -533,7 +513,7 @@ | ||||
| 				DEVELOPMENT_TEAM = A9BXAFS6CT; | ||||
| 				ENABLE_BITCODE = NO; | ||||
| 				INFOPLIST_FILE = Joplin/Info.plist; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 11.0; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 13.4; | ||||
| 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||||
| 				MARKETING_VERSION = 13.0.1; | ||||
| 				OTHER_LDFLAGS = ( | ||||
| @@ -563,7 +543,7 @@ | ||||
| 				CURRENT_PROJECT_VERSION = 115; | ||||
| 				DEVELOPMENT_TEAM = A9BXAFS6CT; | ||||
| 				INFOPLIST_FILE = Joplin/Info.plist; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 11.0; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 13.4; | ||||
| 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||||
| 				MARKETING_VERSION = 13.0.1; | ||||
| 				OTHER_LDFLAGS = ( | ||||
| @@ -587,7 +567,7 @@ | ||||
| 			buildSettings = { | ||||
| 				ALWAYS_SEARCH_USER_PATHS = NO; | ||||
| 				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; | ||||
| 				CLANG_CXX_LANGUAGE_STANDARD = "c++17"; | ||||
| 				CLANG_CXX_LANGUAGE_STANDARD = "c++20"; | ||||
| 				CLANG_CXX_LIBRARY = "libc++"; | ||||
| 				CLANG_ENABLE_MODULES = YES; | ||||
| 				CLANG_ENABLE_OBJC_ARC = YES; | ||||
| @@ -630,8 +610,10 @@ | ||||
| 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||||
| 				GCC_WARN_UNUSED_FUNCTION = YES; | ||||
| 				GCC_WARN_UNUSED_VARIABLE = YES; | ||||
| 				HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n"; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 11.0; | ||||
| 				HEADER_SEARCH_PATHS = ( | ||||
| 					"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n", | ||||
| 				); | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 13.4; | ||||
| 				LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; | ||||
| 				LIBRARY_SEARCH_PATHS = ( | ||||
| 					"$(SDKROOT)/usr/lib/swift", | ||||
| @@ -640,8 +622,19 @@ | ||||
| 				); | ||||
| 				MTL_ENABLE_DEBUG_INFO = YES; | ||||
| 				ONLY_ACTIVE_ARCH = YES; | ||||
| 				OTHER_CFLAGS = "$(inherited)"; | ||||
| 				OTHER_CPLUSPLUSFLAGS = ( | ||||
| 					"$(inherited)", | ||||
| 					"-DFOLLY_NO_CONFIG", | ||||
| 					"-DFOLLY_MOBILE=1", | ||||
| 					"-DFOLLY_USE_LIBCPP=1", | ||||
| 					"-DFOLLY_CFG_NO_COROUTINES=1", | ||||
| 					"-DFOLLY_HAVE_CLOCK_GETTIME=1", | ||||
| 				); | ||||
| 				OTHER_LDFLAGS = "$(inherited)  "; | ||||
| 				REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; | ||||
| 				SDKROOT = iphoneos; | ||||
| 				USE_HERMES = true; | ||||
| 			}; | ||||
| 			name = Debug; | ||||
| 		}; | ||||
| @@ -650,7 +643,7 @@ | ||||
| 			buildSettings = { | ||||
| 				ALWAYS_SEARCH_USER_PATHS = NO; | ||||
| 				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; | ||||
| 				CLANG_CXX_LANGUAGE_STANDARD = "c++17"; | ||||
| 				CLANG_CXX_LANGUAGE_STANDARD = "c++20"; | ||||
| 				CLANG_CXX_LIBRARY = "libc++"; | ||||
| 				CLANG_ENABLE_MODULES = YES; | ||||
| 				CLANG_ENABLE_OBJC_ARC = YES; | ||||
| @@ -686,8 +679,10 @@ | ||||
| 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||||
| 				GCC_WARN_UNUSED_FUNCTION = YES; | ||||
| 				GCC_WARN_UNUSED_VARIABLE = YES; | ||||
| 				HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n"; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 11.0; | ||||
| 				HEADER_SEARCH_PATHS = ( | ||||
| 					"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\n\n", | ||||
| 				); | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 13.4; | ||||
| 				LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; | ||||
| 				LIBRARY_SEARCH_PATHS = ( | ||||
| 					"$(SDKROOT)/usr/lib/swift", | ||||
| @@ -695,8 +690,19 @@ | ||||
| 					"\"$(inherited)\"", | ||||
| 				); | ||||
| 				MTL_ENABLE_DEBUG_INFO = NO; | ||||
| 				OTHER_CFLAGS = "$(inherited)"; | ||||
| 				OTHER_CPLUSPLUSFLAGS = ( | ||||
| 					"$(inherited)", | ||||
| 					"-DFOLLY_NO_CONFIG", | ||||
| 					"-DFOLLY_MOBILE=1", | ||||
| 					"-DFOLLY_USE_LIBCPP=1", | ||||
| 					"-DFOLLY_CFG_NO_COROUTINES=1", | ||||
| 					"-DFOLLY_HAVE_CLOCK_GETTIME=1", | ||||
| 				); | ||||
| 				OTHER_LDFLAGS = "$(inherited)  "; | ||||
| 				REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; | ||||
| 				SDKROOT = iphoneos; | ||||
| 				USE_HERMES = true; | ||||
| 				VALIDATE_PRODUCT = YES; | ||||
| 			}; | ||||
| 			name = Release; | ||||
| @@ -719,7 +725,7 @@ | ||||
| 				DEVELOPMENT_TEAM = A9BXAFS6CT; | ||||
| 				GCC_C_LANGUAGE_STANDARD = gnu11; | ||||
| 				INFOPLIST_FILE = ShareExtension/Info.plist; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 11.0; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 13.4; | ||||
| 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | ||||
| 				MARKETING_VERSION = 13.0.1; | ||||
| 				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; | ||||
| @@ -757,7 +763,7 @@ | ||||
| 				DEVELOPMENT_TEAM = A9BXAFS6CT; | ||||
| 				GCC_C_LANGUAGE_STANDARD = gnu11; | ||||
| 				INFOPLIST_FILE = ShareExtension/Info.plist; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 11.0; | ||||
| 				IPHONEOS_DEPLOYMENT_TARGET = 13.4; | ||||
| 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | ||||
| 				MARKETING_VERSION = 13.0.1; | ||||
| 				MTL_FAST_MATH = YES; | ||||
|   | ||||
| @@ -81,6 +81,11 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response | ||||
| } | ||||
|  | ||||
| - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge | ||||
| { | ||||
|   return [self bundleURL]; | ||||
| } | ||||
|   | ||||
| - (NSURL *)bundleURL | ||||
| { | ||||
| #if DEBUG | ||||
|   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; | ||||
| @@ -89,14 +94,4 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response | ||||
| #endif | ||||
| } | ||||
|  | ||||
| /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. | ||||
| /// | ||||
| /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html | ||||
| /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). | ||||
| /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. | ||||
| - (BOOL)concurrentRootEnabled | ||||
| { | ||||
|   return true; | ||||
| } | ||||
|  | ||||
| @end | ||||
|   | ||||
| @@ -39,6 +39,13 @@ | ||||
| 	<true/> | ||||
| 	<key>NSAppTransportSecurity</key> | ||||
| 	<dict> | ||||
| 		<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! --> | ||||
| 		<key>NSAllowsArbitraryLoads</key> | ||||
| 		<false/> | ||||
| 		<key>NSAllowsLocalNetworking</key> | ||||
| 		<true/> | ||||
|  | ||||
| 		<!-- Left over from before upgrading from RN 0.71, 0.73 --> | ||||
| 		<key>NSExceptionDomains</key> | ||||
| 		<dict> | ||||
| 			<key>localhost</key> | ||||
| @@ -88,7 +95,7 @@ | ||||
| 	<string>LaunchScreen</string> | ||||
| 	<key>UIRequiredDeviceCapabilities</key> | ||||
| 	<array> | ||||
| 		<string>armv7</string> | ||||
| 		<string>arm64</string> | ||||
| 	</array> | ||||
| 	<key>UISupportedInterfaceOrientations</key> | ||||
| 	<array> | ||||
|   | ||||
| @@ -1,5 +1,9 @@ | ||||
| require_relative '../node_modules/react-native/scripts/react_native_pods' | ||||
| require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | ||||
| # Resolve react_native_pods.rb with node to allow for hoisting | ||||
| require Pod::Executable.execute_command('node', ['-p', | ||||
|   'require.resolve( | ||||
|     "react-native/scripts/react_native_pods.rb", | ||||
|     {paths: [process.argv[1]]}, | ||||
|   )', __dir__]).strip | ||||
|  | ||||
| # Note: it was 13.4 to get @react-native-community/datetimepicker to work but | ||||
| # it's probably not necessary actually. Just needed to upgrade XCode. | ||||
| @@ -11,16 +15,7 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ | ||||
| # 12.x, and probably 11.0 too, which is the version supported by React Native. | ||||
| platform :ios, min_ios_version_supported | ||||
| prepare_react_native_project! | ||||
| # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. | ||||
| # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded | ||||
| # | ||||
| # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` | ||||
| # ```js | ||||
| # module.exports = { | ||||
| #   dependencies: { | ||||
| #     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), | ||||
| # ``` | ||||
| flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled | ||||
|  | ||||
| linkage = ENV['USE_FRAMEWORKS'] | ||||
| if linkage != nil | ||||
|   Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green | ||||
| @@ -30,24 +25,8 @@ end | ||||
| target 'Joplin' do | ||||
|   config = use_native_modules! | ||||
|  | ||||
|   # Flags change depending on the env values. | ||||
|   flags = get_default_flags() | ||||
|  | ||||
|   use_react_native!( | ||||
|     :path => config[:reactNativePath], | ||||
|     # Hermes is now enabled by default. Disable by setting this flag to false. | ||||
|     # Upcoming versions of React Native may rely on get_default_flags(), but | ||||
|     # we make it explicit here to aid in the React Native upgrade process. | ||||
|  | ||||
|     # 2023/05/07: Leave that to `false` for now because Hermes is rubbish at | ||||
|     # reporting errors, which it makes it impossible to investigate crashes. | ||||
|     :hermes_enabled => flags[:hermes_enabled], | ||||
|     :fabric_enabled => flags[:fabric_enabled], | ||||
|     # Enables Flipper. | ||||
|     # | ||||
|     # Note that if you have use_frameworks! enabled, Flipper will not work and | ||||
|     # you should disable the next line. | ||||
|     :flipper_configuration => flipper_config, | ||||
|     # An absolute path to your application root. | ||||
|     :app_path => "#{Pod::Config.instance.installation_root}/.." | ||||
|   ) | ||||
| @@ -56,13 +35,13 @@ target 'Joplin' do | ||||
|   pod 'JoplinRNShareExtension', :path => 'ShareExtension' | ||||
|  | ||||
|   post_install do |installer| | ||||
|     # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 | ||||
|     react_native_post_install( | ||||
|       installer, | ||||
|       # Set `mac_catalyst_enabled` to `true` in order to apply patches | ||||
|       # necessary for Mac Catalyst builds | ||||
|       :mac_catalyst_enabled => false | ||||
|       config[:reactNativePath], | ||||
|       :mac_catalyst_enabled => false, | ||||
| 	  # :ccache_enabled => true | ||||
|     ) | ||||
|     __apply_Xcode_12_5_M1_post_install_workaround(installer) | ||||
|   end | ||||
| end | ||||
|  | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -35,20 +35,12 @@ | ||||
| 			See https://github.com/itinance/react-native-fs/issues/1232 for details.  | ||||
| 		--> | ||||
| 		<dict> | ||||
| 			<key>NSPrivacyAccessedAPITypeReasons</key> | ||||
| 			<array> | ||||
| 				<string>C617.1</string> | ||||
| 			</array> | ||||
| 			<key>NSPrivacyAccessedAPIType</key> | ||||
| 			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string> | ||||
| 		</dict> | ||||
| 		<dict> | ||||
| 			<string>NSPrivacyAccessedAPICategoryDiskSpace</string> | ||||
| 			<key>NSPrivacyAccessedAPITypeReasons</key> | ||||
| 			<array> | ||||
| 				<string>E174.1</string> | ||||
| 			</array> | ||||
| 			<key>NSPrivacyAccessedAPIType</key> | ||||
| 			<string>NSPrivacyAccessedAPICategoryDiskSpace</string> | ||||
| 		</dict> | ||||
| 	</array> | ||||
| 	<key>NSPrivacyCollectedDataTypes</key> | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| // Metro configuration for React Native | ||||
| // https://github.com/facebook/react-native | ||||
| // https://reactnative.dev/docs/metro | ||||
|  | ||||
| // The technique below to get the symlinked packages to work with the Metro | ||||
| // bundler comes from this comment: | ||||
| @@ -11,7 +11,7 @@ | ||||
| // https://github.com/facebook/metro/issues/1#issuecomment-511228599 | ||||
|  | ||||
| const path = require('path'); | ||||
| const { getDefaultConfig } = require('metro-config'); | ||||
| const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); | ||||
|  | ||||
| const localPackages = { | ||||
| 	'@joplin/lib': path.resolve(__dirname, '../lib/'), | ||||
| @@ -32,12 +32,14 @@ const remappedPackages = { | ||||
| 	...localPackages, | ||||
| }; | ||||
|  | ||||
| // Some packages aren't available in react-native and thus must be replaced by browserified | ||||
| // versions. For example, this allows us to `import {resolve} from 'path'` rather than | ||||
| // cSpell:disable | ||||
| // Some packages aren't available in react-native and thus must be polyfilled | ||||
| // For example, this allows us to `import {resolve} from 'path'` rather than | ||||
| // `const { resolve } = require('path-browserify')` ('path-browerify' doesn't have its own type | ||||
| // definitions). | ||||
| const browserifiedPackages = ['path']; | ||||
| for (const package of browserifiedPackages) { | ||||
| // cSpell:enable | ||||
| const polyfilledPackages = ['path']; | ||||
| for (const package of polyfilledPackages) { | ||||
| 	remappedPackages[package] = path.resolve(__dirname, `./node_modules/${package}-browserify/`); | ||||
| } | ||||
|  | ||||
| @@ -46,9 +48,13 @@ for (const [, v] of Object.entries(localPackages)) { | ||||
| 	watchedFolders.push(v); | ||||
| } | ||||
|  | ||||
| const defaultConfig = getDefaultConfig.getDefaultValues(__dirname); | ||||
| const defaultConfig = getDefaultConfig(__dirname); | ||||
|  | ||||
| module.exports = { | ||||
| // Metro configuration | ||||
| // https://facebook.github.io/metro/docs/configuration | ||||
| // | ||||
| // @type {import('metro-config').MetroConfig} | ||||
| const config = { | ||||
| 	transformer: { | ||||
| 		getTransformOptions: async () => ({ | ||||
| 			transform: { | ||||
| @@ -91,3 +97,5 @@ module.exports = { | ||||
| 	projectRoot: path.resolve(__dirname), | ||||
| 	watchFolders: watchedFolders, | ||||
| }; | ||||
|  | ||||
| module.exports = mergeConfig(defaultConfig, config); | ||||
|   | ||||
| @@ -18,15 +18,15 @@ | ||||
|     "postinstall": "jetify" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@bam.tech/react-native-image-resizer": "3.0.7", | ||||
|     "@bam.tech/react-native-image-resizer": "3.0.9", | ||||
|     "@joplin/editor": "~3.0", | ||||
|     "@joplin/lib": "~3.0", | ||||
|     "@joplin/react-native-alarm-notification": "~3.0", | ||||
|     "@joplin/react-native-saf-x": "~3.0", | ||||
|     "@joplin/renderer": "~3.0", | ||||
|     "@joplin/utils": "~3.0", | ||||
|     "@react-native-community/clipboard": "1.5.1", | ||||
|     "@react-native-community/datetimepicker": "7.6.2", | ||||
|     "@react-native-clipboard/clipboard": "1.14.1", | ||||
|     "@react-native-community/datetimepicker": "8.0.0", | ||||
|     "@react-native-community/geolocation": "3.1.0", | ||||
|     "@react-native-community/netinfo": "11.2.1", | ||||
|     "@react-native-community/push-notification-ios": "1.11.0", | ||||
| @@ -37,14 +37,13 @@ | ||||
|     "crypto-browserify": "3.12.0", | ||||
|     "deprecated-react-native-prop-types": "5.0.0", | ||||
|     "events": "3.3.0", | ||||
|     "jsc-android": "241213.1.0", | ||||
|     "lodash": "4.17.21", | ||||
|     "md5": "2.3.0", | ||||
|     "path-browserify": "1.0.1", | ||||
|     "prop-types": "15.8.1", | ||||
|     "punycode": "2.3.1", | ||||
|     "react": "18.2.0", | ||||
|     "react-native": "0.71.10", | ||||
|     "react-native": "0.74.1", | ||||
|     "react-native-camera": "4.2.1", | ||||
|     "react-native-device-info": "10.12.0", | ||||
|     "react-native-dialogbox": "0.6.10", | ||||
| @@ -62,7 +61,7 @@ | ||||
|     "react-native-popup-menu": "0.16.1", | ||||
|     "react-native-quick-actions": "0.3.13", | ||||
|     "react-native-rsa-native": "2.0.5", | ||||
|     "react-native-safe-area-context": "4.8.2", | ||||
|     "react-native-safe-area-context": "4.10.1", | ||||
|     "react-native-securerandom": "1.0.1", | ||||
|     "react-native-share": "10.0.2", | ||||
|     "react-native-side-menu-updated": "1.3.2", | ||||
| @@ -89,6 +88,8 @@ | ||||
|     "@babel/runtime": "7.20.0", | ||||
|     "@joplin/tools": "~3.0", | ||||
|     "@js-draw/material-icons": "1.16.1", | ||||
|     "@react-native/babel-preset": "0.74.83", | ||||
|     "@react-native/metro-config": "0.74.83", | ||||
|     "@testing-library/jest-native": "5.4.3", | ||||
|     "@testing-library/react-native": "12.3.3", | ||||
|     "@tsconfig/react-native": "2.0.2", | ||||
| @@ -108,7 +109,6 @@ | ||||
|     "jetifier": "2.0.0", | ||||
|     "js-draw": "1.16.1", | ||||
|     "jsdom": "22.1.0", | ||||
|     "metro-react-native-babel-preset": "0.73.9", | ||||
|     "nodemon": "3.0.3", | ||||
|     "punycode": "2.3.1", | ||||
|     "react-test-renderer": "18.2.0", | ||||
| @@ -119,5 +119,8 @@ | ||||
|     "typescript": "5.2.2", | ||||
|     "uglify-js": "3.17.4", | ||||
|     "webpack": "5.74.0" | ||||
|   }, | ||||
|   "engines": { | ||||
|     "node": ">=18" | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -7,7 +7,7 @@ import { CreateFromPdfOptions, Implementation as ImagingImplementation } from '@ | ||||
| import RNVersionInfo from 'react-native-version-info'; | ||||
| import { _ } from '@joplin/lib/locale'; | ||||
| import shim from '@joplin/lib/shim'; | ||||
| import Clipboard from '@react-native-community/clipboard'; | ||||
| import Clipboard from '@react-native-clipboard/clipboard'; | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -104,27 +104,6 @@ def configureReactNativePom(def pom) { | ||||
| } | ||||
|  | ||||
| afterEvaluate { project -> | ||||
|     // some Gradle build hooks ref: | ||||
|     // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html | ||||
|     task androidJavadoc(type: Javadoc) { | ||||
|         source = android.sourceSets.main.java.srcDirs | ||||
|         classpath += files(android.bootClasspath) | ||||
|         // Must be removed due to error "Configuration with name 'compile' not found." | ||||
|         // classpath += files(project.getConfigurations().getByName('compile').asList()) | ||||
|         include '**/*.java' | ||||
|     } | ||||
|  | ||||
|     task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { | ||||
|         classifier = 'javadoc' | ||||
|         from androidJavadoc.destinationDir | ||||
|     } | ||||
|  | ||||
|     task androidSourcesJar(type: Jar) { | ||||
|         classifier = 'sources' | ||||
|         from android.sourceSets.main.java.srcDirs | ||||
|         include '**/*.java' | ||||
|     } | ||||
|  | ||||
|     android.libraryVariants.all { variant -> | ||||
|         def name = variant.name.capitalize() | ||||
|         def javaCompileTask = variant.javaCompileProvider.get() | ||||
| @@ -133,13 +112,4 @@ afterEvaluate { project -> | ||||
|             from javaCompileTask.destinationDir | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     artifacts { | ||||
|         archives androidSourcesJar | ||||
|         archives androidJavadocJar | ||||
|     } | ||||
|  | ||||
|     task installArchives(type: Upload) { | ||||
|         configuration = configurations.archives | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user