ionic-team/trapeze

Unable to execute more than one `replace` or `insert` value in `variables.gradle`

csahid opened this issue · 1 comments

Hello, I need to replace the values of multiple line in my variables.gradle but it seems that trapeze only go for the first change it sees.

Here is my config.yml at the gradle level:

platforms:
  android:
    versionName: $VERSION_NAME
    versionCode: $CI_BUILD_NUMBER
    gradle:
      - file: variables.gradle
        target:
          ext:
            compileSdkVersion:
        replace:
          compileSdkVersion: 32

      - file: variables.gradle
        target:
          ext:
            targetSdkValue:
        replace:
          targetSdkValue: 33

      - file: variables.gradle
        target:
          ext:
        insertType: 'variable'
        insert:
          - rgcfaIncludeGoogle: true
          - rgcfaIncludeFacebook: true

This configuration is able to change the value of compileSdkVersion correctly but not the rest.

I don't know if there is a problem in my yaml file or with trapeze, can you help please ? Thanks

edit : Also it seems that the issue is happening when we try to modify the same file multiple times ; if there is 2+ modifications in a single file, the first one is taken into account then trapeze goes to the next file in the list and does the same thing : makes only the first modification it sees and goes to next file in line, etc...

Same here ... it would be really practical to modify the file more than 1 time 😬