Use testSources and testResources on the IDEA module

MSAL

IdeaModule.testSourceDirs and testResourceDirs are deprecated and removed in Gradle 9, where using them fails. testSources and testResources are file collections, so adding becomes from(..) and replacing becomes setFrom(..). Only writes inside idea { module { } } or through idea.module change. Reads are left alone, as is any assignment that uses the old value other than by adding to it. See the Gradle upgrade guide for more information.

org.openrewrite.gradle.migrate.idea.UseIdeaModuleTestSources
mod run . --recipe=org.openrewrite.gradle.migrate.idea.UseIdeaModuleTestSources

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.