question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Task 'runAffectedUnitTests' not found in root project

See original GitHub issue

Whenever I apply the plugin to a project and run the ./gradlew runAffectedUnitTests -Paffected_module_detector.enable command, I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Task 'runAffectedUnitTests' not found in root project 'my-project'.

Running ./gradle tasks or ./gradlew tasks -Paffected_module_detector.enable results in no tasks added by this plugin either.

I have tried with multiple Android/Java only projects which all have different configurations, but all come up with the same results. I even copy pasted this entire block into the root build.gradle (thus having two buildscript blocks) to no success.

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.dropbox.affectedmoduledetector:affectedmoduledetector:0.1.0"
  }
}
apply plugin: "com.dropbox.affectedmoduledetector"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
digitalbuddhacommented, Nov 30, 2020

new snapshot is up, will verify internally then do a real release

1reaction
digitalbuddhacommented, Nov 26, 2020

I think my last change was racy, we’ve seen this before where the modules tasks did not exist before we ran our plugin task creation. Thanks for reporting I’ll replicate and fix in am.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Task 'run' not found in root project - gradle - Stack Overflow
To verify this, you can go to your project folder inside you terminal and run gradle tasks . You should see the run...
Read more >
Affected Module Detector - GitHub
The tracker will evaluate the project and find all modules and their dependencies for ... //rootproject apply plugin: "com.dropbox.affectedmoduledetector".
Read more >
'Project not found in root project' when running Gradle test ...
Run/Debug configuration has 'Gradle project' property which points 'child'. Changing it to 'root' allows to run tests in package without problem. alt text....
Read more >
Task 'run' not found in root project - Gradle Forums
Task 'run' not found in root project 'LAB4'. Try: Run gradle tasks to get a list of available tasks. Run with --stacktrace option...
Read more >
Revamping the Android testing pipeline at Dropbox
These exceptions told our tooling to not validate test coverage on those ... private fun registerRunAffectedUnitTests(rootProject: Project, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found