Comments (14)
Thanks for the issue!
Hopefully the build scan will be enough, but do you have a minimal reproducer? Those repro steps don't look sufficient to me.
from dependency-analysis-gradle-plugin.
I've got a reproducer, this is a new project created with Android Studio Hedgehog with the only change being that I added this plugin MyApplication.zip
from dependency-analysis-gradle-plugin.
Here's another repro, just uncomment the commented out enabling of DAGP in the root build.gradle.kts: https://github.com/ZacSweers/CatchUp
from dependency-analysis-gradle-plugin.
Duplicates #1112.
from dependency-analysis-gradle-plugin.
I've got a reproducer, this is a new project created with Android Studio Hedgehog with the only change being that I added this plugin MyApplication.zip
@gabrielittner I downloaded this zip and ran buildHealth
on it and there were no errors. Is there something I'm missing?
from dependency-analysis-gradle-plugin.
I can still reproduce it when I download the zip and run buildHealth. However after deleting ~/.android/analytics.settings
it doesn't reproduce anymore and as soon as the file is recreated it's happening again. Just the existence of the file seems to be enough, so you should be able to reproduce it by just creating it without content.
from dependency-analysis-gradle-plugin.
how is that file used? I'm not familiar with it. do you have an example with actual content? links to documentation?
from dependency-analysis-gradle-plugin.
I just checked and I already have such a file in my environment. The contents of it are
{"userId":"73484633-8bc3-4f83-9fcb-edcf4ec64b4e","hasOptedIn":false,"debugDisablePublishing":false,"saltValue":0,"saltSkew":-1}
from dependency-analysis-gradle-plugin.
Mine looks the same and it's created/updated when you toggle "send usage statistics to Google" in Android Studio, other than that I don't know more about it. I was just thinking about it since the issue is analytics related. For me it happens regadless of whether "hasOptedIn"
is true or false but maybe changing it true will help reproducing it?
from dependency-analysis-gradle-plugin.
I changed the value to true and reran buildHealth (with --rerun-tasks
) and it worked fine 🤷
Have you tried with rerun-tasks?
from dependency-analysis-gradle-plugin.
--rerun-tasks
didn't help. I tried aroudn a bit more and it looks like you need to kill the daemon after changing hasOptedIn or generally use --no-daemon
for the change to take effect.
from dependency-analysis-gradle-plugin.
--no-daemon
did it 🤔
Ok, so, to reproduce this error, it looks like at least two things need to be true:
- set
hasOptedIn
to true - Run with
--no-daemon
==>./gradlew :app:explodeXmlSourceDebugTest --no-daemon
- ???
I note that this doesn't fail with the :app:explodeXmlSourceDebug
task (for the main source set), nor does it fail for the :app:explodeXmlSourceDebugAndroidTest
task (the androidTest source set). It's only failing for the test
source set. I think this might relate to the Android unit tests not having resources enabled, and DAGP not handling that properly.
Further confirmation, the success cases all have tasks like :app:generateDebugAndroidTestResValues
and :app:generateDebugResValues
. There however is no task named :app:generateDebugTestResValues
. (type: com.android.build.gradle.tasks.GenerateResValues
.)
from dependency-analysis-gradle-plugin.
I can eliminate the error by basically commenting out this method body for android unit tests. Given the whole chain is nullable, it is bizarre to me that this happens. It looks like an AGP bug.
override fun getAndroidRes(): Provider<Iterable<File>> {
// return project.provider { emptyList() }
return sources.res?.all
?.map { layers -> layers.flatten() }
?.map { directories ->
directories.map { directory -> directory.asFileTree.matching(Language.filterOf(Language.XML)) }
}
?.map { trees -> trees.flatten() }
?: project.provider { emptyList() }
}
from dependency-analysis-gradle-plugin.
https://issuetracker.google.com/issues/325307775
from dependency-analysis-gradle-plugin.
Related Issues (20)
- Feature Request: Advice on modules that could/should be combined HOT 1
- Add an option to shush the AGP compatibility warning HOT 4
- Adviced to add transitive which is exposed as Kotlin default value in used lib function HOT 1
- `reason` task only shows used classes if there are no exposed classes HOT 3
- Support coreLibraryDesugaring configuration HOT 1
- Incorrect module structure advice HOT 1
- Add flag to silent the console output for the ProjectHealthTask HOT 2
- Provide modularization advice based on dependency information HOT 1
- JPMS HOT 7
- Annotations used to annotate and things (enum constants, class literals, ...) used for annotation member values should not count to ABI HOT 1
- explodeXmlSourceDebugandroidTest task fails with `Premature end of file` exception when androidTest sources include an xml file with no content HOT 3
- How to change buildHealth task's dependencies HOT 1
- How can I ignore specific flavor & build type? HOT 1
- Unable to load class 'org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunnerKt'
- CompileOnly false positive with annotations used at runtime HOT 3
- Bug: caching issues for included builds HOT 1
- Kotlin plugin must be loaded in same (or parent) classloader to DAGP: add check and print actionable error message HOT 4
- Lots of false positive under "Unused dependencies" : project doesn't compile anymore when removed HOT 1
- Please add support for TYPESAFE_PROJECT_ACCESSORS HOT 1
- Allow bundles to be configured in DependencyAnalysisSubExtension HOT 1
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 dependency-analysis-gradle-plugin.