Skip to content

Commit fa22a20

Browse files
committed
Pass 'versionName' and 'versionCode' properties to the android 'build.gradle'
1 parent a09c41f commit fa22a20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

platform/pure.femto/build-android-native.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ APP_TITLE=$(./qmlcore/build -j -p pure.femto -P title ${APP_NAME} 2>/dev/null) |
6161
APP_DOMAIN=$(./qmlcore/build -j -p pure.femto -P domain ${APP_NAME} 2>/dev/null) || die "you have to specify application domain/package in .manifest/properties.domain"
6262
APP_ICON_COLOR=$(./qmlcore/build -j -p pure.femto -P iconColor ${APP_NAME} 2>/dev/null) || APP_ICON_COLOR=""
6363
APP_SDK_VERSION=$(./qmlcore/build -j -p pure.femto -P androidtargetSdkVersion ${APP_NAME} 2>/dev/null) || APP_SDK_VERSION="29"
64+
APP_VERSION=$(./qmlcore/build -j -p pure.femto -P version ${APP_NAME} 2>/dev/null) || APP_VERSION="1.0.0"
65+
APP_VERSION_CODE=$(./qmlcore/build -j -p pure.femto -P versionCode ${APP_NAME} 2>/dev/null) || APP_VERSION_CODE="1"
6466

6567
if [ -n "${APP_NAME}" ]; then
6668
echo "using app name ${APP_NAME}..."
@@ -109,6 +111,10 @@ pushd ${DST_DIR}
109111
sed -i "${P}" app/build.gradle
110112
P="s/namespace 'com.pureqml.android'/namespace '${APP_DOMAIN}'/"
111113
sed -i "${P}" app/build.gradle
114+
P="s/versionName \"1.0\"/versionName \"${APP_VERSION}\"/"
115+
sed -i "${P}" app/build.gradle
116+
P="s/versionCode 1/versionCode ${APP_VERSION_CODE}/"
117+
sed -i "${P}" app/build.gradle
112118

113119

114120
if [ ! -z "$APP_ICON_COLOR" ]; then

0 commit comments

Comments
 (0)