Clean build needed since switching from `compile/testCompile` to `api/testImplementation`

I have an eclipse workspace with several java projects under one gradle parent. One of the projects is a common library used as a dependency in the other ones and since we upgraded gradle and switched from

dependencies {
	compile project(':com.example.common')
	testCompile "junit:junit:4.13.2"
	testCompile project(':com.example.common').sourceSets.test.output
	testRuntime "org.junit.vintage:junit-vintage-engine:5.8.2"
}

to

dependencies {
	api project(':com.example.common')
	testImplementation "junit:junit:4.13.2"
	testImplementation project(':com.example.common').sourceSets.test.output
	testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.8.2"
}

I have to clean build the whole workspace any time I change anything in the common project. Otherwise eclipse doesn’t see the changes and running the main class using the eclipse launch configuration uses some cached classes from somewhere that don’t contain the changes.

Any advice on getting a smoother development environment with similar to the old testCompile behaviour?

It looks like I can avoid the clean build by running the testClasses task only, but this used to not require a gradle task to be run before at all.

Maybe it has to do with <strong dislike on>Eclipse<strong dislike off>,
or with your unsafe access to another projets configuration that you really should not do.

Read Sharing outputs between projects for more information on how to do it properly.
Or maybe you actually want the Java Test Fixtures plugin: Testing in Java & JVM projects