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

Mark test resources as test resources in IntelliJ #1134

Merged
merged 2 commits into from
Dec 19, 2019

Conversation

pkoenig10
Copy link
Member

@pkoenig10 pkoenig10 commented Dec 19, 2019

Before this PR

Test resources are marked as source resources in IntelliJ.

This logic from #156 is not correct because resource source folders do not have a isTestSource attribute.

The IDEA plugin added support for resources in gradle/gradle#3724, which was first released in Gradle 4.7.0.

After this PR

Test resources are marked as test resources in IntelliJ.

I've verified the behavior using publishToMavenLocal.

Before:

<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-resource"/>

After:

<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource"/>

@changelog-app
Copy link

changelog-app bot commented Dec 19, 2019

Generate changelog in changelog/@unreleased

Type

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

Description

The baseline-idea plugin now correctly marks test resources as test resources in IntelliJ.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from CRogers December 19, 2019 20:48
@ferozco
Copy link
Contributor

ferozco commented Dec 19, 2019

👍

@bulldozer-bot bulldozer-bot bot merged commit 9b39d97 into develop Dec 19, 2019
@bulldozer-bot bulldozer-bot bot deleted the pkoenig10/testResources branch December 19, 2019 21:21
@svc-autorelease
Copy link
Collaborator

Released 2.45.1

This was referenced Dec 19, 2019
@dansanduleac
Copy link
Contributor

dansanduleac commented Jan 7, 2020

I think this might have been the cause of my woes with importing from intellij where it thinks test source set modules have both a production and a test output, causing an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants