-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from iaco86/play-2.8
Play 2.8 support
- Loading branch information
Showing
33 changed files
with
89 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...res/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...estFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...TestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...radle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...xtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...k/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Fixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/org/gradle/playframework/tools/internal/twirl/PlayTwirlAdapterV28X.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.gradle.playframework.tools.internal.twirl; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.gradle.playframework.sourcesets.TwirlImports; | ||
|
||
class PlayTwirlAdapterV28X implements VersionedPlayTwirlAdapter { | ||
|
||
// Based on https://github.com/playframework/playframework/blob/2.8.x/dev-mode/build-link/src/main/java/play/TemplateImports.java | ||
private static List<String> defaultTemplateImports = Collections.unmodifiableList( | ||
Arrays.asList( | ||
"models._", | ||
"controllers._", | ||
"play.api.i18n._", | ||
"play.api.templates.PlayMagic._" | ||
)); | ||
|
||
private static final List<String> DEFAULT_JAVA_IMPORTS; | ||
private static final List<String> DEFAULT_SCALA_IMPORTS; | ||
static { | ||
List<String> minimalJavaImports = new ArrayList<String>(); | ||
minimalJavaImports.addAll(defaultTemplateImports); | ||
minimalJavaImports.add("java.lang._"); | ||
minimalJavaImports.add("java.util._"); | ||
minimalJavaImports.add("play.core.j.PlayMagicForJava._"); | ||
minimalJavaImports.add("play.mvc._"); | ||
minimalJavaImports.add("play.api.data.Field"); | ||
|
||
List<String> defaultJavaImports = new ArrayList<String>(); | ||
defaultJavaImports.addAll(minimalJavaImports); | ||
defaultJavaImports.add("play.data._"); | ||
defaultJavaImports.add("play.core.j.PlayFormsMagicForJava._"); | ||
DEFAULT_JAVA_IMPORTS = Collections.unmodifiableList(defaultJavaImports); | ||
|
||
List<String> scalaImports = new ArrayList<String>(); | ||
scalaImports.addAll(defaultTemplateImports); | ||
scalaImports.add("play.api.mvc._"); | ||
scalaImports.add("play.api.data._"); | ||
DEFAULT_SCALA_IMPORTS = Collections.unmodifiableList(scalaImports); | ||
} | ||
|
||
@Override | ||
public List<String> getDefaultImports(TwirlImports language) { | ||
return language == TwirlImports.JAVA ? DEFAULT_JAVA_IMPORTS : DEFAULT_SCALA_IMPORTS; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters