mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-04-14 11:36:37 +00:00
Restore building standardnotes
This commit is contained in:
parent
fc090874fa
commit
3a3861a4ff
2 changed files with 289 additions and 8 deletions
|
|
@ -2,14 +2,14 @@ Categories:
|
|||
- Writing
|
||||
- Security
|
||||
License: AGPL-3.0-only
|
||||
AuthorName: Standard Notes Ltd.
|
||||
AuthorEmail: help@standardnotes.org
|
||||
WebSite: https://standardnotes.org
|
||||
SourceCode: https://github.com/standardnotes/mobile
|
||||
IssueTracker: https://github.com/standardnotes/mobile/issues
|
||||
|
||||
AutoName: S. Notes
|
||||
AutoName: Standard Notes
|
||||
Description: |-
|
||||
[Note: Archived at upstream's request, see upstream issue 292]
|
||||
|
||||
Standard Notes is a private place for your notes, thoughts, and life's work.
|
||||
|
||||
— It's simple. Standard Notes is the easiest notes app you'll ever use. That
|
||||
|
|
@ -172,8 +172,157 @@ Builds:
|
|||
- node_modules/
|
||||
- vendor/
|
||||
|
||||
ArchivePolicy: 0 versions
|
||||
AutoUpdateMode: None
|
||||
UpdateCheckMode: None
|
||||
CurrentVersion: 3.0.22
|
||||
CurrentVersionCode: 3000221
|
||||
- versionName: 3.6.5
|
||||
versionCode: 3000271
|
||||
commit: 3.6.5
|
||||
subdir: android/app/
|
||||
sudo:
|
||||
- sysctl fs.inotify.max_user_watches=524288
|
||||
- curl -Lo node.tar.gz https://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-x64.tar.gz
|
||||
- echo "7212031d7468718d7c8f5e1766380daaabe09d54611675338e7a88a97c3e31b6 node.tar.gz"
|
||||
| sha256sum -c -
|
||||
- tar xf node.tar.gz
|
||||
- cp -a node-v14.16.0-linux-x64/. /usr/local/
|
||||
- npm -g install yarn
|
||||
init:
|
||||
- cd ../..
|
||||
- yarn cache clean snjs
|
||||
- npm_config_build_from_source=true yarn --force
|
||||
patch:
|
||||
- bugsnag.patch
|
||||
gradle:
|
||||
- prod
|
||||
srclibs:
|
||||
- libsodium@1.0.18
|
||||
rm:
|
||||
- .gitmodules
|
||||
prebuild:
|
||||
- $ANDROID_HOME/tools/bin/sdkmanager 'cmake;3.10.2.4988404' > /dev/null
|
||||
- sed -i -e '/splits\ {/,+7d' -e '/detox/d' -e '/DETOX_CI/d' build.gradle
|
||||
- sed -i -e "s/versionName appVersionName/versionName \"$$VERSION$$\"/" -e "s/versionCode
|
||||
appVersionCode/versionCode $$VERCODE$$/" build.gradle
|
||||
- sed -i -e "/appVersionName/d" -e "/appVersionCode/d" build.gradle
|
||||
- sed -i -e "/@bugsnag\/react-native/d" -e "/bugsnag-sourcemaps/d" ../../package.json
|
||||
scanignore:
|
||||
- android/build.gradle
|
||||
- node_modules/hermes-engine
|
||||
- node_modules/jsc-android
|
||||
- node_modules/react-native
|
||||
- node_modules/detox/android/build.gradle
|
||||
- node_modules/detox/android/detox/detox-publishing.gradle
|
||||
- node_modules/sn-textview/android/build.gradle
|
||||
- node_modules/standard-notes-rn/android/build.gradle
|
||||
- node_modules/@react-native-community/async-storage/android/build.gradle
|
||||
- node_modules/@react-native-community/masked-view/android/build.gradle
|
||||
scandelete:
|
||||
- node_modules/
|
||||
build:
|
||||
- lib="$PWD/../../node_modules/react-native-sodium/libsodium"
|
||||
- target_sdk_version=`sed -n -E 's/.*targetSdkVersion = ([0-9]{1,2}).*/\1/p'
|
||||
../build.gradle`
|
||||
- pushd $$libsodium$$
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi${target_sdk_version}-clang"
|
||||
CFLAGS="-Os -fPIC -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -march=armv7-a"
|
||||
./configure --prefix=${lib}/libsodium-android-armv7-a/ --host=arm-linux-androideabi
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-armv8-a/
|
||||
--host=aarch64-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-i686/ --host=i686-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-westmere/
|
||||
--host=x86_64-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- popd
|
||||
ndk: r21e
|
||||
|
||||
- versionName: 3.6.6
|
||||
versionCode: 3000274
|
||||
commit: 3.6.6
|
||||
subdir: android/app/
|
||||
sudo:
|
||||
- sysctl fs.inotify.max_user_watches=524288
|
||||
- curl -Lo node.tar.gz https://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-x64.tar.gz
|
||||
- echo "7212031d7468718d7c8f5e1766380daaabe09d54611675338e7a88a97c3e31b6 node.tar.gz"
|
||||
| sha256sum -c -
|
||||
- tar xf node.tar.gz
|
||||
- cp -a node-v14.16.0-linux-x64/. /usr/local/
|
||||
- npm -g install yarn
|
||||
init:
|
||||
- cd ../..
|
||||
- yarn cache clean snjs
|
||||
- npm_config_build_from_source=true yarn --force
|
||||
patch:
|
||||
- bugsnag.patch
|
||||
gradle:
|
||||
- prod
|
||||
srclibs:
|
||||
- libsodium@1.0.18
|
||||
rm:
|
||||
- .gitmodules
|
||||
prebuild:
|
||||
- $ANDROID_HOME/tools/bin/sdkmanager 'cmake;3.10.2.4988404' > /dev/null
|
||||
- sed -i -e '/splits\ {/,+7d' -e '/detox/d' -e '/DETOX_CI/d' build.gradle
|
||||
- sed -i -e "s/versionName appVersionName/versionName \"$$VERSION$$\"/" -e "s/versionCode
|
||||
appVersionCode/versionCode $$VERCODE$$/" build.gradle
|
||||
- sed -i -e "/appVersionName/d" -e "/appVersionCode/d" build.gradle
|
||||
- sed -i -e "/@bugsnag\/react-native/d" -e "/bugsnag-sourcemaps/d" ../../package.json
|
||||
scanignore:
|
||||
- android/build.gradle
|
||||
- node_modules/hermes-engine
|
||||
- node_modules/jsc-android
|
||||
- node_modules/react-native
|
||||
- node_modules/detox/android/build.gradle
|
||||
- node_modules/detox/android/detox/detox-publishing.gradle
|
||||
- node_modules/sn-textview/android/build.gradle
|
||||
- node_modules/standard-notes-rn/android/build.gradle
|
||||
- node_modules/@react-native-community/async-storage/android/build.gradle
|
||||
- node_modules/@react-native-community/masked-view/android/build.gradle
|
||||
scandelete:
|
||||
- node_modules/
|
||||
build:
|
||||
- lib="$PWD/../../node_modules/react-native-sodium/libsodium"
|
||||
- target_sdk_version=`sed -n -E 's/.*targetSdkVersion = ([0-9]{1,2}).*/\1/p'
|
||||
../build.gradle`
|
||||
- pushd $$libsodium$$
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi${target_sdk_version}-clang"
|
||||
CFLAGS="-Os -fPIC -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -march=armv7-a"
|
||||
./configure --prefix=${lib}/libsodium-android-armv7-a/ --host=arm-linux-androideabi
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-armv8-a/
|
||||
--host=aarch64-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-i686/ --host=i686-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-westmere/
|
||||
--host=x86_64-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- popd
|
||||
ndk: r21e
|
||||
|
||||
AutoUpdateMode: Version %v
|
||||
UpdateCheckMode: HTTP
|
||||
VercodeOperation: 3000220 + %c
|
||||
UpdateCheckData: https://github.com/standardnotes/mobile/actions/workflows/build-prod.yml|(\d+)\sworkflow\sruns|https://github.com/standardnotes/mobile/releases/latest|tree/([\d.]+)
|
||||
CurrentVersion: 3.6.6
|
||||
CurrentVersionCode: 3000274
|
||||
|
|
|
|||
132
metadata/com.standardnotes/bugsnag.patch
Normal file
132
metadata/com.standardnotes/bugsnag.patch
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
diff --git a/android/app/build.gradle b/android/app/build.gradle
|
||||
index 8310498..17fe350 100644
|
||||
--- a/android/app/build.gradle
|
||||
+++ b/android/app/build.gradle
|
||||
@@ -252,5 +252,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
||||
into 'libs'
|
||||
}
|
||||
|
||||
-apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||
-apply from: "../../node_modules/@bugsnag/react-native/bugsnag-react-native.gradle"
|
||||
\ No newline at end of file
|
||||
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||
\ No newline at end of file
|
||||
diff --git a/android/app/src/main/java/com/standardnotes/MainActivity.java b/android/app/src/main/java/com/standardnotes/MainActivity.java
|
||||
index 79c701c..67fe038 100644
|
||||
--- a/android/app/src/main/java/com/standardnotes/MainActivity.java
|
||||
+++ b/android/app/src/main/java/com/standardnotes/MainActivity.java
|
||||
@@ -28,8 +28,7 @@ public class MainActivity extends ReactActivity {
|
||||
String packageName = this.getContext().getPackageName();
|
||||
Bundle props = new Bundle();
|
||||
SharedPreferences settings = this.getContext().getSharedPreferences("react-native", Context.MODE_PRIVATE);
|
||||
- String bugsnagOptOut = settings.getString("bugsnagoptout", "false");
|
||||
- props.putBoolean("bugsnagOptOut", bugsnagOptOut.equals("true"));
|
||||
+ props.putBoolean("bugsnagOptOut", true);
|
||||
if (packageName.equals("com.standardnotes.dev")) {
|
||||
props.putString("env", "dev");
|
||||
} else {
|
||||
diff --git a/android/app/src/main/java/com/standardnotes/MainApplication.java b/android/app/src/main/java/com/standardnotes/MainApplication.java
|
||||
index fe96c13..f06b13e 100644
|
||||
--- a/android/app/src/main/java/com/standardnotes/MainApplication.java
|
||||
+++ b/android/app/src/main/java/com/standardnotes/MainApplication.java
|
||||
@@ -4,8 +4,6 @@ import android.app.Application;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
-import com.bugsnag.android.BreadcrumbType;
|
||||
-import com.bugsnag.android.Configuration;
|
||||
import com.facebook.react.PackageList;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
@@ -18,7 +16,6 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
-import com.bugsnag.android.Bugsnag;
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
@@ -67,23 +64,7 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
|
||||
rebuildOkHtttp();
|
||||
|
||||
- Configuration config = Configuration.load(this);
|
||||
- config.setEnabledBreadcrumbTypes(new HashSet<BreadcrumbType>() {{
|
||||
- add(BreadcrumbType.NAVIGATION);
|
||||
- add(BreadcrumbType.STATE);
|
||||
- add(BreadcrumbType.PROCESS);
|
||||
- add(BreadcrumbType.MANUAL);
|
||||
- add(BreadcrumbType.USER);
|
||||
- add(BreadcrumbType.LOG);
|
||||
- add(BreadcrumbType.ERROR);
|
||||
- }});
|
||||
-
|
||||
SharedPreferences settings = getApplicationContext().getSharedPreferences("react-native", Context.MODE_PRIVATE);
|
||||
- String bugsnagOptOut = settings.getString("bugsnagoptout", "false");
|
||||
-
|
||||
- if (!bugsnagOptOut.equals("true")) {
|
||||
- Bugsnag.start(this, config);
|
||||
- }
|
||||
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
|
||||
diff --git a/index.js b/index.js
|
||||
index bc0dece..73806b5 100644
|
||||
--- a/index.js
|
||||
+++ b/index.js
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'react-native-gesture-handler';
|
||||
-import Bugsnag from '@bugsnag/react-native';
|
||||
import { enableScreens } from 'react-native-screens';
|
||||
import { SNLog } from '@standardnotes/snjs';
|
||||
|
||||
@@ -14,8 +13,8 @@ if (__DEV__ === false) {
|
||||
console.log = () => {};
|
||||
console.warn = () => {};
|
||||
console.error = () => {};
|
||||
- SNLog.onError = Bugsnag.notify;
|
||||
- SNLog.onLog = Bugsnag.leaveBreadcrumb;
|
||||
+ SNLog.onLog = console.log;
|
||||
+ SNLog.onError = console.error;
|
||||
} else {
|
||||
SNLog.onLog = console.log;
|
||||
SNLog.onError = console.error;
|
||||
diff --git a/src/App.tsx b/src/App.tsx
|
||||
index 8a7492f..f4ae6e4 100644
|
||||
--- a/src/App.tsx
|
||||
+++ b/src/App.tsx
|
||||
@@ -1,4 +1,3 @@
|
||||
-import Bugsnag from '@bugsnag/react-native';
|
||||
import { ActionSheetProvider } from '@expo/react-native-action-sheet';
|
||||
import { MobileApplication } from '@Lib/application';
|
||||
import { ApplicationGroup } from '@Lib/application_group';
|
||||
@@ -132,16 +131,6 @@ export const App = (props: { env: 'prod' | 'dev'; bugsnagOptOut: boolean }) => {
|
||||
MobileApplication | undefined
|
||||
>();
|
||||
|
||||
- useEffect(() => {
|
||||
- if (!__DEV__ && !props.bugsnagOptOut) {
|
||||
- try {
|
||||
- Bugsnag.start();
|
||||
- } catch {
|
||||
- console.error('Bugnsag failed to start');
|
||||
- }
|
||||
- }
|
||||
- }, [props.bugsnagOptOut]);
|
||||
-
|
||||
useEffect(() => {
|
||||
const removeAppChangeObserver = applicationGroupRef.current.addApplicationChangeObserver(
|
||||
() => {
|
||||
diff --git a/src/lib/interface.ts b/src/lib/interface.ts
|
||||
index bd37717..55d0637 100644
|
||||
--- a/src/lib/interface.ts
|
||||
+++ b/src/lib/interface.ts
|
||||
@@ -289,7 +289,7 @@ export class MobileDeviceInterface extends DeviceInterface {
|
||||
|
||||
async getBugsnagOptedOut() {
|
||||
try {
|
||||
- return (await DefaultPreference.get(BUGSNAG_OPT_OUT_KEY)) === 'true';
|
||||
+ return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
Loading…
Reference in a new issue