diff --git a/.github/workflows/android.publish.internal.yml b/.github/workflows/android.publish.internal.yml index 1dfc1b1bd..f4e243c57 100644 --- a/.github/workflows/android.publish.internal.yml +++ b/.github/workflows/android.publish.internal.yml @@ -31,7 +31,23 @@ jobs: npm run bootstrap -- --scope=mobile - name: Make Gradlew Executable - run: cd apps/mobile/native/android && chmod +x ./gradlew + run: cd apps/mobile/android && chmod +x ./gradlew + + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: false + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true - name: Install CCache uses: hendrikmuhs/ccache-action@v1.2.11 @@ -89,7 +105,7 @@ jobs: id: sign_app uses: r0adkll/sign-android-release@master with: - releaseDirectory: apps/mobile/native/android/app/build/outputs/bundle/release + releaseDirectory: apps/mobile/android/app/build/outputs/bundle/release signingKeyBase64: ${{ secrets.SIGNING_KEY }} alias: ${{ secrets.ALIAS }} keyStorePassword: ${{ secrets.KEY_PASSWORD }} @@ -104,7 +120,7 @@ jobs: id: sign_apk uses: r0adkll/sign-android-release@master with: - releaseDirectory: apps/mobile/native/android/app/build/outputs/apk/release + releaseDirectory: apps/mobile/android/app/build/outputs/apk/release signingKeyBase64: ${{ secrets.PUBLIC_SIGNING_KEY }} alias: ${{ secrets.PUBLIC_ALIAS }} keyStorePassword: ${{ secrets.PUBLIC_KEY_PASSWORD }} @@ -114,7 +130,7 @@ jobs: - name: Rename apk files run: | - cd apps/mobile/native/android/app/build/outputs/apk/release/ + cd apps/mobile/android/app/build/outputs/apk/release/ mv app-arm64-v8a-release-unsigned-signed.apk notesnook-arm64-v8a.apk mv app-armeabi-v7a-release-unsigned-signed.apk notesnook-armeabi-v7a.apk mv app-x86-release-unsigned-signed.apk notesnook-x86.apk @@ -135,7 +151,7 @@ jobs: releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}} track: beta status: completed - whatsNewDirectory: apps/mobile/native/android/releasenotes/ + whatsNewDirectory: apps/mobile/android/releasenotes/ - name: Create release draft on Github uses: softprops/action-gh-release@v1 @@ -146,10 +162,10 @@ jobs: repository: streetwriters/notesnook token: ${{ secrets.GITHUB_TOKEN }} files: | - apps/mobile/native/android/app/build/outputs/apk/release/notesnook-arm64-v8a.apk - apps/mobile/native/android/app/build/outputs/apk/release/notesnook-armeabi-v7a.apk - apps/mobile/native/android/app/build/outputs/apk/release/notesnook-x86.apk - apps/mobile/native/android/app/build/outputs/apk/release/notesnook-x86_64.apk + apps/mobile/android/app/build/outputs/apk/release/notesnook-arm64-v8a.apk + apps/mobile/android/app/build/outputs/apk/release/notesnook-armeabi-v7a.apk + apps/mobile/android/app/build/outputs/apk/release/notesnook-x86.apk + apps/mobile/android/app/build/outputs/apk/release/notesnook-x86_64.apk ${{steps.sign_app.outputs.signedReleaseFile}} - name: Upload sourcemaps @@ -157,5 +173,5 @@ jobs: with: name: sourcemaps path: | - apps/mobile/native/android/app/build/**/*.map + apps/mobile/android/app/build/**/*.map packages/editor-mobile/sourcemaps/*.map diff --git a/apps/mobile/.detoxrc.js b/apps/mobile/.detoxrc.js new file mode 100644 index 000000000..10bff8800 --- /dev/null +++ b/apps/mobile/.detoxrc.js @@ -0,0 +1,92 @@ +/** @type {Detox.DetoxConfig} */ +module.exports = { + testRunner: { + args: { + $0: "jest", + config: "e2e/jest.config.js" + }, + jest: { + setupTimeout: 120000 + } + }, + apps: { + "ios.debug": { + type: "ios.app", + binaryPath: + "ios/build/Build/Products/Debug-iphonesimulator/Notesnook.app", + build: + "xcodebuild -workspace ios/Notesnook.xcworkspace -scheme YOUR_APP -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build" + }, + "ios.release": { + type: "ios.app", + binaryPath: + "ios/build/Build/Products/Release-iphonesimulator/Notesnook.app", + build: + "xcodebuild -workspace ios/Notesnook.xcworkspace -scheme YOUR_APP -configuration Release -sdk iphonesimulator -derivedDataPath ios/build" + }, + "android.debug": { + type: "android.apk", + binaryPath: "android/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk", + testBinaryPath: + "android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk", + build: + "cd android ; ENVFILE=.env.test ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..", + reversePorts: [8081] + }, + "android.release": { + type: "android.apk", + binaryPath: + "android/app/build/outputs/apk/release/app-arm64-v8a-release.apk", + testBinaryPath: + "android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk", + build: + "cd android ; ENVFILE=.env.test ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release ; cd .." + } + }, + devices: { + simulator: { + type: "ios.simulator", + device: { + type: "iPhone 12" + } + }, + attached: { + type: "android.attached", + device: { + adbName: ".*" + } + }, + emulator: { + type: "android.emulator", + device: { + avdName: "Pixel_5_API_34" + } + } + }, + configurations: { + "ios.sim.debug": { + device: "simulator", + app: "ios.debug" + }, + "ios.sim.release": { + device: "simulator", + app: "ios.release" + }, + "android.att.debug": { + device: "attached", + app: "android.debug" + }, + "android.att.release": { + device: "attached", + app: "android.release" + }, + "android.emu.debug": { + device: "emulator", + app: "android.debug" + }, + "android.emu.release": { + device: "emulator", + app: "android.release" + } + } +}; diff --git a/apps/mobile/native/.env b/apps/mobile/.env similarity index 100% rename from apps/mobile/native/.env rename to apps/mobile/.env diff --git a/apps/mobile/native/.env.public b/apps/mobile/.env.public similarity index 100% rename from apps/mobile/native/.env.public rename to apps/mobile/.env.public diff --git a/apps/mobile/native/.env.test b/apps/mobile/.env.test similarity index 100% rename from apps/mobile/native/.env.test rename to apps/mobile/.env.test diff --git a/apps/mobile/.gitignore b/apps/mobile/.gitignore index 08c5026d6..fb3b3f4a4 100644 --- a/apps/mobile/.gitignore +++ b/apps/mobile/.gitignore @@ -4,7 +4,7 @@ artifacts/ # .DS_Store -native/android/app/src/main/assets/ +android/app/src/main/assets/ *Issues.md build_cache/ # @@ -16,11 +16,12 @@ build_cache/ .cxx/ *.keystore !debug.keystore +.kotlin/ # Xcode # -native/ios/Pods -native/ios/DerivedData +ios/Pods +ios/DerivedData build/ *.pbxuser !default.pbxuser @@ -39,7 +40,7 @@ DerivedData *.xcuserstate *.hprof **/.xcode.env.local -native/cache +cache # Android/IntelliJ # rn-build-deps/ @@ -57,7 +58,7 @@ yarn-error.log # BUCK buck-out/ \.buckd/ -*.keystore + # fastlane # @@ -69,7 +70,7 @@ buck-out/ */fastlane/report.xml */fastlane/Preview.html */fastlane/screenshots -native/vendor +vendor # Bundle artifact *.jsbundle diff --git a/apps/mobile/native/.ruby-version b/apps/mobile/.ruby-version similarity index 100% rename from apps/mobile/native/.ruby-version rename to apps/mobile/.ruby-version diff --git a/apps/mobile/native/Gemfile b/apps/mobile/Gemfile similarity index 74% rename from apps/mobile/native/Gemfile rename to apps/mobile/Gemfile index 03278dd5e..6a4c5f171 100644 --- a/apps/mobile/native/Gemfile +++ b/apps/mobile/Gemfile @@ -8,3 +8,9 @@ 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' + +# Ruby 3.4.0 has removed some libraries from the standard library. +gem 'bigdecimal' +gem 'logger' +gem 'benchmark' +gem 'mutex_m' diff --git a/apps/mobile/native/Gemfile.lock b/apps/mobile/Gemfile.lock similarity index 98% rename from apps/mobile/native/Gemfile.lock rename to apps/mobile/Gemfile.lock index c9cba65d9..3e5b901de 100644 --- a/apps/mobile/native/Gemfile.lock +++ b/apps/mobile/Gemfile.lock @@ -109,8 +109,12 @@ PLATFORMS DEPENDENCIES activesupport (>= 6.1.7.5, != 7.1.0) + benchmark + bigdecimal cocoapods (>= 1.13, != 1.15.1, != 1.15.0) concurrent-ruby (< 1.3.4) + logger + mutex_m xcodeproj (< 1.26.0) RUBY VERSION diff --git a/apps/mobile/native/android/.project b/apps/mobile/android/.project similarity index 100% rename from apps/mobile/native/android/.project rename to apps/mobile/android/.project diff --git a/apps/mobile/native/android/.settings/org.eclipse.buildship.core.prefs b/apps/mobile/android/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from apps/mobile/native/android/.settings/org.eclipse.buildship.core.prefs rename to apps/mobile/android/.settings/org.eclipse.buildship.core.prefs diff --git a/apps/mobile/native/android/app/build.gradle b/apps/mobile/android/app/build.gradle similarity index 91% rename from apps/mobile/native/android/app/build.gradle rename to apps/mobile/android/app/build.gradle index 6b2da688b..1b91affd0 100644 --- a/apps/mobile/native/android/app/build.gradle +++ b/apps/mobile/android/app/build.gradle @@ -11,13 +11,13 @@ import org.apache.tools.ant.taskdefs.condition.Os react { /* Folders */ // The root of your project, i.e. where "package.json" lives. Default is '..' - root = file("$rootDir/../") + //root = file("$rootDir/..") // The folder where the react-native NPM package is. Default is ../node_modules/react-native - reactNativeDir = file("$rootDir/../../node_modules/react-native") + //reactNativeDir = file("$rootDir/../node_modules/react-native") // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen - codegenDir = file("$rootDir/../../node_modules/react-native-codegen") + //codegenDir = file("$rootDir/../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("$rootDir/../../node_modules/react-native/cli.js") + // cliFile = file("$rootDir/../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'. @@ -44,7 +44,7 @@ react { // extraPackagerArgs = [] /* Hermes Commands */ // The hermes compiler command to run. By default it is 'hermesc' - hermesCommand = "$rootDir/../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc" + hermesCommand = "$rootDir/../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc" // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" hermesFlags = ["-O", "-output-source-map"] @@ -72,14 +72,14 @@ def enableProguardInReleaseBuilds = true * The preferred build flavor of JavaScriptCore. * * For example, to use the international variant, you can use: - * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ -def jscFlavor = 'org.webkit:android-jsc:+' +def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+' /** * Architectures to build native code for. @@ -94,7 +94,7 @@ def fdroidBuild() { } def getNpmVersion() { - def inputFile = file("$rootDir/../../package.json") + def inputFile = file("$rootDir/../package.json") def jsonPackage = new JsonSlurper().parseText(inputFile.text) print(jsonPackage["version"]) return jsonPackage["version"] @@ -124,7 +124,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled true - versionCode 3078 + versionCode 3079 versionName getNpmVersion() testBuildType System.getProperty('testBuildType', 'debug') testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' @@ -165,7 +165,7 @@ android { minifyEnabled enableProguardInReleaseBuilds shrinkResources false proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - proguardFile "${rootProject.projectDir}/../../node_modules/detox/android/detox/proguard-rules-app.pro" + proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro" buildConfigField "boolean", "FDROID_BUILD", "${fdroidBuild()}" } @@ -221,6 +221,8 @@ dependencies { implementation 'com.squareup.okhttp3:logging-interceptor:4.9.2' implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.9.2' implementation 'com.google.code.gson:gson:2.11.0' + + implementation project(":react-native-config") androidTestImplementation('com.wix:detox:+') implementation 'androidx.appcompat:appcompat:1.1.0' @@ -232,16 +234,14 @@ dependencies { } -} - - +} task deleteFiles(type: Delete) { delete './src/main/assets/static' } task copyEditorBundle(type: Copy) { - from '../../../../../packages/editor-mobile/build.bundle' + from '../../../../packages/editor-mobile/build.bundle' into './src/main/assets' } diff --git a/apps/mobile/android/app/debug.keystore b/apps/mobile/android/app/debug.keystore new file mode 100644 index 000000000..364e105ed Binary files /dev/null and b/apps/mobile/android/app/debug.keystore differ diff --git a/apps/mobile/native/android/app/proguard-rules.pro b/apps/mobile/android/app/proguard-rules.pro similarity index 100% rename from apps/mobile/native/android/app/proguard-rules.pro rename to apps/mobile/android/app/proguard-rules.pro diff --git a/apps/mobile/native/android/app/src/androidTest/java/com/streetwriters/notesnook/DetoxTest.java b/apps/mobile/android/app/src/androidTest/java/com/streetwriters/notesnook/DetoxTest.java similarity index 100% rename from apps/mobile/native/android/app/src/androidTest/java/com/streetwriters/notesnook/DetoxTest.java rename to apps/mobile/android/app/src/androidTest/java/com/streetwriters/notesnook/DetoxTest.java diff --git a/apps/mobile/native/android/app/src/debug/AndroidManifest.xml b/apps/mobile/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from apps/mobile/native/android/app/src/debug/AndroidManifest.xml rename to apps/mobile/android/app/src/debug/AndroidManifest.xml diff --git a/apps/mobile/native/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/AndroidManifest.xml rename to apps/mobile/android/app/src/main/AndroidManifest.xml diff --git a/apps/mobile/native/android/app/src/main/ic_launcher-playstore.png b/apps/mobile/android/app/src/main/ic_launcher-playstore.png similarity index 100% rename from apps/mobile/native/android/app/src/main/ic_launcher-playstore.png rename to apps/mobile/android/app/src/main/ic_launcher-playstore.png diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/BootRecieverService.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/BootRecieverService.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/BootRecieverService.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/BootRecieverService.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/BootTaskService.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/BootTaskService.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/BootTaskService.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/BootTaskService.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java similarity index 98% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java index ca82cf660..d574144de 100644 --- a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java +++ b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java @@ -21,7 +21,8 @@ import com.zoontek.rnbootsplash.RNBootSplash; public class MainActivity extends ReactActivity { @Override protected void onCreate(Bundle savedInstanceState) { - RNBootSplash.init(this); + RNBootSplash.init(this, R.style.BootTheme); + super.onCreate(null); if (BuildConfig.DEBUG) { WebView.setWebContentsDebuggingEnabled(true); diff --git a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainApplication.kt b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainApplication.kt new file mode 100644 index 000000000..41695fc01 --- /dev/null +++ b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainApplication.kt @@ -0,0 +1,27 @@ +package com.streetwriters.notesnook + +import android.app.Application +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost +import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative + +class MainApplication : Application(), ReactApplication { + override val reactHost: ReactHost by lazy { + getDefaultReactHost( + context = applicationContext, + packageList = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + add(NNativeModulePackage()); + }, + ) + } + + override fun onCreate() { + super.onCreate() + loadReactNative(this) + } +} \ No newline at end of file diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NNativeModulePackage.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NNativeModulePackage.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NNativeModulePackage.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NNativeModulePackage.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewConfigureActivity.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewConfigureActivity.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewConfigureActivity.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewConfigureActivity.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewWidget.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewWidget.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewWidget.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NotePreviewWidget.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NoteWidget.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NoteWidget.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NoteWidget.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NoteWidget.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NotesnookTileService.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NotesnookTileService.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/NotesnookTileService.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/NotesnookTileService.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/OnClearFromRecentService.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/OnClearFromRecentService.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/OnClearFromRecentService.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/OnClearFromRecentService.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/RCTNNativeModule.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/RCTNNativeModule.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/RCTNNativeModule.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/RCTNNativeModule.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ReminderViewsService.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ReminderViewsService.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ReminderViewsService.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ReminderViewsService.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ReminderWidgetProvider.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ReminderWidgetProvider.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ReminderWidgetProvider.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ReminderWidgetProvider.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ShareActivity.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ShareActivity.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ShareActivity.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ShareActivity.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ShareApplication.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ShareApplication.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/ShareApplication.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/ShareApplication.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/datatypes/BaseItem.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/datatypes/BaseItem.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/datatypes/BaseItem.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/datatypes/BaseItem.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Note.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Note.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Note.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Note.java diff --git a/apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Reminder.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Reminder.java similarity index 100% rename from apps/mobile/native/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Reminder.java rename to apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/datatypes/Reminder.java diff --git a/apps/mobile/native/android/app/src/main/res/drawable-anydpi/ic_action_name.xml b/apps/mobile/android/app/src/main/res/drawable-anydpi/ic_action_name.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-anydpi/ic_action_name.xml rename to apps/mobile/android/app/src/main/res/drawable-anydpi/ic_action_name.xml diff --git a/apps/mobile/native/android/app/src/main/res/drawable-anydpi/ic_newnote.xml b/apps/mobile/android/app/src/main/res/drawable-anydpi/ic_newnote.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-anydpi/ic_newnote.xml rename to apps/mobile/android/app/src/main/res/drawable-anydpi/ic_newnote.xml diff --git a/apps/mobile/native/android/app/src/main/res/drawable-hdpi/ic_action_name.png b/apps/mobile/android/app/src/main/res/drawable-hdpi/ic_action_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-hdpi/ic_action_name.png rename to apps/mobile/android/app/src/main/res/drawable-hdpi/ic_action_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-hdpi/ic_newnote.png b/apps/mobile/android/app/src/main/res/drawable-hdpi/ic_newnote.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-hdpi/ic_newnote.png rename to apps/mobile/android/app/src/main/res/drawable-hdpi/ic_newnote.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-hdpi/ic_stat_name.png b/apps/mobile/android/app/src/main/res/drawable-hdpi/ic_stat_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-hdpi/ic_stat_name.png rename to apps/mobile/android/app/src/main/res/drawable-hdpi/ic_stat_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-mdpi/ic_action_name.png b/apps/mobile/android/app/src/main/res/drawable-mdpi/ic_action_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-mdpi/ic_action_name.png rename to apps/mobile/android/app/src/main/res/drawable-mdpi/ic_action_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-mdpi/ic_newnote.png b/apps/mobile/android/app/src/main/res/drawable-mdpi/ic_newnote.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-mdpi/ic_newnote.png rename to apps/mobile/android/app/src/main/res/drawable-mdpi/ic_newnote.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-mdpi/ic_stat_name.png b/apps/mobile/android/app/src/main/res/drawable-mdpi/ic_stat_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-mdpi/ic_stat_name.png rename to apps/mobile/android/app/src/main/res/drawable-mdpi/ic_stat_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-nodpi/example_appwidget_preview.png b/apps/mobile/android/app/src/main/res/drawable-nodpi/example_appwidget_preview.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-nodpi/example_appwidget_preview.png rename to apps/mobile/android/app/src/main/res/drawable-nodpi/example_appwidget_preview.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-xhdpi/ic_action_name.png b/apps/mobile/android/app/src/main/res/drawable-xhdpi/ic_action_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-xhdpi/ic_action_name.png rename to apps/mobile/android/app/src/main/res/drawable-xhdpi/ic_action_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-xhdpi/ic_newnote.png b/apps/mobile/android/app/src/main/res/drawable-xhdpi/ic_newnote.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-xhdpi/ic_newnote.png rename to apps/mobile/android/app/src/main/res/drawable-xhdpi/ic_newnote.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png b/apps/mobile/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png rename to apps/mobile/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-xxhdpi/ic_action_name.png b/apps/mobile/android/app/src/main/res/drawable-xxhdpi/ic_action_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-xxhdpi/ic_action_name.png rename to apps/mobile/android/app/src/main/res/drawable-xxhdpi/ic_action_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-xxhdpi/ic_newnote.png b/apps/mobile/android/app/src/main/res/drawable-xxhdpi/ic_newnote.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-xxhdpi/ic_newnote.png rename to apps/mobile/android/app/src/main/res/drawable-xxhdpi/ic_newnote.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png b/apps/mobile/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png rename to apps/mobile/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png b/apps/mobile/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png rename to apps/mobile/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable/add_note.xml b/apps/mobile/android/app/src/main/res/drawable/add_note.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable/add_note.xml rename to apps/mobile/android/app/src/main/res/drawable/add_note.xml diff --git a/apps/mobile/native/android/app/src/main/res/drawable/edit_text.xml b/apps/mobile/android/app/src/main/res/drawable/edit_text.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable/edit_text.xml rename to apps/mobile/android/app/src/main/res/drawable/edit_text.xml diff --git a/apps/mobile/native/android/app/src/main/res/drawable/layout_bg.xml b/apps/mobile/android/app/src/main/res/drawable/layout_bg.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable/layout_bg.xml rename to apps/mobile/android/app/src/main/res/drawable/layout_bg.xml diff --git a/apps/mobile/native/android/app/src/main/res/drawable/note_widget_preview.png b/apps/mobile/android/app/src/main/res/drawable/note_widget_preview.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable/note_widget_preview.png rename to apps/mobile/android/app/src/main/res/drawable/note_widget_preview.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable/notesnooktext.png b/apps/mobile/android/app/src/main/res/drawable/notesnooktext.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable/notesnooktext.png rename to apps/mobile/android/app/src/main/res/drawable/notesnooktext.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable/reminder_preview.png b/apps/mobile/android/app/src/main/res/drawable/reminder_preview.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable/reminder_preview.png rename to apps/mobile/android/app/src/main/res/drawable/reminder_preview.png diff --git a/apps/mobile/native/android/app/src/main/res/drawable/widget_preview.png b/apps/mobile/android/app/src/main/res/drawable/widget_preview.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/drawable/widget_preview.png rename to apps/mobile/android/app/src/main/res/drawable/widget_preview.png diff --git a/apps/mobile/native/android/app/src/main/res/layout/new_note_widget.xml b/apps/mobile/android/app/src/main/res/layout/new_note_widget.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/layout/new_note_widget.xml rename to apps/mobile/android/app/src/main/res/layout/new_note_widget.xml diff --git a/apps/mobile/native/android/app/src/main/res/layout/new_note_widget_icon.xml b/apps/mobile/android/app/src/main/res/layout/new_note_widget_icon.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/layout/new_note_widget_icon.xml rename to apps/mobile/android/app/src/main/res/layout/new_note_widget_icon.xml diff --git a/apps/mobile/native/android/app/src/main/res/layout/note_widget.xml b/apps/mobile/android/app/src/main/res/layout/note_widget.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/layout/note_widget.xml rename to apps/mobile/android/app/src/main/res/layout/note_widget.xml diff --git a/apps/mobile/native/android/app/src/main/res/layout/widget_reminder_empty.xml b/apps/mobile/android/app/src/main/res/layout/widget_reminder_empty.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/layout/widget_reminder_empty.xml rename to apps/mobile/android/app/src/main/res/layout/widget_reminder_empty.xml diff --git a/apps/mobile/native/android/app/src/main/res/layout/widget_reminder_layout.xml b/apps/mobile/android/app/src/main/res/layout/widget_reminder_layout.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/layout/widget_reminder_layout.xml rename to apps/mobile/android/app/src/main/res/layout/widget_reminder_layout.xml diff --git a/apps/mobile/native/android/app/src/main/res/layout/widget_reminder_layout_small.xml b/apps/mobile/android/app/src/main/res/layout/widget_reminder_layout_small.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/layout/widget_reminder_layout_small.xml rename to apps/mobile/android/app/src/main/res/layout/widget_reminder_layout_small.xml diff --git a/apps/mobile/native/android/app/src/main/res/layout/widget_reminders.xml b/apps/mobile/android/app/src/main/res/layout/widget_reminders.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/layout/widget_reminders.xml rename to apps/mobile/android/app/src/main/res/layout/widget_reminders.xml diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/bootsplash_logo.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/bootsplash_logo.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-hdpi/bootsplash_logo.png rename to apps/mobile/android/app/src/main/res/mipmap-hdpi/bootsplash_logo.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/bootsplash_logo_dark.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/bootsplash_logo_dark.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-hdpi/bootsplash_logo_dark.png rename to apps/mobile/android/app/src/main/res/mipmap-hdpi/bootsplash_logo_dark.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png rename to apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png rename to apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png rename to apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/bootsplash_logo.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/bootsplash_logo.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-mdpi/bootsplash_logo.png rename to apps/mobile/android/app/src/main/res/mipmap-mdpi/bootsplash_logo.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/bootsplash_logo_dark.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/bootsplash_logo_dark.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-mdpi/bootsplash_logo_dark.png rename to apps/mobile/android/app/src/main/res/mipmap-mdpi/bootsplash_logo_dark.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png rename to apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png rename to apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png rename to apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo.png rename to apps/mobile/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo_dark.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo_dark.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo_dark.png rename to apps/mobile/android/app/src/main/res/mipmap-xhdpi/bootsplash_logo_dark.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png rename to apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png rename to apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png rename to apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo.png rename to apps/mobile/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo_dark.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo_dark.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo_dark.png rename to apps/mobile/android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo_dark.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png rename to apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png rename to apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png rename to apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo.png rename to apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo_dark.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo_dark.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo_dark.png rename to apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo_dark.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png rename to apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png rename to apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png similarity index 100% rename from apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png rename to apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png diff --git a/apps/mobile/native/android/app/src/main/res/values-night/colors.xml b/apps/mobile/android/app/src/main/res/values-night/colors.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/values-night/colors.xml rename to apps/mobile/android/app/src/main/res/values-night/colors.xml diff --git a/apps/mobile/native/android/app/src/main/res/values/styles.xml b/apps/mobile/android/app/src/main/res/values-night/styles.xml similarity index 88% rename from apps/mobile/native/android/app/src/main/res/values/styles.xml rename to apps/mobile/android/app/src/main/res/values-night/styles.xml index 493644f5c..76f425c9e 100644 --- a/apps/mobile/native/android/app/src/main/res/values/styles.xml +++ b/apps/mobile/android/app/src/main/res/values-night/styles.xml @@ -18,10 +18,10 @@ diff --git a/apps/mobile/native/android/app/src/main/res/values/attrs.xml b/apps/mobile/android/app/src/main/res/values/attrs.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/values/attrs.xml rename to apps/mobile/android/app/src/main/res/values/attrs.xml diff --git a/apps/mobile/native/android/app/src/main/res/values/colors.xml b/apps/mobile/android/app/src/main/res/values/colors.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/values/colors.xml rename to apps/mobile/android/app/src/main/res/values/colors.xml diff --git a/apps/mobile/native/android/app/src/main/res/values/dimens.xml b/apps/mobile/android/app/src/main/res/values/dimens.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/values/dimens.xml rename to apps/mobile/android/app/src/main/res/values/dimens.xml diff --git a/apps/mobile/native/android/app/src/main/res/values/keep.xml b/apps/mobile/android/app/src/main/res/values/keep.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/values/keep.xml rename to apps/mobile/android/app/src/main/res/values/keep.xml diff --git a/apps/mobile/native/android/app/src/main/res/values/strings.xml b/apps/mobile/android/app/src/main/res/values/strings.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/values/strings.xml rename to apps/mobile/android/app/src/main/res/values/strings.xml diff --git a/apps/mobile/native/android/app/src/main/res/values-night/styles.xml b/apps/mobile/android/app/src/main/res/values/styles.xml similarity index 85% rename from apps/mobile/native/android/app/src/main/res/values-night/styles.xml rename to apps/mobile/android/app/src/main/res/values/styles.xml index f7ae8b102..03a716fd7 100644 --- a/apps/mobile/native/android/app/src/main/res/values-night/styles.xml +++ b/apps/mobile/android/app/src/main/res/values/styles.xml @@ -17,11 +17,11 @@ - diff --git a/apps/mobile/native/android/app/src/main/res/values/themes.xml b/apps/mobile/android/app/src/main/res/values/themes.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/values/themes.xml rename to apps/mobile/android/app/src/main/res/values/themes.xml diff --git a/apps/mobile/native/android/app/src/main/res/xml/file_viewer_provider_paths.xml b/apps/mobile/android/app/src/main/res/xml/file_viewer_provider_paths.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/xml/file_viewer_provider_paths.xml rename to apps/mobile/android/app/src/main/res/xml/file_viewer_provider_paths.xml diff --git a/apps/mobile/native/android/app/src/main/res/xml/network_security_config.xml b/apps/mobile/android/app/src/main/res/xml/network_security_config.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/xml/network_security_config.xml rename to apps/mobile/android/app/src/main/res/xml/network_security_config.xml diff --git a/apps/mobile/native/android/app/src/main/res/xml/new_note_widget_info.xml b/apps/mobile/android/app/src/main/res/xml/new_note_widget_info.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/xml/new_note_widget_info.xml rename to apps/mobile/android/app/src/main/res/xml/new_note_widget_info.xml diff --git a/apps/mobile/native/android/app/src/main/res/xml/note_widget_info.xml b/apps/mobile/android/app/src/main/res/xml/note_widget_info.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/xml/note_widget_info.xml rename to apps/mobile/android/app/src/main/res/xml/note_widget_info.xml diff --git a/apps/mobile/native/android/app/src/main/res/xml/widget_reminders_info.xml b/apps/mobile/android/app/src/main/res/xml/widget_reminders_info.xml similarity index 100% rename from apps/mobile/native/android/app/src/main/res/xml/widget_reminders_info.xml rename to apps/mobile/android/app/src/main/res/xml/widget_reminders_info.xml diff --git a/apps/mobile/native/android/app/src/release/AndroidManifest.xml b/apps/mobile/android/app/src/release/AndroidManifest.xml similarity index 100% rename from apps/mobile/native/android/app/src/release/AndroidManifest.xml rename to apps/mobile/android/app/src/release/AndroidManifest.xml diff --git a/apps/mobile/native/android/app/src/release/java/com/streetwriters/notesnook/ReactNativeFlipper.java b/apps/mobile/android/app/src/release/java/com/streetwriters/notesnook/ReactNativeFlipper.java similarity index 100% rename from apps/mobile/native/android/app/src/release/java/com/streetwriters/notesnook/ReactNativeFlipper.java rename to apps/mobile/android/app/src/release/java/com/streetwriters/notesnook/ReactNativeFlipper.java diff --git a/apps/mobile/native/android/build.gradle b/apps/mobile/android/build.gradle similarity index 71% rename from apps/mobile/native/android/build.gradle rename to apps/mobile/android/build.gradle index 4024ff2fc..e972884d6 100644 --- a/apps/mobile/native/android/build.gradle +++ b/apps/mobile/android/build.gradle @@ -3,11 +3,11 @@ import org.apache.tools.ant.taskdefs.condition.Os buildscript { ext { - buildToolsVersion = "35.0.0" + buildToolsVersion = "36.0.0" minSdkVersion = 24 - compileSdkVersion = 35 - targetSdkVersion = 35 - kotlinVersion = '2.0.21' + compileSdkVersion = 36 + targetSdkVersion = 36 + kotlinVersion = '2.1.20' androidXAnnotation = "1.1.0" androidXCoreVersion = "1.7.0" androidXCore = "1.7.0" @@ -33,15 +33,9 @@ allprojects { repositories { maven { // All of Detox' artifacts are provided via the npm module - url "$rootDir/../../node_modules/detox/Detox-android" + url "$rootDir/../node_modules/detox/Detox-android" } maven { url 'https://www.jitpack.io' } } - - // tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - // kotlinOptions { - // jvmTarget = "11" - // } - // } } diff --git a/apps/mobile/native/android/gradle.properties b/apps/mobile/android/gradle.properties similarity index 91% rename from apps/mobile/native/android/gradle.properties rename to apps/mobile/android/gradle.properties index 8933c40bd..e64948503 100644 --- a/apps/mobile/native/android/gradle.properties +++ b/apps/mobile/android/gradle.properties @@ -34,12 +34,17 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=false +newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. hermesEnabled=true +# Use this property to enable edge-to-edge display support. +# This allows your app to draw behind system bars for an immersive UI. +# Note: Only works with ReactActivity and should not be used with custom Activity. +edgeToEdgeEnabled=true + # V8 Cache Mode Config # v8.cacheMode=none # v8.android.tools.dir=/home/ammarahm-ed/Repos/notesnook-mobile/node_modules/v8-android-jit-nointl/dist/tools/android diff --git a/apps/mobile/android/gradle/wrapper/gradle-wrapper.jar b/apps/mobile/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..1b33c55ba Binary files /dev/null and b/apps/mobile/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/apps/mobile/native/android/gradle/wrapper/gradle-wrapper.properties b/apps/mobile/android/gradle/wrapper/gradle-wrapper.properties similarity index 84% rename from apps/mobile/native/android/gradle/wrapper/gradle-wrapper.properties rename to apps/mobile/android/gradle/wrapper/gradle-wrapper.properties index 79eb9d003..c96a0c312 100644 --- a/apps/mobile/native/android/gradle/wrapper/gradle-wrapper.properties +++ b/apps/mobile/android/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip -networkTimeout=10000 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip +networkTimeout=100000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/mobile/native/android/gradlew b/apps/mobile/android/gradlew similarity index 96% rename from apps/mobile/native/android/gradlew rename to apps/mobile/android/gradlew index f5feea6d6..23d15a936 100755 --- a/apps/mobile/native/android/gradlew +++ b/apps/mobile/android/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi 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, +# * DEFAULT_JVM_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. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/apps/mobile/native/android/gradlew.bat b/apps/mobile/android/gradlew.bat similarity index 89% rename from apps/mobile/native/android/gradlew.bat rename to apps/mobile/android/gradlew.bat index 9d21a2183..dd2b8eedb 100644 --- a/apps/mobile/native/android/gradlew.bat +++ b/apps/mobile/android/gradlew.bat @@ -1,3 +1,8 @@ +@REM Copyright (c) Meta Platforms, Inc. and affiliates. +@REM +@REM This source code is licensed under the MIT license found in the +@REM LICENSE file in the root directory of this source tree. + @rem @rem Copyright 2015 the original author or authors. @rem @@ -70,11 +75,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/apps/mobile/native/android/releasenotes/whatsnew-en-US b/apps/mobile/android/releasenotes/whatsnew-en-US similarity index 100% rename from apps/mobile/native/android/releasenotes/whatsnew-en-US rename to apps/mobile/android/releasenotes/whatsnew-en-US diff --git a/apps/mobile/android/settings.gradle b/apps/mobile/android/settings.gradle new file mode 100644 index 000000000..2bb26b34f --- /dev/null +++ b/apps/mobile/android/settings.gradle @@ -0,0 +1,11 @@ +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 = 'Notesnook' +include ':app' +includeBuild('../node_modules/@react-native/gradle-plugin') + +include ":react-native-config" +project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android') +include ":lazysodium-android" +project(':lazysodium-android').projectDir = new File(rootProject.projectDir, '../node_modules/@ammarahmed/react-native-sodium/android/lazysodium-android/app') diff --git a/apps/mobile/native/app.json b/apps/mobile/app.json similarity index 100% rename from apps/mobile/native/app.json rename to apps/mobile/app.json diff --git a/apps/mobile/app/app.tsx b/apps/mobile/app/app.tsx index 5f88fb2ce..9f65ad816 100644 --- a/apps/mobile/app/app.tsx +++ b/apps/mobile/app/app.tsx @@ -132,7 +132,9 @@ export const withTheme = (Element: (props: any) => JSX.Element) => { const listener = Appearance.addChangeListener(({ colorScheme }) => { if (colorScheme && SettingsService.getProperty("useSystemTheme")) { - useThemeStore.getState().setColorScheme(colorScheme); + useThemeStore + .getState() + .setColorScheme(colorScheme as "light" | "dark"); } }); return () => { diff --git a/apps/mobile/app/common/database/encryption.ts b/apps/mobile/app/common/database/encryption.ts index e3920d948..03027c18b 100644 --- a/apps/mobile/app/common/database/encryption.ts +++ b/apps/mobile/app/common/database/encryption.ts @@ -94,9 +94,7 @@ export async function encryptDatabaseKeyWithPassword(appLockPassword: string) { } export async function restoreDatabaseKeyToKeyChain(appLockPassword: string) { - const databaseKeyCipher: Cipher = CipherStorage.getMap( - DB_KEY_CIPHER - ) as Cipher; + const databaseKeyCipher = CipherStorage.getMap(DB_KEY_CIPHER) as Cipher; const databaseKey = (await decrypt( { password: appLockPassword @@ -207,9 +205,8 @@ export async function getDatabaseKey(appLockPassword?: string) { } if (await Keychain.hasInternetCredentials("notesnook")) { - const userKeyCredentials = await Keychain.getInternetCredentials( - "notesnook" - ); + const userKeyCredentials = + await Keychain.getInternetCredentials("notesnook"); if (userKeyCredentials) { const userKeyCipher: Cipher = (await encrypt( diff --git a/apps/mobile/app/common/database/index.ts b/apps/mobile/app/common/database/index.ts index cae6785ab..ec65abff6 100644 --- a/apps/mobile/app/common/database/index.ts +++ b/apps/mobile/app/common/database/index.ts @@ -72,8 +72,8 @@ export async function setupDatabase(password?: string) { ({ compress: Gzip.deflate, decompress: Gzip.inflate - } as ICompressor), - batchSize: 100, + }) as ICompressor, + batchSize: 50, sqliteOptions: { dialect: (name) => ({ createDriver: () => { diff --git a/apps/mobile/app/common/filesystem/download.ts b/apps/mobile/app/common/filesystem/download.ts index b9fad08a6..1448d2875 100644 --- a/apps/mobile/app/common/filesystem/download.ts +++ b/apps/mobile/app/common/filesystem/download.ts @@ -115,7 +115,13 @@ export async function downloadFile( .progress(async (recieved, total) => { useAttachmentStore .getState() - .setProgress(0, total, filename, recieved, "download"); + .setProgress( + 0, + parseInt(total), + filename, + parseInt(recieved), + "download" + ); DatabaseLogger.log(`Downloading: ${filename}, ${recieved}/${total}`); }); diff --git a/apps/mobile/app/components/announcements/announcement.js b/apps/mobile/app/components/announcements/announcement.tsx similarity index 97% rename from apps/mobile/app/components/announcements/announcement.js rename to apps/mobile/app/components/announcements/announcement.tsx index dfa599939..329ccc282 100644 --- a/apps/mobile/app/components/announcements/announcement.js +++ b/apps/mobile/app/components/announcements/announcement.tsx @@ -30,7 +30,7 @@ import { AppFontSize } from "../../utils/size"; import { Button } from "../ui/button"; import { strings } from "@notesnook/intl"; -export const Announcement = ({ color }) => { +export const Announcement = () => { const { colors } = useThemeColors(); const [announcements, remove] = useMessageStore((state) => [ state.announcements, @@ -82,7 +82,6 @@ export const Announcement = ({ color }) => {