Summary: Apparently this seems to be the only way to make build work, with the updated licenses. It also follows the same strategy as Travis. I am using double pipe in `sdkmanager` command execution, to avoid breaking the build, because `sdkmanager` returns exit code 141 in case it meets the requirements requested. (e.g.: `yes | sdkmanager --licenses` returns 141, which in turn breaks the build due to `set -eo pipefail` Bash flags, that CircleCI is using in order to execute any scripts) For the record, I tried the following solutions, that did not work: * Add accepted license SHA in Android SDK licenses folder. * Accept all licenses prior to running the other jobs (with a separate job, working as a dependency to the rest of the Workflow jobs) (`yes | sdkmanager --licenses`) * Accept all licenses prior to executing any Gradle command (without a separate job) (`yes | sdkmanager --licenses`) Pull Request resolved: https://github.com/facebook/flipper/pull/362 Differential Revision: D13817430 Pulled By: passy fbshipit-source-id: d8c95fc5b9202306dd50ea103b6e90142e73ef61
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
version: 2.1
|
|
executors:
|
|
default-executor:
|
|
docker:
|
|
- image: circleci/android:api-28-ndk-r17b
|
|
|
|
environment:
|
|
_JAVA_OPTIONS: "-Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:ParallelGCThreads=2 -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2"
|
|
TERM: 'dumb'
|
|
|
|
jobs:
|
|
snapshot:
|
|
executor: default-executor
|
|
docker:
|
|
- image: circleci/android:api-28-ndk-r17b
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: build and deploy
|
|
command: |
|
|
yes | sdkmanager "platforms;android-27" || true
|
|
./gradlew :android:assembleRelease && scripts/publish-android-snapshot.sh
|
|
|
|
release:
|
|
executor: default-executor
|
|
docker:
|
|
- image: circleci/android:api-28-ndk-r17b
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: build and deploy
|
|
command: |
|
|
yes | sdkmanager "platforms;android-27" || true
|
|
./gradlew :android:assembleRelease && scripts/publish-android-release.sh
|
|
|
|
workflows:
|
|
version: 2
|
|
build-and-deploy:
|
|
jobs:
|
|
- snapshot:
|
|
filters:
|
|
branches:
|
|
only: master
|
|
- release:
|
|
filters:
|
|
tags:
|
|
only: /^v.*/
|
|
branches:
|
|
ignore: /.*/
|