updated deploying
This commit is contained in:
@@ -1,18 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo -n "version number: "
|
|
||||||
read ver
|
|
||||||
|
|
||||||
echo -n "glpat: "
|
echo -n "glpat: "
|
||||||
read glpat
|
read glpat
|
||||||
|
|
||||||
|
echo -n "keystore password: "
|
||||||
|
read ks_pass
|
||||||
|
|
||||||
cd ./mobile
|
cd ./mobile
|
||||||
|
|
||||||
|
ver=$(./gradlew printVersionName -q)
|
||||||
|
|
||||||
# build
|
# build
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
|
|
||||||
# sign
|
# sign
|
||||||
~/Android/Sdk/build-tools/35.0.0/apksigner sign --alignment-preserved --ks ~/Documents/android-keystore.jks app/build/outputs/apk/release/com.odweta.solon_$ver.apk
|
~/Android/Sdk/build-tools/35.0.0/apksigner sign --alignment-preserved --ks ~/Documents/android-keystore.jks --ks-pass pass:$ks_pass app/build/outputs/apk/release/com.odweta.solon_$ver.apk
|
||||||
|
|
||||||
|
exit
|
||||||
|
|
||||||
# add, commit, push
|
# add, commit, push
|
||||||
git add ..
|
git add ..
|
||||||
|
|||||||
@@ -4,6 +4,26 @@ plugins {
|
|||||||
alias(libs.plugins.kotlin.compose)
|
alias(libs.plugins.kotlin.compose)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register("printVersionName") {
|
||||||
|
doLast {
|
||||||
|
println(android.defaultConfig.versionName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("deploy") {
|
||||||
|
dependsOn("assembleDebug")
|
||||||
|
dependsOn("installDebug")
|
||||||
|
doLast {
|
||||||
|
exec {
|
||||||
|
commandLine("adb", "shell", "am", "start", "-n", "com.odweta.solon/.MainActivity")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("b") {
|
||||||
|
dependsOn("assembleDebug")
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.odweta.solon"
|
namespace = "com.odweta.solon"
|
||||||
compileSdk = 34
|
compileSdk = 34
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cp app/build/outputs/apk/release/com.odweta.solon_$1.apk ../release/
|
|
||||||
Reference in New Issue
Block a user