build(android): release signing + mirror/JDK setup; native-feel CSS
- Release signing via android/keystore.properties (git-ignored); build.gradle
signs release builds when the props file is present, stays unsigned otherwise.
- android/mirror-init.gradle: injects the myket.ir Maven mirror into every
project's buildscript (dl.google.com is unreachable here) and pins Build-Tools
to the installed 36.0.0. Build with:
gradlew assembleRelease bundleRelease -I mirror-init.gradle
(JAVA_HOME must point at a JDK 21 — Capacitor 8 compiles against Java 21.)
- gitignore keystores, keystore.properties, and /dist artifacts.
- Native-app feel: kill tap-highlight, long-press callout, and stray text
selection (inputs/messages opt back in); touch-action: manipulation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,12 @@
|
|||||||
# production
|
# production
|
||||||
/build
|
/build
|
||||||
|
|
||||||
|
# built mobile artifacts (APK/AAB) + release signing secrets
|
||||||
|
/dist
|
||||||
|
/android/keystore.properties
|
||||||
|
*.jks
|
||||||
|
*.keystore
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.pem
|
*.pem
|
||||||
|
|||||||
@@ -99,3 +99,8 @@ app/src/main/assets/public
|
|||||||
app/src/main/assets/capacitor.config.json
|
app/src/main/assets/capacitor.config.json
|
||||||
app/src/main/assets/capacitor.plugins.json
|
app/src/main/assets/capacitor.plugins.json
|
||||||
app/src/main/res/xml/config.xml
|
app/src/main/res/xml/config.xml
|
||||||
|
|
||||||
|
# Release signing — NEVER commit (back these up separately!)
|
||||||
|
keystore.properties
|
||||||
|
*.jks
|
||||||
|
*.keystore
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
apply plugin: 'com.android.application'
|
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 {
|
android {
|
||||||
namespace = "com.bargevasat.app"
|
namespace = "com.bargevasat.app"
|
||||||
compileSdk = rootProject.ext.compileSdkVersion
|
compileSdk = rootProject.ext.compileSdkVersion
|
||||||
@@ -16,8 +25,21 @@ android {
|
|||||||
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
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 {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
if (keystorePropsFile.exists()) {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
}
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 <task>
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -107,6 +107,25 @@ body {
|
|||||||
overscroll-behavior: none;
|
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 {
|
body {
|
||||||
background:
|
background:
|
||||||
radial-gradient(120% 90% at 50% 18%, var(--felt-center) 0%, var(--felt-mid) 52%, var(--felt-edge) 100%),
|
radial-gradient(120% 90% at 50% 18%, var(--felt-center) 0%, var(--felt-mid) 52%, var(--felt-edge) 100%),
|
||||||
|
|||||||
Reference in New Issue
Block a user