From c38c2e93d1f6bdaeb3995553c609ebb9feb2a6a2 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Tue, 27 Feb 2024 11:53:36 +0100 Subject: [PATCH] Compatibility --- .../play/twirl/sbt/TemplateCompiler.scala | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sbt-twirl/src/main/scala/play/twirl/sbt/TemplateCompiler.scala b/sbt-twirl/src/main/scala/play/twirl/sbt/TemplateCompiler.scala index 467d34ca..4dfb9ed6 100644 --- a/sbt-twirl/src/main/scala/play/twirl/sbt/TemplateCompiler.scala +++ b/sbt-twirl/src/main/scala/play/twirl/sbt/TemplateCompiler.scala @@ -11,6 +11,29 @@ import sbt.internal.inc.LoggedReporter object TemplateCompiler { + def compile( + sourceDirectories: Seq[File], + targetDirectory: File, + templateFormats: Map[String, String], + templateImports: Seq[String], + constructorAnnotations: Seq[String], + includeFilter: FileFilter, + excludeFilter: FileFilter, + codec: Codec, + log: Logger + ): Seq[File] = compile( + sourceDirectories, + targetDirectory, + templateFormats, + templateImports, + constructorAnnotations, + includeFilter, + excludeFilter, + codec, + log, + "2.13.x" // using a dummy scala version (not starting with "3." to generate Scala 2 code by default) + ) + def compile( sourceDirectories: Seq[File], targetDirectory: File,