Comments (2)
To sum up my research into this…
The issue with :my_anroid_dynamic_feature_module:processDebugAndroidTestResources
is actually a bug in AGP for dynamic modules. It fails to compile androidTest
for that module by not being able to resolve resources from an aar dependency that are actually there. SCA has nothing to do with it, other than simply forcing the task to run, as we need compiled sourced for PMD / Spotbugs analysis. The same issue would arise if you were to simply write an instrumentation test for that module even without SCA. I'd therefore recommend you report that back to https://b.android.com/
As for the issue with no classes for Spotbugs analysis… the problem relies on your project having a non-emtpy Java sourceset, that contains no Java classes (the failing module contains only Kotlin classes in the Java sourceset). As SCA doesn't yet support Kotlin, the Kotlin classes are not being present in the analysis, but as there are files, Spotbugs still believes there is something to analyze and fails…
I do have in backlog to fully support Kotlin in an upcoming 3.x release. In the meantime, you can use the following workaround:
tasks.matching { it.name =~ /^spotbugs.+/ }.configureEach {
it.onlyIf { !it.classes.empty }
}
from static-code-analysis-plugin.
We can close it, I added more info at https://issuetracker.google.com/issues/137253405#comment3 (if you need, I can add a new issue for the spotbugs failure)
from static-code-analysis-plugin.
Related Issues (20)
- Running with --offline prints warning but still attempts to download file HOT 1
- Prepare for Gradle 4.0 HOT 2
- Android 2.3.0 ceased to explode aars, PMD / Findbugs have incomplete auxclasspaths HOT 4
- Android productFlavors are not supported HOT 6
- Java projects needs a defaults findbugs suppression
- Avoid using afterEvaluate UNLESS using an Android plugin prior to 1.3
- IllegalStateException: Resolving configuration 'releasePublish' directly is not allowed under AGP 3.0.0 HOT 1
- Honour Gradle offline setting in Android Studio HOT 2
- Standard java projects download android configuration
- Regarding Analysis Results HOT 1
- The findbugs project is now spotbugs HOT 5
- Consider using android.getBootClasspath()
- Nag when ANDROID_HOME is undefined
- HTML Reporting is not working
- SCA not working HOT 2
- InvalidUserDataException: Cannot change role of configuration XXX after it has been included in dependency resolution HOT 2
- Support Kotlin
- Issue running SpotBugs on 3.0.0 HOT 1
- Checkstyle won't find root module on 3.0.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from static-code-analysis-plugin.