Android CircleCI:为同一存储库中的多个项目在.yml文件中设置工作目录

Android CircleCI:为同一存储库中的多个项目在.yml文件中设置工作目录,android,github,continuous-integration,circleci,schema.yml,Android,Github,Continuous Integration,Circleci,Schema.yml,V1目录中有一个android项目。我想运行lint检查并使用circle.yml文件存储工件。我的circle.yml文件位于GitHub repo的根目录(e.I repository/Android)中。我有3个部门负责V1 Android项目e.I Master、QA和Develop 下面是我在开发部门的yml文件 version: 2 jobs: build_develop: working_directory: ~/code docker: - ima

V1目录中有一个android项目。我想运行lint检查并使用circle.yml文件存储工件。我的circle.yml文件位于GitHub repo的根目录(e.I repository/Android)中。我有3个部门负责V1 Android项目e.I Master、QA和Develop

下面是我在开发部门的yml文件

version: 2
jobs:
  build_develop:
    working_directory: ~/code
    docker:
      - image: circleci/android:api-25-alpha
    environment:
      JVM_OPTS: -Xmx3200m
    steps:
      - checkout:
          path: ~/V1
      - restore_cache:
          key: jars-{{ checksum "V1/build.gradle" }}-{{ checksum  "V1/app/build.gradle" }}
      - run:
          name: Download Dependencies
          command: ./V1/gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "V1/build.gradle" }}-{{ checksum  "V1/app/build.gradle" }}
      - run:
          name: Run lint
          command: |
            ./gradlew lintDebug
      - store_artifacts:
          path: app/build/reports
          destination: reports/
      - run:
          name: Run build
          command: |
            ./gradlew assembleDebug
      - store_artifacts:
          path: app/build/outputs/apk
          destination: apks/

workflows:
  version: 2

  build_app:
    jobs:
      - build_develop:
          filters:
            branches:
              only:
                - develop
它在CircleCI build dashboard中给出如下错误

我想,我在设置工作目录:path和签出:path时犯了一些错误。我不知道如何为这个场景设置正确的路径


提前感谢。

在这里,项目结构已经有了V1文件夹。签出时,您正在代码文件夹中再次创建要签出的V1文件夹。我们可以通过如下移除签出路径来解决这个问题

steps:
      - checkout
      - restore_cache:
          key: jars-{{ checksum "V1/build.gradle" }}-{{ checksum  "V1/app/build.gradle" }}