Skip to content

Conversation

@breskeby
Copy link
Contributor

@breskeby breskeby commented May 25, 2020

Removes direct access to compileOnly which is deprecated for direct resolution. (see deprecation warning in build scan https://gradle-enterprise.elastic.co/s/v7ggsljig4i44/deprecations#deprecation-1 )

Fixes #56998

  • registers a resolvable configuration that extends compileOnly for resolution purposes
  • also breaks up the integration tests in the build-tools project in separate sourceSet as discussed with @mark-vieira.
  • leverages the core test fixtures plugin to share test fixtures among multiple sourceSets
  • some minor detangling on task dependencies in ThirdPartyAudit task do get better testability
  • tweak ThirdPartyAuditTaskIT to assert for non expected gradle deprecations

@breskeby breskeby self-assigned this May 25, 2020
@breskeby breskeby marked this pull request as draft May 25, 2020 15:12
@breskeby breskeby force-pushed the fix/thirdparty-audit-task-deprecation branch from 59d6dac to 9ad514e Compare May 25, 2020 17:11
@breskeby breskeby added the Team:Core/Infra Meta label for core/infra team label May 26, 2020
@breskeby breskeby requested a review from mark-vieira May 26, 2020 12:07
@breskeby breskeby marked this pull request as ready for review May 26, 2020 13:47
Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the only thing is I think we can remove the usage of compileOnly in most, if not all cases, no? In reality what we want is either compileClasspath or runtimeClasspath. I think we are mistakenly referencing compileOnly in many cases. In the case where we all, dependencies, that is, everything we compile against and run against, that's were we are concatenating compileOnly with runtime, but could we just as well do compileClasspath + runtimeClasspath to get the same superset? We'd remove the duplicate jars of course to avoid jarHell but isn't that the same result? Then we can ditch any use of compileOnly altogether?

@breskeby
Copy link
Contributor Author

@mark-vieira I didn't want to change to much but we should definitely revisit the usage of compile only. I left it there for now as in the cases here its mainly used to solve use cases like this here explained by @rjernst #56998 (comment)

- this also fixes an issue with having project dependencies in compile only declared being ignored so far
@breskeby breskeby force-pushed the fix/thirdparty-audit-task-deprecation branch from f2c2a85 to 6ee2864 Compare May 27, 2020 08:14
@breskeby breskeby merged commit aed2119 into elastic:master May 27, 2020
@breskeby breskeby deleted the fix/thirdparty-audit-task-deprecation branch May 27, 2020 15:10
breskeby added a commit to breskeby/elasticsearch that referenced this pull request May 28, 2020
breskeby added a commit to breskeby/elasticsearch that referenced this pull request May 28, 2020
breskeby added a commit to breskeby/elasticsearch that referenced this pull request May 28, 2020
@mark-vieira mark-vieira added Team:Delivery Meta label for Delivery team and removed Team:Core/Infra Meta label for core/infra team labels Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v7.7.1 v7.8.1 v7.9.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gradle deprecation warning of compileOnly not being directly resolved is removed

3 participants