@@ -7,31 +7,6 @@ import java.io.File
77import java.io.InputStream
88import java.nio.file.Files.createTempDirectory
99
10- /* *
11- * Defines how file/directory properties are referenced in Gradle build scripts.
12- * - STRING: Uses .absolutePath (e.g., file("spec.yaml").absolutePath)
13- * - FILE: Uses direct file() reference (e.g., file("spec.yaml"))
14- *
15- * Note: File format tests only run with the newest Gradle version (8.7) for performance.
16- * All properties in a single test use the same format (no mixing).
17- */
18- enum class PropertyFormat {
19- STRING ,
20- FILE
21- }
22-
23- /* *
24- * Converts a file path to a Gradle property reference based on format.
25- * @param format The property format to use
26- * @return Formatted property value (either file("path").absolutePath or file("path"))
27- */
28- fun String.toPropertyReference (format : PropertyFormat ): String {
29- return when (format) {
30- PropertyFormat .STRING -> """ file("$this ").absolutePath"""
31- PropertyFormat .FILE -> """ file("$this ")"""
32- }
33- }
34-
3510abstract class TestBase {
3611 protected open lateinit var temp: File
3712
@@ -74,4 +49,29 @@ abstract class TestBase {
7449 .forwardOutput()
7550 .apply (configure)
7651 .build()!!
52+ }
53+
54+ /* *
55+ * Defines how file/directory properties are referenced in Gradle build scripts.
56+ * - STRING: Uses .absolutePath (e.g., file("spec.yaml").absolutePath)
57+ * - FILE: Uses direct file() reference (e.g., file("spec.yaml"))
58+ *
59+ * Note: File format tests only run with the newest Gradle version (8.7) for performance.
60+ * All properties in a single test use the same format (no mixing).
61+ */
62+ enum class PropertyFormat {
63+ STRING ,
64+ FILE
65+ }
66+
67+ /* *
68+ * Converts a file path to a Gradle property reference based on format.
69+ * @param format The property format to use
70+ * @return Formatted property value (either file("path").absolutePath or file("path"))
71+ */
72+ fun String.toPropertyReference (format : PropertyFormat ): String {
73+ return when (format) {
74+ PropertyFormat .STRING -> """ file("$this ").absolutePath"""
75+ PropertyFormat .FILE -> """ file("$this ")"""
76+ }
7777}
0 commit comments