Skip to content

Commit

Permalink
Merge pull request #568 from ihostage/header
Browse files Browse the repository at this point in the history
Change copyright
  • Loading branch information
mkurz authored Dec 19, 2022
2 parents a70c912 + 776be9a commit 05de38d
Show file tree
Hide file tree
Showing 106 changed files with 347 additions and 68 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!--- Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> -->

# Twirl

[![Twitter Follow](https://img.shields.io/twitter/follow/playframework?label=follow&style=flat&logo=twitter&color=brightgreen)](https://twitter.com/playframework)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import java.util.Optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import scala.language.implicitConversions
Expand Down
3 changes: 2 additions & 1 deletion api/shared/src/main/scala-2.12/play/twirl/api/package.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl

import scala.reflect.ClassTag
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import java.util.Optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import scala.language.implicitConversions
Expand Down
3 changes: 2 additions & 1 deletion api/shared/src/main/scala-2.13/play/twirl/api/package.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl

import scala.reflect.ClassTag
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import java.util.Optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import scala.language.implicitConversions
Expand Down
3 changes: 2 additions & 1 deletion api/shared/src/main/scala-3/play/twirl/api/package.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl

import scala.reflect.ClassTag
Expand Down
3 changes: 2 additions & 1 deletion api/shared/src/main/scala/play/twirl/api/Content.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import scala.collection.immutable
Expand Down
3 changes: 2 additions & 1 deletion api/shared/src/main/scala/play/twirl/api/Format.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import scala.collection.immutable
Expand Down
3 changes: 2 additions & 1 deletion api/shared/src/main/scala/play/twirl/api/Formats.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import play.twirl.api.utils.StringEscapeUtils
Expand Down
3 changes: 2 additions & 1 deletion api/shared/src/main/scala/play/twirl/api/Template.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

trait Template0[Result] {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api

import scala.language.implicitConversions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api.utils

object StringEscapeUtils {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api.test

import play.twirl.api._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api
package test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.api
package test

Expand Down
9 changes: 8 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

import Dependencies._

import com.typesafe.tools.mima.core.IncompatibleMethTypeProblem
Expand Down Expand Up @@ -50,7 +52,12 @@ lazy val twirl = project
.disablePlugins(MimaPlugin)
.settings(
crossScalaVersions := Nil, // workaround so + uses project-defined variants
publish / skip := true
publish / skip := true,
(Compile / headerSources) ++=
((baseDirectory.value ** ("*.properties" || "*.md" || "*.sbt" || "*.scala.html"))
--- (baseDirectory.value ** "target" ** "*")
--- (baseDirectory.value / "docs" ** "*")).get ++
(baseDirectory.value / "project" ** "*.scala" --- (baseDirectory.value ** "target" ** "*")).get
)
.aggregate(apiJvm, apiJs, parser, compiler, plugin)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.japi.twirl.compiler;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.twirl.compiler

import java.io.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.japi.twirl.compiler;

import static org.junit.Assert.*;
Expand Down
4 changes: 3 additions & 1 deletion compiler/src/test/resources/argImports.scala.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@* header comment *@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@import java.io.File
@import java.net.URL
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/blockWithNestedTuple.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(args: Seq[(String, String)])

@args.zipWithIndex.map { case ((k, v), index) =>
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/blockWithTuple.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(args: Seq[(String, String)])

@args.map { case (k, v) =>
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/callByName.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name: => String)

<h1>Hello @name!</h1>
4 changes: 4 additions & 0 deletions compiler/src/test/resources/elseIf.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(test : Int)

@if(test == 0) {
Expand Down
3 changes: 3 additions & 0 deletions compiler/src/test/resources/error.scala.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

<h1>Hello @world</h1>
4 changes: 4 additions & 0 deletions compiler/src/test/resources/errorInTemplateArgs.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name)

<h1>Hello @name</h1>
4 changes: 4 additions & 0 deletions compiler/src/test/resources/escapebrace.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(maybe: Option[String])
@for(s <- maybe) {
@s: @}
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/existential.scala.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(list: List[_])
@list
4 changes: 4 additions & 0 deletions compiler/src/test/resources/hello.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name:String)

<h1>Hello @name!</h1>@{ <h1>xml</h1> }
4 changes: 4 additions & 0 deletions compiler/src/test/resources/helloNull.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name: String)

<h1>Hello @name!</h1>
7 changes: 4 additions & 3 deletions compiler/src/test/resources/htmlInner.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@*
This is a comment
*@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name:String, items:List[String])(repeat:Int)

<h1>Hello @name</h1>
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/htmlParam.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(content: Html)

Content:
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/ifWithBrackets.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name:String)

@if(name == "twirl") {
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/ifWithoutBrackets.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name:String, surname: String)

@if(name == "twirl") @{if(surname == "play") "twirl-play" else "twirl"}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@(name:String, surname: String)

@main(content: Html) = {
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/importsDefault.scala.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@()
@{"" ?: "foo"}
4 changes: 4 additions & 0 deletions compiler/src/test/resources/inject.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@this(a: String, b: Int)

@(c: String)
Expand Down
4 changes: 3 additions & 1 deletion compiler/src/test/resources/injectComments.scala.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@* Copyright 2016 Lightbend Inc *@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@**
* A template
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/injectNoArgs.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@this()

@(a: String)
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/injectParamGroups.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

@this(a: String)(b: Int)(implicit c: String)

@(d: String)
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/test/resources/long.scala.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@****************************************************************************************************************************************************
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> *
****************************************************************************************************************************************************@

PRIDE AND PREJUDICE

By Jane Austen
Expand Down
Loading

0 comments on commit 05de38d

Please sign in to comment.