Reduce what we track as input from createIdeaHomeForTests

Idea writes some logs in that folder and that invalidates the cache.
We only care about build.txt
diff --git a/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/generalTestTask.kt b/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/generalTestTask.kt
index 5aea32a..c69be13 100644
--- a/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/generalTestTask.kt
+++ b/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/generalTestTask.kt
@@ -105,7 +105,10 @@
         evaluationDependsOn(":test-instrumenter")
     }
     return getOrCreateTask<Test>(taskName) {
-        inputs.files(rootProject.tasks.named("createIdeaHomeForTests").map { it.outputs.files }).withPathSensitivity(PathSensitivity.RELATIVE)
+        inputs.file(
+            rootProject.tasks.named("createIdeaHomeForTests")
+                .map { task -> task.outputs.files.singleFile.resolve("build.txt") })
+            .withPathSensitivity(PathSensitivity.RELATIVE).withPathSensitivity(PathSensitivity.RELATIVE)
 
         muteWithDatabase()
         if (jUnitMode == JUnitMode.JUnit4) {
diff --git a/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/test-inputs-check.gradle.kts b/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/test-inputs-check.gradle.kts
index b81c03d..82ed205 100644
--- a/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/test-inputs-check.gradle.kts
+++ b/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/test-inputs-check.gradle.kts
@@ -124,6 +124,11 @@
                         listOf(
                             """permission java.io.FilePermission "${file.absolutePath}", "read,write";""",
                         )
+                    } else if (file.parentFile.name == "ideaHomeForTests") {
+                        listOf(
+                            """permission java.io.FilePermission "${file.parentFile.absolutePath}/-", "read,write";""",
+                            """permission java.io.FilePermission "${file.parentFile.absolutePath}", "read";""",
+                        )
                     } else if (file != null) {
                         val parents = parentsReadPermission(file)
                         listOf(