feat: version v0.0.1 affichée en bas du drawer (BuildConfig.VERSION_NAME)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
# Règles — Déploiement après commit
|
||||||
|
|
||||||
|
## Comportement attendu
|
||||||
|
Après chaque `git commit` (et `git push`), lancer systématiquement l'installation sur le device physique :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
JAVA_HOME=/home/Gato/.jdks/temurin-25.0.2 PATH="$JAVA_HOME/bin:$PATH" \
|
||||||
|
./gradlew installDebug -Pandroid.injected.deployment.target.serial=89UDU18724006699
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- Le serial `89UDU18724006699` est le device Android physique de test (Huawei ANE-LX1, Android 9)
|
||||||
|
- `JAVA_HOME` doit pointer sur Temurin 25 (JBR sans `jlink`)
|
||||||
|
- Si le device est `UNAUTHORIZED` : demander à l'utilisateur d'accepter la dialog ADB sur le téléphone
|
||||||
|
- Si `INSTALL_FAILED_UPDATE_INCOMPATIBLE` : demander à l'utilisateur de désinstaller l'appli manuellement puis relancer
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Règles — Numéro de version
|
||||||
|
|
||||||
|
## Format
|
||||||
|
`0.0.X` — incrémentation du dernier segment à chaque série de modifications.
|
||||||
|
|
||||||
|
Exemples : `0.0.1` → `0.0.2` → `0.0.3` → ... → `0.1.0` (changement majeur)
|
||||||
|
|
||||||
|
## Où modifier
|
||||||
|
`app/build.gradle.kts` → `versionName = "X.X.X"`
|
||||||
|
|
||||||
|
## Comportement attendu
|
||||||
|
- Monter le numéro de version à chaque commit (ou série de commits dans la même session).
|
||||||
|
- La version s'affiche automatiquement en bas du menu latéral via `BuildConfig.VERSION_NAME`.
|
||||||
|
- Ne pas oublier de mettre à jour la version avant le commit final de chaque session.
|
||||||
|
|
||||||
|
## Version actuelle
|
||||||
|
`0.0.1`
|
||||||
@@ -16,7 +16,7 @@ android {
|
|||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "0.1.0"
|
versionName = "0.0.1"
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,6 +40,7 @@ android {
|
|||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose = true
|
compose = true
|
||||||
|
buildConfig = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,11 @@ package com.planify.mobile.ui
|
|||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
@@ -165,6 +167,15 @@ fun MainScreen(viewModel: DrawerViewModel = hiltViewModel()) {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
Spacer(Modifier.height(8.dp))
|
Spacer(Modifier.height(8.dp))
|
||||||
|
Text(
|
||||||
|
text = "v${com.planify.mobile.BuildConfig.VERSION_NAME}",
|
||||||
|
style = MaterialTheme.typography.labelSmall,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(bottom = 16.dp),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user