Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evaluationDependsOnChildren(): No output at all (Gradle 6.6 RC2) #156

Closed
C-Otto opened this issue Jul 23, 2020 · 6 comments · Fixed by #171
Closed

evaluationDependsOnChildren(): No output at all (Gradle 6.6 RC2) #156

C-Otto opened this issue Jul 23, 2020 · 6 comments · Fixed by #171
Assignees
Labels
Milestone

Comments

@C-Otto
Copy link

C-Otto commented Jul 23, 2020

Description

I don't see any plugin specific output, everything looks the same. I just saw that the plugin dependencies were downloaded.

I applied the plugin to my multiproject Gradle project (using Gradle 6.6 RC 2).

plugins {
    id 'com.adarshr.test-logger' version '2.1.0'
}

I also tried adding apply plugin: 'com.adarshr.test-logger' to my subprojects, which didn't change anything (and according to the documentation this should not be necessary).

I see this with --info --debug:

2020-07-23T13:28:51.292+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin com.adarshr.test-logger to root project 'xxx-core-parent'' started
2020-07-23T13:28:51.292+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin com.adarshr.test-logger to root project 'xxx-core-parent''
2020-07-23T13:28:51.292+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin com.adarshr.test-logger to root project 'xxx-core-parent'' completed

Versions

  • Test logger version: 2.1.0
  • Gradle version: 6.6 RC2
  • Java version: 1.8.0_252

Type of test being run
very simple and failing TestNG unit test:

package xxx;

import static org.assertj.core.api.Assertions.assertThat;

import org.testng.annotations.Test;

public class SomeTest
{
    @Test
    public void test()
    {
        assertThat(false).isTrue();
    }
}

Test logger configuration

None, just the defaults.

Screenshots

$ ./gradlew test
> Task :xxx-test:test FAILED

Gradle suite > Gradle test > xxx.SomeTest > test FAILED
    java.lang.AssertionError at SomeTest.java:14

[...]

42 tests completed, 2 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':xxx-test:test'.
> There were failing tests. See the report at: file:///home/cotto/IdeaProjects/xxx-core/xxx-test/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
251 actionable tasks: 1 executed, 250 up-to-date
@radarsh
Copy link
Owner

radarsh commented Jul 24, 2020

I couldn't reproduce this. It works on a simple TestNG project (not multiproject) that I have inside the repository. I even tried with AssertJ and Gradle 6.6-rc-3.

@C-Otto
Copy link
Author

C-Otto commented Jul 25, 2020

Hm, OK. Thank you! I'll try to come up with a reproducer. My project is a bit strange, I'm sure I can find something weird :)

@radarsh
Copy link
Owner

radarsh commented Jul 25, 2020

No problem. Check if something in your project is changing default log levels. As a test, try to print logger.lifecycle 'Hello' somewhere in the build script and see if it prints.

@C-Otto
Copy link
Author

C-Otto commented Jul 25, 2020

Could you try to add evaluationDependsOnChildren() to the root project? That breaks it for me.

@C-Otto C-Otto changed the title No output at all (Gradle 6.6 RC2) evaluationDependsOnChildren(): No output at all (Gradle 6.6 RC2) Jul 25, 2020
@C-Otto
Copy link
Author

C-Otto commented Jul 25, 2020

Reproducer (with JUnit 5 and Java 14): https://github.com/C-Otto/testlogger

@C-Otto
Copy link
Author

C-Otto commented Aug 11, 2020

Related warning:

> Configure project :
Using method Project.afterEvaluate(Closure) when the project is already evaluated has been deprecated. This will fail with an error in Gradle 7.0. The configuration given is ignored because the project has already been evaluated. To apply this configuration, remove afterEvaluate. Consult the upgrading guide for further information: https://docs.gradle.org/6.6/userguide/upgrading_version_5.html#calling_project_afterevaluate_on_an_evaluated_project_has_been_deprecated
        at testlogger_6qy6vzg4eyui9vw45avhd1oyx.run(/home/cotto/IdeaProjects/xxx/etc/testlogger.gradle:1)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

The specified line is apply plugin: 'com.adarshr.test-logger' and is executed as part of a subprojects block.

@radarsh radarsh added this to the 3.0.0 milestone Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants