diff --git a/.gitignore b/.gitignore index 82a5661..1214d9d 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,12 @@ # production /build +# built mobile artifacts (APK/AAB) + release signing secrets +/dist +/android/keystore.properties +*.jks +*.keystore + # misc .DS_Store *.pem diff --git a/android/.gitignore b/android/.gitignore index 48354a3..4acccf3 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -99,3 +99,8 @@ app/src/main/assets/public app/src/main/assets/capacitor.config.json app/src/main/assets/capacitor.plugins.json app/src/main/res/xml/config.xml + +# Release signing — NEVER commit (back these up separately!) +keystore.properties +*.jks +*.keystore diff --git a/android/app/build.gradle b/android/app/build.gradle index 483b2f6..081a9b2 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,5 +1,14 @@ apply plugin: 'com.android.application' +// Release signing is read from android/keystore.properties (git-ignored). When it +// is absent (e.g. fresh checkout / CI without secrets) the release build stays +// unsigned instead of failing the configuration. +def keystorePropsFile = rootProject.file("keystore.properties") +def keystoreProps = new Properties() +if (keystorePropsFile.exists()) { + keystoreProps.load(new FileInputStream(keystorePropsFile)) +} + android { namespace = "com.bargevasat.app" compileSdk = rootProject.ext.compileSdkVersion @@ -16,8 +25,21 @@ android { ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' } } + signingConfigs { + if (keystorePropsFile.exists()) { + release { + storeFile file(keystoreProps['storeFile']) + storePassword keystoreProps['storePassword'] + keyAlias keystoreProps['keyAlias'] + keyPassword keystoreProps['keyPassword'] + } + } + } buildTypes { release { + if (keystorePropsFile.exists()) { + signingConfig signingConfigs.release + } minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } diff --git a/android/mirror-init.gradle b/android/mirror-init.gradle new file mode 100644 index 0000000..80a1d63 --- /dev/null +++ b/android/mirror-init.gradle @@ -0,0 +1,24 @@ +// Injects the myket.ir Maven mirror into every project's buildscript + normal +// repositories. Needed because dl.google.com is unreachable here and some +// Capacitor subprojects declare only google()/mavenCentral() in node_modules. +// Pass on the command line with: gradlew -I mirror-init.gradle +allprojects { + buildscript { + repositories { + maven { url 'https://maven.myket.ir' } + maven { url 'https://mirror.abrha.net/repository/maven/' } + } + } + repositories { + maven { url 'https://maven.myket.ir' } + maven { url 'https://mirror.abrha.net/repository/maven/' } + } + // Build-Tools 35.0.0 isn't installed (and can't be fetched — Google is + // blocked here). Pin every Android module to the installed 36.0.0. + afterEvaluate { proj -> + def android = proj.extensions.findByName('android') + if (android != null) { + android.buildToolsVersion = '36.0.0' + } + } +} diff --git a/src/app/globals.css b/src/app/globals.css index 9044fc0..8dd3aa2 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -107,6 +107,25 @@ body { overscroll-behavior: none; } +/* Native-app feel: no blue tap flashes, no long-press callout, no accidental + text selection on UI chrome (inputs/messages opt back in below). */ +* { + -webkit-tap-highlight-color: transparent; +} +body { + -webkit-touch-callout: none; + -webkit-user-select: none; + user-select: none; + touch-action: manipulation; /* kill the 300ms double-tap-to-zoom delay */ +} +input, +textarea, +[contenteditable="true"], +.select-text { + -webkit-user-select: text; + user-select: text; +} + body { background: radial-gradient(120% 90% at 50% 18%, var(--felt-center) 0%, var(--felt-mid) 52%, var(--felt-edge) 100%),