-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle 7.1 [Android] Execution failed for task ':app:cyclonedxBom'. #109
Comments
Same for me with
and // Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
id 'org.cyclonedx.bom' version "1.4.1"
}
task clean(type: Delete) {
delete rootProject.buildDir
} I get this as a result:
Here is the debug log. |
Same for me, it would be nice if we could configure a variant build to run the boming process. |
I think I discovered a workaround. FWIW, it looks like Gradle / Android may have introduced more classpath configs in in versions >4 that cause these issues. If you ignore the problematic configs, you'll get a (seemingly) complete SBOM: // build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
id 'org.cyclonedx.bom' version '1.5.0'
}
cyclonedxBom {
skipConfigs += [
"debugCompileClasspath",
"debugAndroidTestCompileClasspath",
"debugUnitTestCompileClasspath",
"releaseUnitTestCompileClasspath",
"debugUnitTestRuntimeClasspath",
"releaseUnitTestRuntimeClasspath"
]
} $ ./gradlew cyclonedxBom
...
BUILD SUCCESSFUL in 774ms
1 actionable task: 1 executed ☝️ This is with the default "Blank Activity" project in Android Studio. The resulting SBOM is here: https://gist.github.com/nscuro/442bd29dbcb4b1b55d55c2d610465533 I don't know enough of Gradle or Android to understand why these classpaths are problematic. But they don't seem necessary for SBOM generation. For the time being, skipping them appears to be an OK-ish workaround. |
os
Android Studio 2021.1.1 version
gradle 7.1.1
java version "11.0.7" 2020-04-14 LTS
details
The demo project failed to obtain dependencies,
The configuration is as follows
No problem after replacing with gradle version 4.2.2......
build.gradle in the root directory
app/build.gradle
error log
The text was updated successfully, but these errors were encountered: