What is expected <block end>, but found BlockMappingStart

android
codedeploy

#1

I have been configured the Auto deploying the Apk file to Google Play Store via CircleCI. Now I’ve just faced with the problem that cause build failed and it shows:

expected <block end>, but found BlockMappingStart
   release:
       branch: master
       commands:
        - ./gradlew publishApkRelease
                -Dorg.gradle.project.track=production

By follow the article from CircleCI site here is my .yml file look like:

machine:
    java:
        version: openjdk8
    environment:
        ANDROID_HOME: /usr/local/android-sdk-linux
        GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4608m -XX:+HeapDumpOnOutOfMemoryError"'

dependencies:
    pre:
        - echo y | android update sdk --no-ui --all --filter "tools"
        - echo y | android update sdk --no-ui --all --filter "platform-tools"
        - echo y | android update sdk --no-ui --all --filter "build-tools-24.0.0"
        - echo y | android update sdk --no-ui --all --filter "android-24"
        - echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
        - echo y | android update sdk --no-ui --all --filter "extra-google-google_play_services"
        - echo y | android update sdk --no-ui --all --filter "extra-android-support"
        - echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
        - (./gradlew -version):
                    timeout: 360

    override:
        #- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
        - export TERM="dumb"; if [ -e ./gradlew ]; then ./gradlew clean dependencies -stacktrace;else gradle clean dependencies -stacktrace;fi

#Pull any submodules
checkout:
  post:
    - git submodule init
    - git submodule update

#-PdisablePreDex is a must else gradle just dies due to memory limit
#Replace
test:
    override:
        - (./gradlew assemble -PdisablePreDex -stacktrace):
            timeout: 360
        - cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME}/app/build/outputs/apk/ $CIRCLE_ARTIFACTS
        - emulator -avd circleci-android22 -no-audio -no-window:
            background: true
            parallel: true
        # wait for it to have booted
        - circle-android wait-for-boot
        # run tests  against the emulator.
        - ./gradlew connectedAndroidTest

#Deploy when tests pass
deployment:
   release:
       branch: master
       commands:
        -./gradlew publishApkRelease 
            -Dorg.gradle.project.track=alpha
    staging:
        branch: staging
        commands:
             - (./gradlew clean assembleStaging crashlyticsUploadDistributionStaging -PdisablePreFex):
                timeout: 720

I already set classpath and apply a plugin:

apply plugin: 'com.github.triplet.play' // in app module
classpath 'com.github.triplet.gradle:play-publisher:1.1.4' // in project level

I tried to change the command to:

release:
   branch: master
   commands:
-(./gradlew publishApkRelease -Dorg.gradle.project.track=alpha):
            timeout: 720

just like I have done on Crahlytic but it still doesn’t work (Auto release to Crashlytic is working fine.)

Please suggest. Thanks.


#2