diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ce364f..6d0a741 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,35 @@ jobs: with: path: dist + # The Android shell must keep compiling on every change — an unbuildable + # android/ dir is exactly the silent rot §14 of the iOS standard warns about. + # Debug build, no signing, no upload; the signed release lives in + # release-android.yml. + android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - uses: android-actions/setup-android@v3 + with: + packages: platform-tools platforms;android-36 build-tools;36.0.0 + - run: npm ci + - run: npm run build + - run: npx cap sync android + - name: Gradle assembleDebug + working-directory: android + run: | + chmod +x gradlew + ./gradlew --no-daemon assembleDebug + ls -la app/build/outputs/apk/debug/ + deploy: needs: test if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') diff --git a/.github/workflows/release-android.yml b/.github/workflows/release-android.yml new file mode 100644 index 0000000..d2a0583 --- /dev/null +++ b/.github/workflows/release-android.yml @@ -0,0 +1,158 @@ +# Android release (Flywheel Standard §7 — docs/standards/android-app.md). +# Tag `android-vX.Y.Z` (or run by hand) → web build → cap sync → signed AAB + +# APK → GitHub Release assets → (when PLAY_SERVICE_ACCOUNT_JSON exists) upload +# to the Google Play internal track. Ships dark without the secrets: the build +# still runs and the unsigned artifacts are attached, so CI never blocks on +# credentials that live outside the repo (Standard §3). +# +# Secrets (repo → Settings → Secrets → Actions), all set by scripts/android-keystore.sh: +# ANDROID_KEYSTORE_BASE64 the upload keystore, base64 +# ANDROID_KEYSTORE_PASSWORD · ANDROID_KEY_ALIAS · ANDROID_KEY_PASSWORD +# Optional (Play Console → Setup → API access → service account JSON): +# PLAY_SERVICE_ACCOUNT_JSON +# Plus the web build's VITE_SUPABASE_URL / VITE_SUPABASE_PUBLISHABLE_KEY. +name: Release Android + +on: + push: + tags: ['android-v*'] + workflow_dispatch: + inputs: + version: + description: versionName (e.g. 1.2.0); defaults to the tag or build.gradle + required: false + default: '' + track: + description: Play track when PLAY_SERVICE_ACCOUNT_JSON is set + required: false + default: internal + +permissions: + contents: write + +concurrency: + group: release-android + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + env: + VERSION: ${{ inputs.version != '' && inputs.version || (startsWith(github.ref, 'refs/tags/android-v') && github.ref_name || '') }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: npm + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + + - uses: android-actions/setup-android@v3 + with: + packages: platform-tools platforms;android-36 build-tools;36.0.0 + + - name: Web build (same env as the site — analytics keys are publishable) + env: + VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }} + VITE_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.VITE_SUPABASE_PUBLISHABLE_KEY }} + run: | + npm ci + npm run build + npx cap sync android + + - name: Resolve version + id: v + run: | + name="${VERSION#android-v}" + if [ -z "$name" ]; then + name=$(sed -n "s/.*findProperty('versionName') ?: '\([^']*\)'.*/\1/p" android/app/build.gradle) + fi + # monotonic; +100 keeps clear of the iOS build numbers (75 at the time of writing) + code=$((100 + GITHUB_RUN_NUMBER)) + echo "name=$name" >> "$GITHUB_OUTPUT" + echo "code=$code" >> "$GITHUB_OUTPUT" + echo "versionName=$name versionCode=$code" + + - name: Upload keystore (from secrets; absent → unsigned build, loud notice) + id: ks + env: + KS_B64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} + run: | + if [ -z "$KS_B64" ]; then + echo "::warning::ANDROID_KEYSTORE_BASE64 not set — building UNSIGNED. Run scripts/android-keystore.sh once to create + store the upload key." + echo "signed=false" >> "$GITHUB_OUTPUT"; exit 0 + fi + echo "$KS_B64" | base64 -d > "$RUNNER_TEMP/upload.jks" + echo "path=$RUNNER_TEMP/upload.jks" >> "$GITHUB_OUTPUT" + echo "signed=true" >> "$GITHUB_OUTPUT" + + - name: Gradle — bundleRelease + assembleRelease + working-directory: android + env: + ANDROID_KEYSTORE_PATH: ${{ steps.ks.outputs.path }} + ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} + run: | + chmod +x gradlew + ./gradlew --no-daemon bundleRelease assembleRelease \ + -PversionName="${{ steps.v.outputs.name }}" -PversionCode="${{ steps.v.outputs.code }}" + ls -la app/build/outputs/bundle/release app/build/outputs/apk/release + + - name: Rename artifacts + run: | + v="${{ steps.v.outputs.name }}"; c="${{ steps.v.outputs.code }}" + mkdir -p out + cp android/app/build/outputs/bundle/release/app-release.aab "out/kam-na-msi-${v}-${c}.aab" + apk=$(ls android/app/build/outputs/apk/release/*.apk | head -1) + cp "$apk" "out/kam-na-msi-${v}-${c}.apk" + ls -la out + + - name: Read back — the bundle carries the expected versionName/versionCode + permissions + run: | + aapt=$(ls -d "$ANDROID_HOME"/build-tools/36.0.0/aapt2) + "$aapt" dump badging out/*.apk | grep -E "^package:|uses-permission" | head -8 + "$aapt" dump badging out/*.apk | grep -q "versionName='${{ steps.v.outputs.name }}'" || { echo "::error::versionName mismatch"; exit 1; } + if [ "${{ steps.ks.outputs.signed }}" = "true" ]; then + "$ANDROID_HOME"/build-tools/36.0.0/apksigner verify --print-certs out/*.apk | head -3 + fi + + - uses: actions/upload-artifact@v4 + with: + name: kam-na-msi-android-${{ steps.v.outputs.name }} + path: out/* + + - name: GitHub Release (tag builds only) + if: startsWith(github.ref, 'refs/tags/android-v') + uses: softprops/action-gh-release@v2 + with: + name: Android ${{ steps.v.outputs.name }} + files: out/* + body: | + Kam na mši for Android — versionName ${{ steps.v.outputs.name }}, versionCode ${{ steps.v.outputs.code }}. + `.aab` is the Play Store upload; `.apk` installs directly (sideload / testers). + Signed: ${{ steps.ks.outputs.signed }}. + + - name: Google Play — upload to ${{ inputs.track || 'internal' }} (only when the service account exists) + if: steps.ks.outputs.signed == 'true' && env.PLAY_JSON != '' + env: + PLAY_JSON: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }} + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }} + packageName: org.dravec.bohosluzby + releaseFiles: out/*.aab + track: ${{ inputs.track || 'internal' }} + status: completed + whatsNewDirectory: store-assets/android/whatsnew + + - name: Play upload skipped + if: steps.ks.outputs.signed != 'true' || env.PLAY_JSON == '' + env: + PLAY_JSON: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }} + run: echo "::notice::Play upload skipped (signed=${{ steps.ks.outputs.signed }}, PLAY_SERVICE_ACCOUNT_JSON set=$([ -n "$PLAY_JSON" ] && echo yes || echo no)). Upload out/*.aab by hand in Play Console, or add the secret (docs/store/play-metadata.md §API)." diff --git a/AGENTS.md b/AGENTS.md index 7f9fae3..923b57e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,6 +59,20 @@ offline. Language values are normalized to Czech lowercase at decode (`normalize build_type=workflow, cname set via API; DNS CNAME managed outside this repo). Build reads `VITE_SUPABASE_URL`, `VITE_SUPABASE_PUBLISHABLE_KEY` from repo secrets (set; shared flywheel-core project); the app works fully without them. +- **iOS** → App Store via Capacitor 8 (`ios/`), `fastlane ios release` from `ios/App/`; + listing + privacy answers in `docs/store/ios-metadata.md`, human steps in + `docs/store/asc-submission-checklist.md`. +- **Android** → Google Play via the same Capacitor shell (`android/`, committed; icons/splash + from `resources/` via `npx capacitor-assets generate --android`). Release = + `git tag android-vX.Y.Z && git push origin android-vX.Y.Z` → `.github/workflows/release-android.yml` + builds the web app, `cap sync`, produces a **signed `.aab` + `.apk`** on a GitHub Release and + reads the bundle back (versionName, permissions, signature). Signing needs the four + `ANDROID_*` secrets from a one-time `scripts/android-keystore.sh`; without them it builds + unsigned and says so. `PLAY_SERVICE_ACCOUNT_JSON` (optional) makes the workflow upload to the + Play internal track itself. Listing, data-safety and content-rating answers, and the + owner-only console steps: `docs/store/play-metadata.md`. Screenshots: the `phone` device in + `e2e/store-shots.spec.ts` (1080×1920). Local build check: `cd android && ./gradlew assembleDebug` + (needs `ANDROID_HOME`; CI runs it on every push as the `android` job). Adoption is read from web KPIs — no extra telemetry needed. ## Analytics (Common Platform) diff --git a/README.md b/README.md index 370ecfb..9432ec4 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,13 @@ npx playwright test # e2e journeys + screenshoty do e2e/shots/ Build/test/release kontrakt: `AGENTS.md`. Vizuální kontrakt (misálová typografie, liturgické barvy): `docs/DESIGN-BRIEF.md`. +## Mobilní aplikace + +Stejná aplikace běží jako nativní obal (Capacitor 8) pro **iOS** (`ios/`, App Store) +i **Android** (`android/`, Google Play). Android vydání: `git tag android-vX.Y.Z` +→ workflow `release-android.yml` sestaví podepsaný `.aab` + `.apk` na GitHub Release. +Podklady pro obchody: `docs/store/`. + ## Licence Kód: [MIT](LICENSE). Údaje o bohoslužbách: rejstřík ČBK diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..48354a3 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,101 @@ +# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore + +# Built application files +*.apk +*.aar +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +# Android Studio 3 in .gitignore file. +.idea/caches +.idea/modules.xml +# Comment next line if keeping position of elements in Navigation Editor is relevant for you +.idea/navEditor.xml + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +#*.jks +#*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ + +# Android Profiling +*.hprof + +# Cordova plugins for Capacitor +capacitor-cordova-android-plugins + +# Copied web assets +app/src/main/assets/public + +# Generated Config files +app/src/main/assets/capacitor.config.json +app/src/main/assets/capacitor.plugins.json +app/src/main/res/xml/config.xml diff --git a/android/app/.gitignore b/android/app/.gitignore new file mode 100644 index 0000000..043df80 --- /dev/null +++ b/android/app/.gitignore @@ -0,0 +1,2 @@ +/build/* +!/build/.npmkeep diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..35b5b2a --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,81 @@ +apply plugin: 'com.android.application' + +// Version: the release workflow passes -PversionName (from the android-vX.Y.Z tag) +// and -PversionCode (monotonic, from the workflow run number + 100 so it can never +// collide with the iOS build numbers already used). Local builds fall back to the +// defaults below — bump versionName here when you tag. +def resolvedVersionName = project.findProperty('versionName') ?: '1.2.0' +def resolvedVersionCode = (project.findProperty('versionCode') ?: '1').toString().toInteger() + +// Signing: release is signed only when the upload keystore is provided through +// the environment (CI secrets → scripts/android-keystore.sh). Without it the +// release build type is still produced, just unsigned — never a fake debug key +// on a Play upload. +def ksPath = System.getenv('ANDROID_KEYSTORE_PATH') +def hasReleaseKeystore = ksPath != null && file(ksPath).exists() + +android { + namespace = "org.dravec.bohosluzby" + compileSdk = rootProject.ext.compileSdkVersion + defaultConfig { + applicationId "org.dravec.bohosluzby" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode resolvedVersionCode + versionName resolvedVersionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + aaptOptions { + // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. + // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 + ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' + } + } + signingConfigs { + if (hasReleaseKeystore) { + release { + storeFile file(ksPath) + storePassword System.getenv('ANDROID_KEYSTORE_PASSWORD') + keyAlias System.getenv('ANDROID_KEY_ALIAS') + keyPassword System.getenv('ANDROID_KEY_PASSWORD') + } + } + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (hasReleaseKeystore) { + signingConfig signingConfigs.release + } + } + } +} + +repositories { + flatDir{ + dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' + } +} + +dependencies { + implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" + implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" + implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" + implementation project(':capacitor-android') + testImplementation "junit:junit:$junitVersion" + androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" + androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" + implementation project(':capacitor-cordova-android-plugins') +} + +apply from: 'capacitor.build.gradle' + +try { + def servicesJSON = file('google-services.json') + if (servicesJSON.text) { + apply plugin: 'com.google.gms.google-services' + } +} catch(Exception e) { + logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") +} diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle new file mode 100644 index 0000000..1046240 --- /dev/null +++ b/android/app/capacitor.build.gradle @@ -0,0 +1,25 @@ +// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN + +android { + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } +} + +apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" +dependencies { + implementation project(':capacitor-filesystem') + implementation project(':capacitor-geolocation') + implementation project(':capacitor-haptics') + implementation project(':capacitor-local-notifications') + implementation project(':capacitor-share') + implementation project(':capacitor-splash-screen') + implementation project(':capacitor-status-bar') + +} + + +if (hasProperty('postBuildExtras')) { + postBuildExtras() +} diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java new file mode 100644 index 0000000..f2c2217 --- /dev/null +++ b/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.getcapacitor.myapp; + +import static org.junit.Assert.*; + +import android.content.Context; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + + @Test + public void useAppContext() throws Exception { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("com.getcapacitor.app", appContext.getPackageName()); + } +} diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..4d36295 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/java/org/dravec/bohosluzby/MainActivity.java b/android/app/src/main/java/org/dravec/bohosluzby/MainActivity.java new file mode 100644 index 0000000..8423143 --- /dev/null +++ b/android/app/src/main/java/org/dravec/bohosluzby/MainActivity.java @@ -0,0 +1,5 @@ +package org.dravec.bohosluzby; + +import com.getcapacitor.BridgeActivity; + +public class MainActivity extends BridgeActivity {} diff --git a/android/app/src/main/res/drawable-land-hdpi/splash.png b/android/app/src/main/res/drawable-land-hdpi/splash.png new file mode 100644 index 0000000..8cf45e3 Binary files /dev/null and b/android/app/src/main/res/drawable-land-hdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-ldpi/splash.png b/android/app/src/main/res/drawable-land-ldpi/splash.png new file mode 100644 index 0000000..3336a2c Binary files /dev/null and b/android/app/src/main/res/drawable-land-ldpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-mdpi/splash.png b/android/app/src/main/res/drawable-land-mdpi/splash.png new file mode 100644 index 0000000..d8f7fad Binary files /dev/null and b/android/app/src/main/res/drawable-land-mdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-night-hdpi/splash.png b/android/app/src/main/res/drawable-land-night-hdpi/splash.png new file mode 100644 index 0000000..9bcf588 Binary files /dev/null and b/android/app/src/main/res/drawable-land-night-hdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-night-ldpi/splash.png b/android/app/src/main/res/drawable-land-night-ldpi/splash.png new file mode 100644 index 0000000..5db129b Binary files /dev/null and b/android/app/src/main/res/drawable-land-night-ldpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-night-mdpi/splash.png b/android/app/src/main/res/drawable-land-night-mdpi/splash.png new file mode 100644 index 0000000..84071b7 Binary files /dev/null and b/android/app/src/main/res/drawable-land-night-mdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-night-xhdpi/splash.png b/android/app/src/main/res/drawable-land-night-xhdpi/splash.png new file mode 100644 index 0000000..d5a8b62 Binary files /dev/null and b/android/app/src/main/res/drawable-land-night-xhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-night-xxhdpi/splash.png b/android/app/src/main/res/drawable-land-night-xxhdpi/splash.png new file mode 100644 index 0000000..8385e41 Binary files /dev/null and b/android/app/src/main/res/drawable-land-night-xxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-night-xxxhdpi/splash.png b/android/app/src/main/res/drawable-land-night-xxxhdpi/splash.png new file mode 100644 index 0000000..625a6e9 Binary files /dev/null and b/android/app/src/main/res/drawable-land-night-xxxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-xhdpi/splash.png b/android/app/src/main/res/drawable-land-xhdpi/splash.png new file mode 100644 index 0000000..e188110 Binary files /dev/null and b/android/app/src/main/res/drawable-land-xhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-xxhdpi/splash.png b/android/app/src/main/res/drawable-land-xxhdpi/splash.png new file mode 100644 index 0000000..4801005 Binary files /dev/null and b/android/app/src/main/res/drawable-land-xxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-land-xxxhdpi/splash.png b/android/app/src/main/res/drawable-land-xxxhdpi/splash.png new file mode 100644 index 0000000..e2b6101 Binary files /dev/null and b/android/app/src/main/res/drawable-land-xxxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-night/splash.png b/android/app/src/main/res/drawable-night/splash.png new file mode 100644 index 0000000..5db129b Binary files /dev/null and b/android/app/src/main/res/drawable-night/splash.png differ diff --git a/android/app/src/main/res/drawable-port-hdpi/splash.png b/android/app/src/main/res/drawable-port-hdpi/splash.png new file mode 100644 index 0000000..1b12573 Binary files /dev/null and b/android/app/src/main/res/drawable-port-hdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-ldpi/splash.png b/android/app/src/main/res/drawable-port-ldpi/splash.png new file mode 100644 index 0000000..7036fe1 Binary files /dev/null and b/android/app/src/main/res/drawable-port-ldpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-mdpi/splash.png b/android/app/src/main/res/drawable-port-mdpi/splash.png new file mode 100644 index 0000000..3bb2970 Binary files /dev/null and b/android/app/src/main/res/drawable-port-mdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-night-hdpi/splash.png b/android/app/src/main/res/drawable-port-night-hdpi/splash.png new file mode 100644 index 0000000..05cf74d Binary files /dev/null and b/android/app/src/main/res/drawable-port-night-hdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-night-ldpi/splash.png b/android/app/src/main/res/drawable-port-night-ldpi/splash.png new file mode 100644 index 0000000..0287920 Binary files /dev/null and b/android/app/src/main/res/drawable-port-night-ldpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-night-mdpi/splash.png b/android/app/src/main/res/drawable-port-night-mdpi/splash.png new file mode 100644 index 0000000..5edf337 Binary files /dev/null and b/android/app/src/main/res/drawable-port-night-mdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-night-xhdpi/splash.png b/android/app/src/main/res/drawable-port-night-xhdpi/splash.png new file mode 100644 index 0000000..605a8ee Binary files /dev/null and b/android/app/src/main/res/drawable-port-night-xhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-night-xxhdpi/splash.png b/android/app/src/main/res/drawable-port-night-xxhdpi/splash.png new file mode 100644 index 0000000..52a7b32 Binary files /dev/null and b/android/app/src/main/res/drawable-port-night-xxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-night-xxxhdpi/splash.png b/android/app/src/main/res/drawable-port-night-xxxhdpi/splash.png new file mode 100644 index 0000000..d91227e Binary files /dev/null and b/android/app/src/main/res/drawable-port-night-xxxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-xhdpi/splash.png b/android/app/src/main/res/drawable-port-xhdpi/splash.png new file mode 100644 index 0000000..d965f5d Binary files /dev/null and b/android/app/src/main/res/drawable-port-xhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-xxhdpi/splash.png b/android/app/src/main/res/drawable-port-xxhdpi/splash.png new file mode 100644 index 0000000..86685c9 Binary files /dev/null and b/android/app/src/main/res/drawable-port-xxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-port-xxxhdpi/splash.png b/android/app/src/main/res/drawable-port-xxxhdpi/splash.png new file mode 100644 index 0000000..5153303 Binary files /dev/null and b/android/app/src/main/res/drawable-port-xxxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..c7bd21d --- /dev/null +++ b/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/android/app/src/main/res/drawable/ic_launcher_background.xml b/android/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..d5fccc5 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/res/drawable/splash.png b/android/app/src/main/res/drawable/splash.png new file mode 100644 index 0000000..3bb2970 Binary files /dev/null and b/android/app/src/main/res/drawable/splash.png differ diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..b5ad138 --- /dev/null +++ b/android/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..0aa82aa --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..0aa82aa --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..81aaf1f Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 0000000..0feb4c7 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..bcc21c0 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..cdd310d Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png new file mode 100644 index 0000000..7b802f2 Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher_background.png new file mode 100644 index 0000000..b999324 Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher_foreground.png new file mode 100644 index 0000000..eba87bd Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png new file mode 100644 index 0000000..9ee8423 Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..0f3111b Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 0000000..5b990d7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..788a3e7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..55b5452 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..1e4abc4 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 0000000..adf0647 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..cca71ba Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..1eb6272 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..0abe39e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..5da7395 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..76156c4 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..1ac812b Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..d0150f3 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..62d0494 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..bba633f Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..f7551a3 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..c5d5899 --- /dev/null +++ b/android/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..c98803b --- /dev/null +++ b/android/app/src/main/res/values/strings.xml @@ -0,0 +1,7 @@ + + + Kam na mši + Kam na mši + org.dravec.bohosluzby + org.dravec.bohosluzby + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..be874e5 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/xml/file_paths.xml b/android/app/src/main/res/xml/file_paths.xml new file mode 100644 index 0000000..bd0c4d8 --- /dev/null +++ b/android/app/src/main/res/xml/file_paths.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java b/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java new file mode 100644 index 0000000..0297327 --- /dev/null +++ b/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java @@ -0,0 +1,18 @@ +package com.getcapacitor.myapp; + +import static org.junit.Assert.*; + +import org.junit.Test; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + + @Test + public void addition_isCorrect() throws Exception { + assertEquals(4, 2 + 2); + } +} diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..f8f0e43 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,29 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:8.13.0' + classpath 'com.google.gms:google-services:4.4.4' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +apply from: "variables.gradle" + +allprojects { + repositories { + google() + mavenCentral() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle new file mode 100644 index 0000000..faaff31 --- /dev/null +++ b/android/capacitor.settings.gradle @@ -0,0 +1,24 @@ +// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN +include ':capacitor-android' +project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') + +include ':capacitor-filesystem' +project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android') + +include ':capacitor-geolocation' +project(':capacitor-geolocation').projectDir = new File('../node_modules/@capacitor/geolocation/android') + +include ':capacitor-haptics' +project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android') + +include ':capacitor-local-notifications' +project(':capacitor-local-notifications').projectDir = new File('../node_modules/@capacitor/local-notifications/android') + +include ':capacitor-share' +project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android') + +include ':capacitor-splash-screen' +project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android') + +include ':capacitor-status-bar' +project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android') diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..2e87c52 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,22 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..1b33c55 Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..7705927 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew new file mode 100755 index 0000000..23d15a9 --- /dev/null +++ b/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, 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/android/gradlew.bat b/android/gradlew.bat new file mode 100644 index 0000000..5eed7ee --- /dev/null +++ b/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/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..3b4431d --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,5 @@ +include ':app' +include ':capacitor-cordova-android-plugins' +project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') + +apply from: 'capacitor.settings.gradle' \ No newline at end of file diff --git a/android/variables.gradle b/android/variables.gradle new file mode 100644 index 0000000..ee4ba41 --- /dev/null +++ b/android/variables.gradle @@ -0,0 +1,16 @@ +ext { + minSdkVersion = 24 + compileSdkVersion = 36 + targetSdkVersion = 36 + androidxActivityVersion = '1.11.0' + androidxAppCompatVersion = '1.7.1' + androidxCoordinatorLayoutVersion = '1.3.0' + androidxCoreVersion = '1.17.0' + androidxFragmentVersion = '1.8.9' + coreSplashScreenVersion = '1.2.0' + androidxWebkitVersion = '1.14.0' + junitVersion = '4.13.2' + androidxJunitVersion = '1.3.0' + androidxEspressoCoreVersion = '3.7.0' + cordovaAndroidVersion = '14.0.1' +} \ No newline at end of file diff --git a/capacitor.config.ts b/capacitor.config.ts index 0610fee..20c6d13 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -14,6 +14,11 @@ const config: CapacitorConfig = { // top of the header's own env(safe-area-inset-top) padding — a double gap // that appeared after the first scroll. CSS owns the safe area alone. ios: { contentInset: 'never', backgroundColor: '#f6f1e5' }, + // Android: same parchment behind the WebView (edge-to-edge on Android 15+ — + // Capacitor 8's SystemBars plugin feeds env(safe-area-inset-*) to the CSS, so + // the header/bottom-nav padding works unchanged). Mixed content stays off: + // everything the app loads is bundled or https. + android: { backgroundColor: '#f6f1e5', allowMixedContent: false }, } export default config diff --git a/docs/store/play-metadata.md b/docs/store/play-metadata.md new file mode 100644 index 0000000..c85a0f5 --- /dev/null +++ b/docs/store/play-metadata.md @@ -0,0 +1,151 @@ +# Google Play Console — metadata + submission (Android) + +Paste-ready listing for **Kam na mši** on Google Play (Capacitor build of the same +web app as iOS). Primary locale **Czech (cs-CZ)**. Character counts verified against +Play limits. The binary comes from `.github/workflows/release-android.yml` +(tag `android-vX.Y.Z` → signed `.aab` on the GitHub Release). + +Same app, same data, same privacy posture as `ios-metadata.md` — where Apple and +Google ask the same question the answer is identical; only the form differs. + +--- + +## Names & URLs + +| Field | Value | Chars / limit | +|---|---|---| +| App name | `Kam na mši – katolické mše` | 26 / 30 | +| Short description | `Nejbližší mše svatá podle vaší polohy – kterou ještě stihnete. Zdarma, offline.` | 79 / 80 | +| Package | `org.dravec.bohosluzby` | fixed forever | +| Category | Lifestyle | — | +| Tags (optional) | Religion, Maps, Offline | — | +| Contact e-mail | your address (Play shows it publicly) | — | +| Website | `https://bohosluzby.dravec.org` | — | +| Privacy policy | `https://bohosluzby.dravec.org/privacy` | — | + +## Full description (≤4000) + +``` +Kam na mši vám podle vaší polohy ukáže nejbližší katolické mše svaté – a hlavně to, kterou mši dnes ještě stihnete. + +Otevřete aplikaci a hned vidíte pořad bohoslužeb v okolí: kde a v kolik začíná nejbližší mše, kolik zbývá času a jak daleko to máte. Bez zdlouhavého hledání na webu farnosti. + +Co aplikace umí: +• Nejbližší mše podle vaší polohy, seřazené od té, kterou ještě stihnete +• Mapa kostelů v okolí – na jeden pohled vidíte, kam je to nejblíž +• Pořad bohoslužeb pro dnešek, zítřek i neděli +• Funguje offline – data máte v telefonu i bez signálu +• Export mše do kalendáře jedním klepnutím +• Připomínka před začátkem mše, ať nikam nespěcháte +• Přibližně 4 000 kostelů a kaplí z oficiálního rejstříku České biskupské konference + +Zdarma, bez reklam a bez registrace. Nepotřebujete účet ani přihlášení. + +Vaše poloha se používá jen ve vašem telefonu k výpočtu nejbližších kostelů a nikam se neodesílá. Místo polohy můžete kdykoli zadat město ručně. + +Zdroj dat: oficiální rejstřík bohoslužeb České biskupské konference (bohosluzby.cirkev.cz). Rejstřík doplňují farnosti samy; u každého kostela proto uvádíme datum posledního ověření – před cestou si čas raději ověřte ve farnosti. +``` + +## Graphics + +| Asset | Size | File | +|---|---|---| +| App icon | 512×512 PNG, 32-bit | `store-assets/android/icon-512.png` | +| Feature graphic (required) | 1024×500 PNG/JPG | `store-assets/android/feature-graphic.png` | +| Phone screenshots (2–8) | 1080×1920 PNG, 9:16 | `store-assets/android/phone/*.png` (from `e2e/store-shots.spec.ts`) | +| 7″ / 10″ tablet | optional; skip for v1 | — | + +Play rejects screenshots outside 16:9…9:16, so the iPhone 6.9″ shots (2.17:1) cannot +be reused — the Android device entry in `store-shots.spec.ts` renders 360×640 @3. + +## Release notes — `store-assets/android/whatsnew/whatsnew-cs-CZ` + +Used by the workflow's Play upload step (≤500 chars). Keep it factual, one release. + +## Data safety (Play → App content → Data safety) + +Derived from the analytics client, same three anonymous types as the Apple label. +Everything else: **not collected**. + +| Question | Answer | +|---|---| +| Does your app collect or share any of the required user data types? | **Yes** | +| Is all of the user data collected by your app encrypted in transit? | **Yes** (https to Supabase) | +| Do you provide a way for users to request that their data is deleted? | **Yes** — e-mail (the data is an anonymous install id; deletion = delete the row on request) | +| App activity → **App interactions** | Collected, not shared, **optional** (can't be disabled but is anonymous), purpose Analytics | +| App info and performance → **Crash logs / Diagnostics** | Collected (the `error` events), not shared, purpose App functionality | +| Device or other IDs → **Device or other IDs** | Collected (anonymous per-install `visitor_id`), not shared, purpose Analytics | +| Location | **Not collected** — read on-device only, never transmitted | +| Personal info, Financial, Health, Messages, Photos, Audio, Files, Calendar, Contacts | Not collected (calendar export writes an .ics via the share sheet; the app never reads the calendar) | +| Data handling | Not processed ephemerally; no data sold; no third-party SDKs | + +## Content rating questionnaire (IARC) + +Category **Reference, news, or educational** → every question "No" (no violence, sexuality, +language, controlled substances, gambling, user interaction, personal-info sharing, +location sharing with others, purchases). Result: **Everyone / PEGI 3**. + +## App content — other declarations + +| Declaration | Answer | +|---|---| +| Ads | No ads | +| Target audience | 18 and over (simplest; avoids the Families policy). The app is suitable for all ages but is not *designed for* children. | +| News app | No | +| COVID-19 contact tracing | No | +| Government app | No | +| Financial features | None | +| Health | None | +| Advertising ID | Not used (matches the manifest: no `AD_ID` permission) | +| Foreground service | None | +| Exact alarms | Not requested — reminders use inexact scheduling, minutes of jitter is fine for a 45-min lead | + +## Permissions the reviewer will see + +`ACCESS_COARSE_LOCATION`, `ACCESS_FINE_LOCATION` (nearest-mass sort, on device), +`POST_NOTIFICATIONS` (mass reminders), `RECEIVE_BOOT_COMPLETED` + `WAKE_LOCK` (the +local-notifications plugin re-registers scheduled reminders after a reboot), `INTERNET` +(data refresh + anonymous analytics). No background location, no sensitive-permission +declaration form needed. + +--- + +## Submission — what only the account owner can do + +1. **Play Console account** — https://play.google.com/console, one-time 25 USD, personal + account (seller name = Pavol Dravecký, same posture as Apple). Google may require identity + verification (ID + a few days) before the first publish; new personal accounts also + need a **closed test with ≥12 testers for 14 days** before production is unlocked. + Plan for that: publish to *Closed testing* first, invite family + the parish list. +2. **Upload key** — run `scripts/android-keystore.sh` once on the Mac (needs `keytool` + from any JDK and `gh`). It creates the keystore under `~/.config/kam-na-msi/` and sets + the four `ANDROID_*` secrets on the repo. Save the printed password in 1Password. +3. **Tag a release** — `git tag android-v1.2.0 && git push origin android-v1.2.0`. The + workflow attaches `kam-na-msi-1.2.0-.aab` (+ `.apk` for sideloading) to a + GitHub Release and reads the bundle back (versionName, permissions, signature). +4. **Create the app** in Play Console (name, Czech, free, app) and upload that `.aab` on + *Testing → Closed testing → Create release*. The first upload enrolls **Play App + Signing** automatically (Google keeps the real key; ours is the upload key). +5. **Store listing** — paste this file: name, short/full description, icon, feature + graphic, screenshots, category, contact, privacy URL. Then *App content*: data safety, + content rating, target audience, ads, declarations (tables above). +6. **Roll out** the closed test; after the 14-day/12-tester bar, *Production → Create + release* with the same `.aab` (or the next tag). + +### Optional: API upload so future releases need no console visit + +Play Console → *Setup → API access* → link a Google Cloud project → create a service +account with **Release manager** on this app → download its JSON → repo secret +`PLAY_SERVICE_ACCOUNT_JSON`. From then on every `android-v*` tag lands on the internal +track by itself; promote to production in the console (or change the workflow's `track` +input). The first `.aab` must still go through the console (step 4). + +## Self-check before the first upload (airplane-mode test on a real phone) + +- Install the `.apk` from the GitHub Release (Settings → allow this source). +- Airplane mode on → open app → nearest masses render from the bundled data. +- Deny location → city picker works; allow → list re-sorts. +- Church detail → *Připomenout* → notification permission prompt → reminder appears in + the shade at the scheduled time. +- Share → Android share sheet; *Do kalendáře* → .ics opens in Google Calendar. +- Rotate, back gesture (Android 13+ predictive back returns to the list, not out of the app). diff --git a/e2e/store-shots.spec.ts b/e2e/store-shots.spec.ts index bc624e0..01c859a 100644 --- a/e2e/store-shots.spec.ts +++ b/e2e/store-shots.spec.ts @@ -14,9 +14,13 @@ import { FIXED_NOW, PRAGUE, mockData } from './fixtures' const FASTLANE_CS = 'ios/App/fastlane/screenshots/cs' +// Google Play accepts phone screenshots only between 16:9 and 9:16, so the +// iPhone 6.9" shots (2.17:1) can't be reused — the Android entry renders the +// classic 1080×1920 (360×640 @3) into store-assets/android/phone/. const DEVICES = [ - { name: 'iphone-6.9', viewport: { width: 440, height: 956 }, dsf: 3 }, - { name: 'ipad-13', viewport: { width: 1032, height: 1376 }, dsf: 2 }, + { name: 'iphone-6.9', store: 'ios', viewport: { width: 440, height: 956 }, dsf: 3 }, + { name: 'ipad-13', store: 'ios', viewport: { width: 1032, height: 1376 }, dsf: 2 }, + { name: 'phone', store: 'android', viewport: { width: 360, height: 640 }, dsf: 3 }, ] for (const d of DEVICES) { @@ -34,7 +38,7 @@ for (const d of DEVICES) { // the first-run intro guide must not overlay the store shots (step 1 uses // real bundled data, so mockData's seed hasn't run yet) await page.addInitScript(() => localStorage.setItem('bohosluzby:introSeen', '1')) - const dir = `store-assets/ios/${d.name}` + const dir = `store-assets/${d.store}/${d.name}` // 1 — MAP hero (the centerpiece — leads the listing). REAL bundled data // (no mock) at a plain-green Sunday 07:00 local (05:00 UTC): the whole // day's masses are still ahead, so nearly every church shows a vibrant @@ -68,10 +72,13 @@ for (const d of DEVICES) { // Sync into deliver's upload dir (fastlane/screenshots/cs/) with the // device-prefixed names deliver expects — so store-assets and the upload - // source never diverge again. - mkdirSync(FASTLANE_CS, { recursive: true }) - for (const f of readdirSync(dir)) { - cpSync(`${dir}/${f}`, `${FASTLANE_CS}/${d.name}-${f}`) + // source never diverge again. (Android's upload source IS store-assets — + // the release workflow reads it directly.) + if (d.store === 'ios') { + mkdirSync(FASTLANE_CS, { recursive: true }) + for (const f of readdirSync(dir)) { + cpSync(`${dir}/${f}`, `${FASTLANE_CS}/${d.name}-${f}`) + } } }) }) diff --git a/scripts/android-keystore.sh b/scripts/android-keystore.sh new file mode 100755 index 0000000..5842948 --- /dev/null +++ b/scripts/android-keystore.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# One-time: create the Android UPLOAD keystore for Kam na mši and store it as +# GitHub Actions secrets for .github/workflows/release-android.yml. +# +# scripts/android-keystore.sh # generates + sets secrets via `gh` +# scripts/android-keystore.sh --print # generates + prints the values instead +# +# Google Play App Signing keeps the real signing key on Google's side; this is +# only the upload key, and Google can reset it if it is ever lost. Still: keep +# the .jks + password in your password manager (1Password: "kam-na-msi android +# upload key"). The file is written OUTSIDE the repo and never committed. +set -euo pipefail + +REPO="${REPO:-Chartres/bohosluzby}" +ALIAS="${ALIAS:-upload}" +OUT_DIR="${OUT_DIR:-$HOME/.config/kam-na-msi}" +KS="$OUT_DIR/android-upload.jks" +mkdir -p "$OUT_DIR"; chmod 700 "$OUT_DIR" + +if [ -f "$KS" ]; then + echo "keystore already exists: $KS (delete it first if you really want a new one)"; exit 1 +fi + +command -v keytool >/dev/null || { echo "keytool not found — install a JDK (brew install --cask temurin)"; exit 1; } + +PASS="$(openssl rand -base64 30 | tr -d '/+=' | cut -c1-32)" +keytool -genkeypair -v \ + -keystore "$KS" -storepass "$PASS" -keypass "$PASS" \ + -alias "$ALIAS" -keyalg RSA -keysize 4096 -validity 10000 \ + -dname "CN=Kam na mši, O=Pavol Dravecký, L=Praha, C=CZ" >/dev/null +chmod 600 "$KS" +B64="$(base64 < "$KS" | tr -d '\n')" + +echo "keystore: $KS" +echo "alias: $ALIAS" +echo "SHA-256 (paste into Play Console if it asks for the upload certificate):" +keytool -list -v -keystore "$KS" -storepass "$PASS" -alias "$ALIAS" | grep -E "SHA256:" | head -1 + +if [ "${1:-}" = "--print" ] || ! command -v gh >/dev/null; then + echo + echo "Set these four secrets on $REPO (Settings → Secrets and variables → Actions):" + echo " ANDROID_KEYSTORE_BASE64 = (base64 of $KS — see $OUT_DIR/android-upload.b64)" + echo " ANDROID_KEYSTORE_PASSWORD = $PASS" + echo " ANDROID_KEY_ALIAS = $ALIAS" + echo " ANDROID_KEY_PASSWORD = $PASS" + printf '%s' "$B64" > "$OUT_DIR/android-upload.b64"; chmod 600 "$OUT_DIR/android-upload.b64" + exit 0 +fi + +printf '%s' "$B64" | gh secret set ANDROID_KEYSTORE_BASE64 --repo "$REPO" +printf '%s' "$PASS" | gh secret set ANDROID_KEYSTORE_PASSWORD --repo "$REPO" +printf '%s' "$ALIAS"| gh secret set ANDROID_KEY_ALIAS --repo "$REPO" +printf '%s' "$PASS" | gh secret set ANDROID_KEY_PASSWORD --repo "$REPO" +echo "secrets set on $REPO. Password (store it in 1Password now): $PASS" +echo "Next: git tag android-v1.2.0 && git push origin android-v1.2.0 → signed .aab on the GitHub Release." diff --git a/scripts/play-graphics.mjs b/scripts/play-graphics.mjs new file mode 100644 index 0000000..e362a01 --- /dev/null +++ b/scripts/play-graphics.mjs @@ -0,0 +1,47 @@ +// Google Play graphics from the same sources as the app icon (resources/icon.png): +// store-assets/android/icon-512.png 512×512 (Play's hi-res icon) +// store-assets/android/feature-graphic.png 1024×500 (required by Play) +// Deterministic, rendered with the repo's Playwright Chromium — same idea as the +// flywheel og-image generator. Re-run after a brand/tagline change. +// node scripts/play-graphics.mjs (PW_CHROMIUM=/path/to/chromium in sandboxes) +import { chromium } from '@playwright/test' +import { mkdirSync, readFileSync } from 'node:fs' + +const OUT = 'store-assets/android' +mkdirSync(OUT, { recursive: true }) +const icon = `data:image/png;base64,${readFileSync('resources/icon.png').toString('base64')}` + +const feature = `
+
+

Kam na mši

Nejbližší mše svatá podle vaší polohy — kterou ještě stihnete. Celá ČR, offline.

+
zdarma · bez reklam · bez registrace
` + +const iconPage = `` + +const browser = await chromium.launch({ + ...(process.env.PW_CHROMIUM ? { executablePath: process.env.PW_CHROMIUM } : {}), +}) +try { + const p1 = await browser.newPage({ viewport: { width: 1024, height: 500 }, deviceScaleFactor: 1 }) + await p1.setContent(feature, { waitUntil: 'load' }) + await p1.screenshot({ path: `${OUT}/feature-graphic.png`, type: 'png' }) + const p2 = await browser.newPage({ viewport: { width: 512, height: 512 }, deviceScaleFactor: 1 }) + await p2.setContent(iconPage, { waitUntil: 'load' }) + await p2.screenshot({ path: `${OUT}/icon-512.png`, type: 'png' }) + console.log(`wrote ${OUT}/feature-graphic.png (1024×500) + ${OUT}/icon-512.png (512×512)`) +} finally { + await browser.close() +} diff --git a/store-assets/android/feature-graphic.png b/store-assets/android/feature-graphic.png new file mode 100644 index 0000000..9cc56f4 Binary files /dev/null and b/store-assets/android/feature-graphic.png differ diff --git a/store-assets/android/icon-512.png b/store-assets/android/icon-512.png new file mode 100644 index 0000000..54b00a7 Binary files /dev/null and b/store-assets/android/icon-512.png differ diff --git a/store-assets/android/whatsnew/whatsnew-cs-CZ b/store-assets/android/whatsnew/whatsnew-cs-CZ new file mode 100644 index 0000000..a4818df --- /dev/null +++ b/store-assets/android/whatsnew/whatsnew-cs-CZ @@ -0,0 +1 @@ +První vydání pro Android: nejbližší mše svaté podle polohy, mapa kostelů, pořad bohoslužeb na dnes, zítra i neděli, offline data pro celou ČR, připomínky a export do kalendáře. Zdarma, bez reklam, bez registrace.