snehilrx / Fetch

Android app for watching animes
GNU General Public License v3.0
179 stars 12 forks source link

error build #52

Closed mytom2trung closed 1 year ago

mytom2trung commented 1 year ago

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 commented 1 year ago

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}