This is an automated email from the ASF dual-hosted git repository.
sdelamo pushed a commit to branch static-website
in repository https://gitbox.apache.org/repos/asf/groovy-geb.git
The following commit(s) were added to refs/heads/static-website by this push:
new 1cf394f8 remove readFileContent method
1cf394f8 is described below
commit 1cf394f8f3f4b876b0dfd64ddeb0a4ea19cb5b54
Author: Sergio del Amo <[email protected]>
AuthorDate: Thu Feb 6 11:11:24 2025 +0100
remove readFileContent method
---
buildSrc/src/main/groovy/org/gebish/gradle/ManualsPlugin.groovy | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/buildSrc/src/main/groovy/org/gebish/gradle/ManualsPlugin.groovy
b/buildSrc/src/main/groovy/org/gebish/gradle/ManualsPlugin.groovy
index f0bcca29..033e9854 100644
--- a/buildSrc/src/main/groovy/org/gebish/gradle/ManualsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/gebish/gradle/ManualsPlugin.groovy
@@ -25,9 +25,6 @@ import org.gradle.api.Project
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.WriteProperties
-import java.nio.file.Files
-import java.nio.file.Paths
-
class ManualsPlugin implements Plugin<Project> {
@Override
@@ -75,14 +72,10 @@ class ManualsPlugin implements Plugin<Project> {
.reverse()
.collect { sv -> sv.toString()}
Map<String, String> model = [old: oldManuals, current:
currentVersion, snapshot: snapshot]
- String template =
readFileContent(ext.indexTemplate.asFile.get())
+ String template = ext.indexTemplate.asFile.get().text
String html = new
SimpleTemplateEngine().createTemplate(template).make(model).toString()
destinationFile.get().asFile.text = html
}
}
}
-
- private String readFileContent(File file) {
- return new String(Files.readAllBytes(Paths.get(file.toURI())), "UTF-8")
- }
}