Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8616039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:31:30+00:00 2026-06-12T05:31:30+00:00

I have a pretty standard Gradle build that’s building a Java project. When I

  • 0

I have a pretty standard Gradle build that’s building a Java project.

When I run it for the first time, it compiles everything and runs the tests. When I run it a second time without changing any files, it runs the tests again.

According to this thread, Gradle is supposed to be lazy by defaut and not bother running tests if nothing has changed. Has the default behaviour here been changed?

EDIT:

If I run gradle test repeatedly, the tests only run the first time and are subsequently skipped. However, if I run gradle build repeatedly, the tests get re-run every time, even though all other tasks are marked as up-to-date.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:31:31+00:00Added an answer on June 12, 2026 at 5:31 am

    OK, so I got the answer thanks to Rene prompting me to look at the ‘-i’ output.

    I actually have 2 test tasks: the ‘test’ one from the Java plugin, and my own ‘integrationTest’ one. I didn’t mention this in the question because I didn’t think it was relevant.

    It turns out that these tasks are writing their output (reports, etc.) to the same directory, so Gradle’s task-based input and output tracking was thinking that something had changed, and re-running the tests.

    So the next question is how to cleanly – and with minimal Groovy/Gradle code – separate two instances of the test task.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty standard .NET MVC 3 application that uses Ninject for dependency
My problem: require_once '/includes/aws-sdk-1.5.2/sdk.class.php'; My environment: I have a pretty standard PHP site that
I have a pretty standard project with Spring Security. I have a login form
I have a pretty standard css layout where I use a container div that
I have pretty sophisticated build using gradle - with a number of own gradle
I currently have a a pretty standard jqgrid that I would like to change
I have a small Java/Gradle project. I'm using the Application plugin to create a
I have pretty large file names that follow a standard naming practice and I
I have a Rails application that right now is pretty standard: Heroku/PostgreSQL backend, users
I have a Rails 3 application with a pretty standard multipart form that includes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.