gradle / gradle-build-action

Execute your Gradle build and trigger dependency submission
https://github.com/marketplace/actions/gradle-build-action
MIT License
679 stars 97 forks source link

[Bug] Github Actions error with Android Gradle plugin 8.2.0-alpha01 #694

Closed AndreSand closed 1 year ago

AndreSand commented 1 year ago

Description Hi, I updated to the latest Android Studio Hedgehog(canary) and updated gradle plugin 8.2.0-alpha01. When I run on Github Actions I get the below error.

Error:

Downloading https://services.gradle.org/distributions/gradle-8.0-bin.zip ...........10%............20%............30%............40%............50%............60%...........70%............80%............90%............100%

Welcome to Gradle 8.0!

For more details see https://docs.gradle.org/8.0/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

Checking the license for package Android SDK Build-Tools 34-rc3 in /usr/local/lib/android/sdk/licenses FAILURE: Build failed with an exception.

Warning: License for package Android SDK Build-Tools 34-rc3 not accepted.

Is it regression? Yes, it was working on previous gradle plugin versions

Expected behavior New gradle releases builds Android successfully

Actual behavior Currently GitHub image is not accepting the sdkmanager license.

Warning: License for package Android SDK Build-Tools 34-rc3 not accepted.

Repro steps Use an Android project Update to the latest gradle plugin version Build on GitHub Actions Note: Only fails when we build using the latest Android gradle plugin version, Github Actions works fine using older Android gradle plugin versions.

Related ticket: https://github.com/actions/runner-images/issues/7506

cdsap commented 1 year ago

Hi @AndreSand, thanks for the report. I tested locally, without using gradle-build-action: when I don't have installed/accepted the Android SDK Build-Tools 34-rc3 license, I get the same error: Screenshot 2023-05-01 at 10 54 51 AM Once I installed the SDK build tools, build works: Screenshot 2023-05-01 at 10 58 54 AM

Checking the runner-images repo I see that the 34-rc3 is not included in the sdk components: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#android

Looks like the issue is related to the runner-images repo

AndreSand commented 1 year ago

Hi @cdsap, Thank you for looking into issue.

Yes looks like the issue is with the Github runner-images.

Regards, Andres