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

fix: compileOnly dependencies are not visible to the test compile classpath. #1362

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

autonomousapps
Copy link
Owner

No description provided.

Comment on lines +65 to +70
fun isVisibleToTestSource(usages: Set<Usage>, declarations: Set<Declaration>): Boolean {
return usages.reallyAll { usage ->
VISIBLE_TO_TEST_SOURCE.any { it == usage.bucket }
&& declarations.any { API.matches(it) || IMPL.matches(it) }
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

The fix.

Comment on lines +65 to +70
fun isVisibleToTestSource(usages: Set<Usage>, declarations: Set<Declaration>): Boolean {
return usages.reallyAll { usage ->
VISIBLE_TO_TEST_SOURCE.any { it == usage.bucket }
&& declarations.any { API.matches(it) || IMPL.matches(it) }
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

The fix.

val isMainVisibleDownstream = mainUsages.reallyAll { usage ->
Bucket.VISIBLE_TO_TEST_SOURCE.any { it == usage.bucket }
}
val isMainVisibleDownstream = Bucket.isVisibleToTestSource(mainUsages, mainDeclarations)
Copy link
Owner Author

Choose a reason for hiding this comment

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

The fix.

Base automatically changed from trobalik.gradle-8121 to main January 28, 2025 19:04
Copy link

❌ Test workflow failed:

* Root buildHealth         : https://gradle.com/s/crfpu6bvmqdho
* TestKit buildHealth      : https://gradle.com/s/gfd7sxt63dqn4
* Non-functional tests     : https://gradle.com/s/ulcd36abv5k5w
* TestKit check            : 
* JVM functional tests     : 
* Android functional tests : 

@autonomousapps autonomousapps merged commit 97cb447 into main Jan 28, 2025
1 check passed
@autonomousapps autonomousapps deleted the trobalik.compile-only branch January 28, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant