It is just funny talk, hope it does not disturbing.
I saw my colleague used a feature of Gradle, called
java-test-fixtures. Then I got wondered, “What is a test fixture”. After checking the code of
JavaTestFixturesPlugin. I found that
test fixture is nothing, but anthoer name for
testImplementation (May I am wrong, since my knowledge about it is poor). It just added another java sourceSet, which performed same as what
Acctually, I am kind of got the idea, that it might want to create a specific way to publish a test library. But still, it just did get away from my mind, “Why there is a
java-test-fixtures feature, even that we already can import test depedencies from
I checked gradle document, the part about test fixture: Testing in Java & JVM projects. Also I read the article from baeldung https://www.baeldung.com/gradle-6-features. It seems, they are talking the same thing like what I found.
Same, I did can get the idea of source sets of
protobuf etc. And even not doubt it for any second. Maybe it just becuase there is already have a way to publish test sources. Or there is a thought in my mind, people should not mix up any module’s responsibility. Which means, if you are a module for bussiness, then you should not try to do utility’s work. Therefore, I did seprating my code with different responsibility, in a strict way.
So, I got here, want to disscus with you guys about it. Hope that anyone could inspire me and tell my that “your thought is dangerous, haha”