Skip to content

Conversation

Kennelly57
Copy link

@Kennelly57 Kennelly57 commented Jan 22, 2024

Before this PR

Currently, there is no support for using java-test-fixtures, a core Gradle plugin. When using a test fixture, this plugin will fail. As an example, here is an error message that will be logged:

Couldn't determine scope for dependency: com.h2database:h2:2.2.224

if the build.gradle file is as follows:

dependencies {
    testFixturesApi 'com.h2database:h2'
}

Related Issues

#691
#308

After this PR

==COMMIT_MSG==
Adds support for use with java-test-fixtures, a core Gradle plugin.
==COMMIT_MSG==

A case to check for test sourceSets starting with the word "test" has been added, as suggested in #691 by @carterkozak. I have also included a test case to check that the lock file is properly generated when using the testFixtures plugin.

Possible downsides?

The logic is dead-simple, so it is unlikely to cause unforeseen bugs. However, this now means that the plugin may change some sourceSets from production to test. I imagine that this impact will be small because it is unlikely many people are labelling their production source sets with test as a prefix. If the impact is deemed too high, then I also would be happy just to scan for the prefix 'testFixture'

@palantirtech
Copy link
Member

Thanks for your interest in palantir/gradle-consistent-versions, @Kennelly57! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@changelog-app
Copy link

changelog-app bot commented Jan 22, 2024

Generate changelog in changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Adds support for use with java-test-fixtures, a core Gradle plugin.

Check the box to generate changelog(s)

  • Generate changelog entry

Copy link

stale bot commented Jun 27, 2025

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label Jun 27, 2025
@Kennelly57 Kennelly57 closed this Jul 10, 2025
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 this pull request may close these issues.

2 participants