klaxit / hidden-secrets-gradle-plugin

🔒 Deeply hide secrets on Android
MIT License
395 stars 40 forks source link

apk failed to generate on bitbucket pipeline #86

Open ethanonfire opened 3 months ago

ethanonfire commented 3 months ago

Hello,

I am new to NDK. So far, I have been able to apply the plugin and create the APK locally. However, I have encountered issues when attempting to build it on Bitbucket Pipeline.

this is the error msg i get:

FAILURE: Build failed with an exception.

please note that i gitignored all files in .cxx folder

this is my bitbucket-pipeline.yml, does bitbucket support NDK?

deployment-production-release-apk:
  - variables:
      - name: VERSION_CODE
      - name: VERSION_GROUPS
        default: "Mobile-QA,Mobile-DEV,Mobile-DESG,Mobile-BIZ,External"
      - name: ADDITIONAL_NOTE
  - step:
      size: 2x
      name: Production Release APK
      clone:
        depth: full
      deployment: production
      caches:
        - gradle
      script:
        - if [ -z "$VERSION_CODE" ]; then export VERSION_CODE=$BITBUCKET_BUILD_NUMBER; fi
        - COMMIT_MESSAGES=`git log origin/development.. --oneline --pretty=format:" • [%h] %s ~%cn"`
        - COMMIT_HASH=`git rev-parse --short $BITBUCKET_COMMIT`
        - DATETIME=$(date '+%D %H:%M %Z');
        - export VERSION_NOTE="Branch=$BITBUCKET_BRANCH"$'\n'"Commit=$COMMIT_HASH"$'\n'"Datetime=$DATETIME"
        - if [ -n "$ADDITIONAL_NOTE" ]; then export VERSION_NOTE="$VERSION_NOTE"$'\n'"Note=$ADDITIONAL_NOTE"; fi
        - if [ -n "$COMMIT_MESSAGES" ]; then export VERSION_NOTE="$VERSION_NOTE"$'\n\n'"Commit History"$'\n'"${COMMIT_MESSAGES::15500}"; fi
        - echo $VERSION_NOTE
        # Setup licenses
        - mkdir "${ANDROID_HOME}/licenses" || true
        # Give execution access to gradle
        - chmod +x gradlew
        ##########  ASSEMBLE AND UPLOAD TO FIREBASE ##########
        # Firebase App Distribution requires FIREBASE_TOKEN environment variable
        - bash ./gradlew assembleProductionRelease appDistributionUploadProductionRelease

Thank you for the help!