Hacker News new | ask | show | jobs
by rileymichael 360 days ago
this is what we do internally at $dayJob. the gradle java-test-fixtures plugin (https://docs.gradle.org/current/userguide/java_testing.html#...) creates a dedicated source set and wires up artifact publishing with a `test-fixtures` classifier. consuming a libraries fixtures is as simple as:

    // pull in some-library
    implementation("some-library-coordinates")
    
    // use its provided fixtures in tests
    testImplementation(testFixtures("some-library-coordinates"))
wish it was more common in the ecosystem, but it seems most folks aren't aware of it.