Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error build #52

Closed
mytom2trung opened this issue May 22, 2023 · 1 comment
Closed

error build #52

mytom2trung opened this issue May 22, 2023 · 1 comment

Comments

@mytom2trung
Copy link

When I build the app, I see the following error : Caused by: groovy.lang.MissingPropertyException: Cannot get property 'majorVersion' on extra properties extension as it does not exist

@snehilrx
Copy link
Owner

snehilrx commented May 22, 2023

Create a version.properties file in the root directory with the below contents.

majorVersion=1
minorVersion=0
patchVersion=0
buildNumber=3

To get more understanding of the build process you can check out the build.yml file.

     - name: apk
        env:
          KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
          KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
          KEY_PATH: ${{ github.workspace }}/${{ secrets.KEY_PATH }}
          STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
          BASE64_STRING: ${{ secrets.KEY_BASE64 }}
          new: ${{ env.version }}
        run: |
          echo "${BASE64_STRING}" | base64 --decode > ${KEY_PATH}
          major=$(echo "${new}" | awk -F. '{print $1}')
          minor=$(echo "${new}" | awk -F. '{print $2}')
          patch=$(echo "${new}" | awk -F. '{print $3}')
          build=$(echo "${new}" | awk -F. '{print $4}')
          property_content="majorVersion=${major}\nminorVersion=${minor}\npatchVersion=${patch}\nbuildNumber=${build}"
          echo ${property_content}
          # Write the property file
          echo -e "${property_content}" > version.properties
          ./gradlew :app:assembleRelease --scan
          rm -f ${KEY_PATH}
       
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants