diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_108.png b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_108.png new file mode 100644 index 0000000..fc24e82 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_108.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_162.png b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_162.png new file mode 100644 index 0000000..7e41407 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_162.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_216.png b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_216.png new file mode 100644 index 0000000..7f5afeb Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_216.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_324.png b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_324.png new file mode 100644 index 0000000..353c950 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_324.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_432.png b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_432.png new file mode 100644 index 0000000..ebd0727 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-transparent/icon_432.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_144.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_144.png new file mode 100644 index 0000000..d8f34b2 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_144.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_192.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_192.png new file mode 100644 index 0000000..4897fa4 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_192.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_48.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_48.png new file mode 100644 index 0000000..62c9b1d Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_48.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_72.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_72.png new file mode 100644 index 0000000..56e4c84 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_72.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_96.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_96.png new file mode 100644 index 0000000..c346bf8 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_96.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_144.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_144.png new file mode 100644 index 0000000..34abe42 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_144.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_192.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_192.png new file mode 100644 index 0000000..690fe9d Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_192.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_48.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_48.png new file mode 100644 index 0000000..0c3e913 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_48.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_72.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_72.png new file mode 100644 index 0000000..d87db0f Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_72.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_96.png b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_96.png new file mode 100644 index 0000000..0c699f2 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/android-standard-square/android-standard-square-350c0ec69bbec055c7963a77834af0a36d7f0abc30cd4cbc96b7762ab5b1a127-cover-#060612/icon_96.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_200.png b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_200.png new file mode 100644 index 0000000..1d7e3fa Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_200.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_300.png b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_300.png new file mode 100644 index 0000000..795f1d1 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_300.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_400.png b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_400.png new file mode 100644 index 0000000..3f97f5c Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_400.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_600.png b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_600.png new file mode 100644 index 0000000..cf6a5eb Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_600.png differ diff --git a/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_800.png b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_800.png new file mode 100644 index 0000000..247be41 Binary files /dev/null and b/apps/app_zen_box/.expo/web/cache/production/images/splash-android/splash-android-319c98bdd543d5b6446560bb0137d613a1c78af4295756dd68e6f75ca5737a91-contain/icon_800.png differ diff --git a/apps/app_zen_box/android/.gitignore b/apps/app_zen_box/android/.gitignore new file mode 100644 index 0000000..8a6be07 --- /dev/null +++ b/apps/app_zen_box/android/.gitignore @@ -0,0 +1,16 @@ +# OSX +# +.DS_Store + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof +.cxx/ + +# Bundle artifacts +*.jsbundle diff --git a/apps/app_zen_box/android/app/build.gradle b/apps/app_zen_box/android/app/build.gradle new file mode 100644 index 0000000..7facfb1 --- /dev/null +++ b/apps/app_zen_box/android/app/build.gradle @@ -0,0 +1,182 @@ +apply plugin: "com.android.application" +apply plugin: "org.jetbrains.kotlin.android" +apply plugin: "com.facebook.react" + +def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath() + +/** + * 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 { + entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim()) + reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() + hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc" + codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() + + enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean() + // Use Expo CLI to bundle the app, this ensures the Metro config + // works correctly with Expo projects. + cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim()) + bundleCommand = "export:embed" + + /* 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") + + /* 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"] + + // + // The path to the CLI configuration file. Default is empty. + // bundleConfig = file(../rn-cli.config.js) + // + // The name of the generated asset file containing your JS bundle + // bundleAssetName = "MyApplication.android.bundle" + // + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' + // entryFile = file("../js/MyApplication.android.js") + // + // 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" + // + // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" + // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() +} + +/** + * Set this to true in release builds to optimize the app using [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization). + */ +def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBuilds') ?: false).toBoolean() + +/** + * The preferred build flavor of JavaScriptCore (JSC) + * + * For example, to use the international variant, you can use: + * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * + * 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 = 'io.github.react-native-community:jsc-android:2026004.+' + +android { + ndkVersion rootProject.ext.ndkVersion + + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion + + namespace 'com.yangdafe.zenbox' + defaultConfig { + applicationId 'com.yangdafe.zenbox' + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode 1 + versionName "1.0.0" + + buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" + } + signingConfigs { + debug { + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' + } + } + buildTypes { + debug { + signingConfig signingConfigs.debug + } + release { + // Caution! In production, you need to generate your own keystore file. + // see https://reactnative.dev/docs/signed-apk-android. + signingConfig signingConfigs.debug + def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false' + shrinkResources enableShrinkResources.toBoolean() + minifyEnabled enableMinifyInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + def enablePngCrunchInRelease = findProperty('android.enablePngCrunchInReleaseBuilds') ?: 'true' + crunchPngs enablePngCrunchInRelease.toBoolean() + } + } + packagingOptions { + jniLibs { + def enableLegacyPackaging = findProperty('expo.useLegacyPackaging') ?: 'false' + useLegacyPackaging enableLegacyPackaging.toBoolean() + } + } + androidResources { + ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~' + } +} + +// Apply static values from `gradle.properties` to the `android.packagingOptions` +// Accepts values in comma delimited lists, example: +// android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini +["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop -> + // Split option: 'foo,bar' -> ['foo', 'bar'] + def options = (findProperty("android.packagingOptions.$prop") ?: "").split(","); + // Trim all elements in place. + for (i in 0.. 0) { + println "android.packagingOptions.$prop += $options ($options.length)" + // Ex: android.packagingOptions.pickFirsts += '**/SCCS/**' + options.each { + android.packagingOptions[prop] += it + } + } +} + +dependencies { + // The version of react-native is set by the React Native Gradle Plugin + implementation("com.facebook.react:react-android") + + def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true"; + def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true"; + def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true"; + + if (isGifEnabled) { + // For animated gif support + implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}") + } + + if (isWebpEnabled) { + // For webp support + implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}") + if (isWebpAnimatedEnabled) { + // Animated webp support + implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}") + } + } + + if (hermesEnabled.toBoolean()) { + implementation("com.facebook.react:hermes-android") + } else { + implementation jscFlavor + } +} diff --git a/apps/app_zen_box/android/app/debug.keystore b/apps/app_zen_box/android/app/debug.keystore new file mode 100644 index 0000000..364e105 Binary files /dev/null and b/apps/app_zen_box/android/app/debug.keystore differ diff --git a/apps/app_zen_box/android/app/proguard-rules.pro b/apps/app_zen_box/android/app/proguard-rules.pro new file mode 100644 index 0000000..551eb41 --- /dev/null +++ b/apps/app_zen_box/android/app/proguard-rules.pro @@ -0,0 +1,14 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# react-native-reanimated +-keep class com.swmansion.reanimated.** { *; } +-keep class com.facebook.react.turbomodule.** { *; } + +# Add any project specific keep options here: diff --git a/apps/app_zen_box/android/app/src/debug/AndroidManifest.xml b/apps/app_zen_box/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..3ec2507 --- /dev/null +++ b/apps/app_zen_box/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/apps/app_zen_box/android/app/src/debugOptimized/AndroidManifest.xml b/apps/app_zen_box/android/app/src/debugOptimized/AndroidManifest.xml new file mode 100644 index 0000000..3ec2507 --- /dev/null +++ b/apps/app_zen_box/android/app/src/debugOptimized/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/apps/app_zen_box/android/app/src/main/AndroidManifest.xml b/apps/app_zen_box/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..cba6d81 --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/app_zen_box/android/app/src/main/java/com/yangdafe/zenbox/MainActivity.kt b/apps/app_zen_box/android/app/src/main/java/com/yangdafe/zenbox/MainActivity.kt new file mode 100644 index 0000000..6d86781 --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/java/com/yangdafe/zenbox/MainActivity.kt @@ -0,0 +1,65 @@ +package com.yangdafe.zenbox +import expo.modules.splashscreen.SplashScreenManager + +import android.os.Build +import android.os.Bundle + +import com.facebook.react.ReactActivity +import com.facebook.react.ReactActivityDelegate +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled +import com.facebook.react.defaults.DefaultReactActivityDelegate + +import expo.modules.ReactActivityDelegateWrapper + +class MainActivity : ReactActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + // Set the theme to AppTheme BEFORE onCreate to support + // coloring the background, status bar, and navigation bar. + // This is required for expo-splash-screen. + // setTheme(R.style.AppTheme); + // @generated begin expo-splashscreen - expo prebuild (DO NOT MODIFY) sync-f3ff59a738c56c9a6119210cb55f0b613eb8b6af + SplashScreenManager.registerOnActivity(this) + // @generated end expo-splashscreen + super.onCreate(null) + } + + /** + * Returns the name of the main component registered from JavaScript. This is used to schedule + * rendering of the component. + */ + override fun getMainComponentName(): String = "main" + + /** + * 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 { + return ReactActivityDelegateWrapper( + this, + BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, + object : DefaultReactActivityDelegate( + this, + mainComponentName, + fabricEnabled + ){}) + } + + /** + * Align the back button behavior with Android S + * where moving root activities to background instead of finishing activities. + * @see onBackPressed + */ + override fun invokeDefaultOnBackPressed() { + if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) { + if (!moveTaskToBack(false)) { + // For non-root activities, use the default implementation to finish them. + super.invokeDefaultOnBackPressed() + } + return + } + + // Use the default back button implementation on Android S + // because it's doing more than [Activity.moveTaskToBack] in fact. + super.invokeDefaultOnBackPressed() + } +} diff --git a/apps/app_zen_box/android/app/src/main/java/com/yangdafe/zenbox/MainApplication.kt b/apps/app_zen_box/android/app/src/main/java/com/yangdafe/zenbox/MainApplication.kt new file mode 100644 index 0000000..aadc9f4 --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/java/com/yangdafe/zenbox/MainApplication.kt @@ -0,0 +1,56 @@ +package com.yangdafe.zenbox + +import android.app.Application +import android.content.res.Configuration + +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative +import com.facebook.react.ReactNativeHost +import com.facebook.react.ReactPackage +import com.facebook.react.ReactHost +import com.facebook.react.common.ReleaseLevel +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint +import com.facebook.react.defaults.DefaultReactNativeHost + +import expo.modules.ApplicationLifecycleDispatcher +import expo.modules.ReactNativeHostWrapper + +class MainApplication : Application(), ReactApplication { + + override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper( + this, + object : DefaultReactNativeHost(this) { + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } + + override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + } + ) + + override val reactHost: ReactHost + get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + DefaultNewArchitectureEntryPoint.releaseLevel = try { + ReleaseLevel.valueOf(BuildConfig.REACT_NATIVE_RELEASE_LEVEL.uppercase()) + } catch (e: IllegalArgumentException) { + ReleaseLevel.STABLE + } + loadReactNative(this) + ApplicationLifecycleDispatcher.onApplicationCreate(this) + } + + override fun onConfigurationChanged(newConfig: Configuration) { + super.onConfigurationChanged(newConfig) + ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig) + } +} diff --git a/apps/app_zen_box/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png b/apps/app_zen_box/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png new file mode 100644 index 0000000..ed4826e Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png differ diff --git a/apps/app_zen_box/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png b/apps/app_zen_box/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png new file mode 100644 index 0000000..ad41c70 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png differ diff --git a/apps/app_zen_box/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png b/apps/app_zen_box/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png new file mode 100644 index 0000000..4b5ae35 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png differ diff --git a/apps/app_zen_box/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png b/apps/app_zen_box/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png new file mode 100644 index 0000000..eec99b5 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png differ diff --git a/apps/app_zen_box/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png b/apps/app_zen_box/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png new file mode 100644 index 0000000..e7a5a8e Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png differ diff --git a/apps/app_zen_box/android/app/src/main/res/drawable/ic_launcher_background.xml b/apps/app_zen_box/android/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..883b2a0 --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/app_zen_box/android/app/src/main/res/drawable/rn_edit_text_material.xml b/apps/app_zen_box/android/app/src/main/res/drawable/rn_edit_text_material.xml new file mode 100644 index 0000000..5c25e72 --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/app_zen_box/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..3941bea --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/apps/app_zen_box/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..3941bea --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..d87db0f Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..7e41407 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..56e4c84 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..0c3e913 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..fc24e82 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62c9b1d Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..0c699f2 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..7f5afeb Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..c346bf8 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..34abe42 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..353c950 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..d8f34b2 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..690fe9d Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..ebd0727 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..4897fa4 Binary files /dev/null and b/apps/app_zen_box/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/apps/app_zen_box/android/app/src/main/res/values-night/colors.xml b/apps/app_zen_box/android/app/src/main/res/values-night/colors.xml new file mode 100644 index 0000000..3c05de5 --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/values-night/colors.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/app_zen_box/android/app/src/main/res/values/colors.xml b/apps/app_zen_box/android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..5a10c89 --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ + + #060612 + #060612 + #023c69 + #060612 + \ No newline at end of file diff --git a/apps/app_zen_box/android/app/src/main/res/values/strings.xml b/apps/app_zen_box/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..cf23eaf --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/values/strings.xml @@ -0,0 +1,5 @@ + + 观空禅音 + contain + false + \ No newline at end of file diff --git a/apps/app_zen_box/android/app/src/main/res/values/styles.xml b/apps/app_zen_box/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..a7c22cf --- /dev/null +++ b/apps/app_zen_box/android/app/src/main/res/values/styles.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/apps/app_zen_box/android/build.gradle b/apps/app_zen_box/android/build.gradle new file mode 100644 index 0000000..5ca274f --- /dev/null +++ b/apps/app_zen_box/android/build.gradle @@ -0,0 +1,28 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + maven { url 'https://maven.aliyun.com/repository/google' } + maven { url 'https://maven.aliyun.com/repository/public' } + google() + mavenCentral() + } + dependencies { + classpath('com.android.tools.build:gradle') + classpath('com.facebook.react:react-native-gradle-plugin') + classpath('org.jetbrains.kotlin:kotlin-gradle-plugin') + } +} + +allprojects { + repositories { + maven { url 'https://maven.aliyun.com/repository/google' } + maven { url 'https://maven.aliyun.com/repository/public' } + google() + mavenCentral() + maven { url 'https://www.jitpack.io' } + } +} + +apply plugin: "expo-root-project" +apply plugin: "com.facebook.react.rootproject" diff --git a/apps/app_zen_box/android/gradle.properties b/apps/app_zen_box/android/gradle.properties new file mode 100644 index 0000000..d11c822 --- /dev/null +++ b/apps/app_zen_box/android/gradle.properties @@ -0,0 +1,13 @@ +# Project-wide Gradle settings. + +org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m + +android.useAndroidX=true + +# React Native +hermesEnabled=true +newArchEnabled=true + +# Disable toolchain auto-provisioning, use local JDK +org.gradle.java.installations.auto-download=false +org.gradle.java.installations.paths=C\:\\Program Files\\Java\\jdk-17.0.19+10 diff --git a/apps/app_zen_box/android/gradle/wrapper/gradle-wrapper.jar b/apps/app_zen_box/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..1b33c55 Binary files /dev/null and b/apps/app_zen_box/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/apps/app_zen_box/android/gradle/wrapper/gradle-wrapper.properties b/apps/app_zen_box/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e600956 --- /dev/null +++ b/apps/app_zen_box/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.14.3-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/apps/app_zen_box/android/gradlew b/apps/app_zen_box/android/gradlew new file mode 100644 index 0000000..7f94d3d --- /dev/null +++ b/apps/app_zen_box/android/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# 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\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + 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 +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# 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" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# 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. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/apps/app_zen_box/android/gradlew.bat b/apps/app_zen_box/android/gradlew.bat new file mode 100644 index 0000000..db3a6ac --- /dev/null +++ b/apps/app_zen_box/android/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +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 + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +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 + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%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 +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! +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 + +:omega diff --git a/apps/app_zen_box/android/settings.gradle b/apps/app_zen_box/android/settings.gradle new file mode 100644 index 0000000..52e0dfb --- /dev/null +++ b/apps/app_zen_box/android/settings.gradle @@ -0,0 +1,46 @@ +pluginManagement { + repositories { + maven { url 'https://maven.aliyun.com/repository/google' } + maven { url 'https://maven.aliyun.com/repository/public' } + google() + gradlePluginPortal() + mavenCentral() + } + def reactNativeGradlePlugin = new File( + providers.exec { + workingDir(rootDir) + commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })") + }.standardOutput.asText.get().trim() + ).getParentFile().absolutePath + includeBuild(reactNativeGradlePlugin) + + def expoPluginsPath = new File( + providers.exec { + workingDir(rootDir) + commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })") + }.standardOutput.asText.get().trim(), + "../android/expo-gradle-plugin" + ).absolutePath + includeBuild(expoPluginsPath) +} + +plugins { + id("com.facebook.react.settings") + id("expo-autolinking-settings") +} + +extensions.configure(com.facebook.react.ReactSettingsExtension) { ex -> + if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') { + ex.autolinkLibrariesFromCommand() + } else { + ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand) + } +} +expoAutolinking.useExpoModules() + +rootProject.name = '观空禅音' + +expoAutolinking.useExpoVersionCatalog() + +include ':app' +includeBuild(expoAutolinking.reactNativeGradlePlugin) diff --git a/apps/app_zen_box/api.ts b/apps/app_zen_box/api.ts index c8aa558..053b9af 100644 --- a/apps/app_zen_box/api.ts +++ b/apps/app_zen_box/api.ts @@ -2,7 +2,7 @@ import axios from 'axios'; import AsyncStorage from '@react-native-async-storage/async-storage'; import { Track } from './types'; -const API_BASE_URL = 'http://47.101.56.101:8976'; +const API_BASE_URL = 'https://traesite.umersoft.com:8975'; const PLAYLIST_LIST_PATH = '/api/zen_box/playlists'; const DEFAULT_PLAYLIST_FILE = 'playlist.json'; const PLAYLIST_SNAPSHOT_KEY_PREFIX = '@zen_box_playlist_snapshot:'; diff --git a/apps/app_zen_box/app.json b/apps/app_zen_box/app.json index fe19232..2865edf 100644 --- a/apps/app_zen_box/app.json +++ b/apps/app_zen_box/app.json @@ -15,6 +15,7 @@ "**/*" ], "ios": { + "bundleIdentifier": "com.yangdafe.zenbox", "supportsTablet": true, "infoPlist": { "UIBackgroundModes": [ diff --git a/apps/app_zen_box/dist/_expo/static/js/android/AppEntry-29193bbd795bfc33c1e978c4197b9215.hbc b/apps/app_zen_box/dist/_expo/static/js/android/AppEntry-29193bbd795bfc33c1e978c4197b9215.hbc new file mode 100644 index 0000000..277bef7 Binary files /dev/null and b/apps/app_zen_box/dist/_expo/static/js/android/AppEntry-29193bbd795bfc33c1e978c4197b9215.hbc differ diff --git a/apps/app_zen_box/dist/assets/02bc1fa7c0313217bde2d65ccbff40c9 b/apps/app_zen_box/dist/assets/02bc1fa7c0313217bde2d65ccbff40c9 new file mode 100644 index 0000000..15a983a Binary files /dev/null and b/apps/app_zen_box/dist/assets/02bc1fa7c0313217bde2d65ccbff40c9 differ diff --git a/apps/app_zen_box/dist/assets/35ba0eaec5a4f5ed12ca16fabeae451d b/apps/app_zen_box/dist/assets/35ba0eaec5a4f5ed12ca16fabeae451d new file mode 100644 index 0000000..17e52e8 Binary files /dev/null and b/apps/app_zen_box/dist/assets/35ba0eaec5a4f5ed12ca16fabeae451d differ diff --git a/apps/app_zen_box/dist/assets/376d6a4c7f622917c39feb23671ef71d b/apps/app_zen_box/dist/assets/376d6a4c7f622917c39feb23671ef71d new file mode 100644 index 0000000..ad03a63 Binary files /dev/null and b/apps/app_zen_box/dist/assets/376d6a4c7f622917c39feb23671ef71d differ diff --git a/apps/app_zen_box/dist/assets/3d331d1d585d6364ab0ccdeb3a3bd0a0 b/apps/app_zen_box/dist/assets/3d331d1d585d6364ab0ccdeb3a3bd0a0 new file mode 100644 index 0000000..81867f4 Binary files /dev/null and b/apps/app_zen_box/dist/assets/3d331d1d585d6364ab0ccdeb3a3bd0a0 differ diff --git a/apps/app_zen_box/dist/assets/5223c8d9b0d08b82a5670fb5f71faf78 b/apps/app_zen_box/dist/assets/5223c8d9b0d08b82a5670fb5f71faf78 new file mode 100644 index 0000000..9de7242 Binary files /dev/null and b/apps/app_zen_box/dist/assets/5223c8d9b0d08b82a5670fb5f71faf78 differ diff --git a/apps/app_zen_box/dist/assets/778ffc9fe8773a878e9c30a6304784de b/apps/app_zen_box/dist/assets/778ffc9fe8773a878e9c30a6304784de new file mode 100644 index 0000000..083db29 Binary files /dev/null and b/apps/app_zen_box/dist/assets/778ffc9fe8773a878e9c30a6304784de differ diff --git a/apps/app_zen_box/dist/assets/b48523f91846c0eafd23c6ab59adef4b b/apps/app_zen_box/dist/assets/b48523f91846c0eafd23c6ab59adef4b new file mode 100644 index 0000000..3c6d71e Binary files /dev/null and b/apps/app_zen_box/dist/assets/b48523f91846c0eafd23c6ab59adef4b differ diff --git a/apps/app_zen_box/dist/assets/c79c3606a1cf168006ad3979763c7e0c b/apps/app_zen_box/dist/assets/c79c3606a1cf168006ad3979763c7e0c new file mode 100644 index 0000000..6de0a1c Binary files /dev/null and b/apps/app_zen_box/dist/assets/c79c3606a1cf168006ad3979763c7e0c differ diff --git a/apps/app_zen_box/dist/metadata.json b/apps/app_zen_box/dist/metadata.json new file mode 100644 index 0000000..5e35744 --- /dev/null +++ b/apps/app_zen_box/dist/metadata.json @@ -0,0 +1 @@ +{"version":0,"bundler":"metro","fileMetadata":{"android":{"bundle":"_expo/static/js/android/AppEntry-29193bbd795bfc33c1e978c4197b9215.hbc","assets":[{"path":"assets\\778ffc9fe8773a878e9c30a6304784de","ext":"png"},{"path":"assets\\376d6a4c7f622917c39feb23671ef71d","ext":"png"},{"path":"assets\\c79c3606a1cf168006ad3979763c7e0c","ext":"png"},{"path":"assets\\02bc1fa7c0313217bde2d65ccbff40c9","ext":"png"},{"path":"assets\\35ba0eaec5a4f5ed12ca16fabeae451d","ext":"png"},{"path":"assets\\5223c8d9b0d08b82a5670fb5f71faf78","ext":"png"},{"path":"assets\\3d331d1d585d6364ab0ccdeb3a3bd0a0","ext":"png"},{"path":"assets\\b48523f91846c0eafd23c6ab59adef4b","ext":"png"}]}}} \ No newline at end of file diff --git a/apps/app_zen_box/package-lock.json b/apps/app_zen_box/package-lock.json index b698ede..a16f466 100644 --- a/apps/app_zen_box/package-lock.json +++ b/apps/app_zen_box/package-lock.json @@ -24,7 +24,8 @@ "react-native-reanimated": "~4.1.1", "react-native-safe-area-context": "~5.6.0", "react-native-screens": "~4.16.0", - "react-native-svg": "15.2.0" + "react-native-svg": "^15.15.5", + "react-native-worklets": "0.8.0" }, "devDependencies": { "@babel/core": "^7.20.0", @@ -1364,6 +1365,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.29.7.tgz", + "integrity": "sha512-NCSEJ4sLFU2gqAub45HYh4fus2yQ36rr6ei6vpU7NdoJqCpxvEG8E6eJpscGyXP3VHD2Ny+fSXr04k1hoUrFqA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-typescript": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.29.7.tgz", @@ -11572,9 +11588,9 @@ } }, "node_modules/react-native-svg": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-15.2.0.tgz", - "integrity": "sha512-R0E6IhcJfVLsL0lRmnUSm72QO+mTqcAOM5Jb8FVGxJqX3NfJMlMP0YyvcajZiaRR8CqQUpEoqrY25eyZb006kw==", + "version": "15.15.5", + "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-15.15.5.tgz", + "integrity": "sha512-L4go5jA+GWutdJ/JucuN20cjAbMg1HmMtAP+wZ+3JLCf6Jd0bhXQHxciRP/AQm/FlrIEZwkMcHNZP+FXAiic0w==", "license": "MIT", "dependencies": { "css-select": "^5.1.0", @@ -11585,6 +11601,43 @@ "react-native": "*" } }, + "node_modules/react-native-worklets": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/react-native-worklets/-/react-native-worklets-0.8.0.tgz", + "integrity": "sha512-+qG1TP51HaN3ZqZVXHkZd8Rif9ejkPCBR4rpfur1So1S09AeXhXTduMwQHsqx13eNvF22Y7df12z8wds8bgj8A==", + "license": "MIT", + "dependencies": { + "@babel/plugin-transform-arrow-functions": "^7.27.1", + "@babel/plugin-transform-class-properties": "^7.27.1", + "@babel/plugin-transform-classes": "^7.28.4", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1", + "@babel/plugin-transform-optional-chaining": "^7.27.1", + "@babel/plugin-transform-shorthand-properties": "^7.27.1", + "@babel/plugin-transform-template-literals": "^7.27.1", + "@babel/plugin-transform-unicode-regex": "^7.27.1", + "@babel/preset-typescript": "^7.27.1", + "convert-source-map": "^2.0.0", + "semver": "^7.7.3" + }, + "peerDependencies": { + "@babel/core": "*", + "@react-native/metro-config": "*", + "react": "*", + "react-native": "0.81 - 0.85" + } + }, + "node_modules/react-native-worklets/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/react-native/node_modules/@react-native/normalize-colors": { "version": "0.81.5", "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.81.5.tgz", diff --git a/apps/app_zen_box/package.json b/apps/app_zen_box/package.json index bbd486e..0665394 100644 --- a/apps/app_zen_box/package.json +++ b/apps/app_zen_box/package.json @@ -4,8 +4,8 @@ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", - "android": "expo start --android", - "ios": "expo start --ios", + "android": "expo run:android", + "ios": "expo run:ios", "web": "expo start --web" }, "dependencies": { @@ -25,7 +25,8 @@ "react-native-reanimated": "~4.1.1", "react-native-safe-area-context": "~5.6.0", "react-native-screens": "~4.16.0", - "react-native-svg": "15.2.0" + "react-native-svg": "^15.15.5", + "react-native-worklets": "0.8.0" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/public/root.html b/public/root.html new file mode 100644 index 0000000..a424500 --- /dev/null +++ b/public/root.html @@ -0,0 +1 @@ +https://traesite.umersoft.com:8975/?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGlhcyI6Im5hdi1wcml2YXRlIiwiaWF0IjoxNzY3NTg2MzM0LCJleHAiOjE3OTk3MjcxMjIsImp0aSI6Ijg5OWZkNzRkZTM2ZDQ4ZjdhYjliMmYxMmNhM2EyYWMzIiwicHdkIjoidUhCVEVFU2w3cUV5dFkySW1KSjNzaXZCSFRmbG5oT0dOTmJ0dUtWbEhSSSJ9.p3AOSY-xVPZX2QpIqX_-25Gvd1HVn5w9fasPxfnr6BSWsL4zifcvom7-lpHIlXYfmJ1n-WIPpXrEsiN0RqASj_kVdc-R2HrRaYZ9Yo34Hx6EyuqbXn_dARKz83qH_CmdRcBQncT31kTBpPHcU6IylFV5nG8CE92v-sheaeS_CtJWFcw8XNx81mue8p1DxFbgO6xh6ODwQZqjUdTbF_v2pheM4nqrO_nKLwrXClEjxT_edKf41EJjfOBIifVWPIVdgywfZkLdMz8GiJluq06JDbGqOUaiaF1-vsk_udSdMUD-bOhiM1HlxvkrsuUKP5KhCe6RUXYXIDv-psewrbprSw \ No newline at end of file diff --git a/public/tools/private_clipboard/clipboard.js b/public/tools/private_clipboard/clipboard.js index f610092..0b0d041 100644 --- a/public/tools/private_clipboard/clipboard.js +++ b/public/tools/private_clipboard/clipboard.js @@ -553,15 +553,30 @@ const buildItemCard = (item) => { const url = new URL(fileItem.file_url, window.location.origin).href copyTextToClipboard(url) } - const download = document.createElement('a') - download.className = 'btn' - download.href = fileItem.file_url - download.download = fileItem.file_name || '' - download.textContent = '下载' + const downloadBtn = document.createElement('button') + downloadBtn.className = 'btn' + downloadBtn.textContent = '下载' + downloadBtn.addEventListener('click', async () => { + try { + const res = await fetch(fileItem.file_url) + if (!res.ok) throw new Error(`HTTP ${res.status}`) + const blob = await res.blob() + const url = URL.createObjectURL(blob) + const a = document.createElement('a') + a.href = url + a.download = fileItem.file_name || 'file' + document.body.appendChild(a) + a.click() + document.body.removeChild(a) + setTimeout(() => URL.revokeObjectURL(url), 5000) + } catch (e) { + setStatus(`下载失败: ${String(e.message || e)}`, 'error') + } + }) row.appendChild(name) row.appendChild(metaText) row.appendChild(copyUrlBtn) - row.appendChild(download) + row.appendChild(downloadBtn) card.appendChild(row) }) }