Last active
March 12, 2021 13:19
-
-
Save donnfelker/7189cad9c6654f918e7e to your computer and use it in GitHub Desktop.
Sample CircleCI Configuration For an Android App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Build configuration for Circle CI | |
# | |
general: | |
artifacts: | |
- /home/ubuntu/your-app-name/app/build/outputs/apk/ | |
machine: | |
environment: | |
ANDROID_HOME: /usr/local/android-sdk-linux | |
dependencies: | |
override: | |
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-19.1.0,android-19,extra-google-m2repository,extra-google-google_play_services,extra-android-support | |
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies | |
test: | |
override: | |
- (./gradlew assemble): | |
timeout: 360 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Build configuration for Circle CI | |
# | |
general: | |
artifacts: | |
- /home/ubuntu/your-app-name/app/build/outputs/apk/ | |
machine: | |
environment: | |
ANDROID_HOME: /usr/local/android-sdk-linux | |
dependencies: | |
override: | |
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-21.1.2,android-21,extra-google-m2repository,extra-google-google_play_services,extra-android-support | |
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies | |
test: | |
override: | |
- (./gradlew assemble): | |
timeout: 360 |
I have this
dependencies:
override:
- echo "y" | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-25.0.1,android-25,extra-google-m2repository,extra-google-google_play_services,extra-android-support
- chmod +x gradlew
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
and I get the following error
A problem occurred configuring project ':android-lib'.
> You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
What am I missing?
@bolorundurowb there are different licenses that need to be accepted so you need to group your packages according to their license.
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter "platform-tools, tools"
- echo y | android update sdk --no-ui --all --filter "android-24, build-tools-25.0.2"
- echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-android-support"
I also noticed that you have echo "y"
try removing the quotes surrounding y
hi ,i'm new to CircleCi , is their any way to output the .apk as artifact .I have tried the following line in .yml file
-store_artifacts:
path:app/build/output/apk
destination: apks/
and the output is : No artifact file found at location
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very new at this. I got this error after I put circle.yml (24) into my repo:Any idea why this is happening?Never mind, there was a typo