Home > Net >  Gradle only run test
Gradle only run test

Time:01-19

I am new to gradle java. I a use Intellij to debug a sophisticated unit test case on an algorithm. The problem is every time after I click the 'debug' button, it takes long time (~2min) to start my test case, and from the log as following, it seems gradle is checking dependencies first and there are hundreds of them. Since most of the time I just re-trigger the debugger with no or very little change(no dependency related) to test code. How can I skip the dependency checking and only build the test file when there is a change?

Parallel execution with configuration on demand is an incubating feature.
> Task :corporate:common:processResources NO-SOURCE
...
hundreds tasks
...
> Task :indexing:signals:user:testClasses UP-TO-DATE
> Task :indexing:signals:user:test   <= my test case there

The Intellij debug configuration

enter image description here

CodePudding user response:

Press Alt F12 to open the terminal, and execute the command like the following:

gradlew :indexing:signals:user:test

CodePudding user response:

You can make gradle skip dependency checking by using the --offline parameter.

  •  Tags:  
  • Related