Eclipse (2023-12) + Buildship - Incorrect classpath when importing test utils from project library

In order to expose test classes to dependent projects, you have to append this to your build.gradle of Lib2:

eclipse {
    classpath {
        containsTestFixtures = true
    }
}

After a refresh the property without test code for the dependency from Lib3 to Lib2 should disappear.

Unfortunately, the other property Visible only for test sources requires an ugly workaround in build.gradle of Lib3:

eclipse {
    classpath {
        file {
            whenMerged {
                entries.findAll { it.path == '/Lib2' }.each { it.entryAttributes['test'] = 'false' }
            }
        }
    }
}

See also EclipseClasspath in the DSL reference.