From f9ef5b5d7f45ea8fb6646219e54dbcf8beed47ce Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Wed, 9 Sep 2020 23:16:40 -0500 Subject: [PATCH 01/51] use single threaded build for better debugging Signed-off-by: Cosmin Stroe --- .../main/kotlin/org/gradle/playframework/TestSetupPlugin.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt index da6282e3..418b03e2 100644 --- a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt +++ b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt @@ -22,6 +22,7 @@ class TestSetupPlugin : Plugin { private fun determineMaxParallelForks(): Int { - return if ((Runtime.getRuntime().availableProcessors() / 2) < 1) 1 else (Runtime.getRuntime().availableProcessors() / 2) + //return if ((Runtime.getRuntime().availableProcessors() / 2) < 1) 1 else (Runtime.getRuntime().availableProcessors() / 2) + return 1 } } From 76ae0b95b7fa2a6356e7c4ad2e54bd0b05c28522 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Wed, 9 Sep 2020 23:37:48 -0500 Subject: [PATCH 02/51] fix ktlint error Signed-off-by: Cosmin Stroe --- .../src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt index 418b03e2..9e611f91 100644 --- a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt +++ b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt @@ -22,7 +22,7 @@ class TestSetupPlugin : Plugin { private fun determineMaxParallelForks(): Int { - //return if ((Runtime.getRuntime().availableProcessors() / 2) < 1) 1 else (Runtime.getRuntime().availableProcessors() / 2) + // return if ((Runtime.getRuntime().availableProcessors() / 2) < 1) 1 else (Runtime.getRuntime().availableProcessors() / 2) return 1 } } From 924597f339e3421d028cb8c2bbf65ba175f48c0a Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Wed, 9 Sep 2020 23:55:20 -0500 Subject: [PATCH 03/51] add detailed logging when running on TravisCI Signed-off-by: Cosmin Stroe --- .../kotlin/org/gradle/playframework/TestSetupPlugin.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt index 9e611f91..8707374b 100644 --- a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt +++ b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt @@ -3,6 +3,7 @@ package org.gradle.playframework import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.tasks.testing.Test +import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.kotlin.dsl.withType @@ -11,8 +12,13 @@ class TestSetupPlugin : Plugin { tasks.withType().configureEach { // Log test execution so that Travis CI doesn't time out if (System.getenv("CI") != null) { + // Enable detailed logging when running in Travis CI, + // so that we can understand why a build failed + // From: https://stackoverflow.com/a/47458666 testLogging { - events("started") + events("started", "passed", "skipped", "failed") + showStackTraces = true + exceptionFormat = TestExceptionFormat.FULL } } From 5a7531524853f6c28d951e983bfcd43496cfb29f Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Thu, 10 Sep 2020 01:11:32 -0500 Subject: [PATCH 04/51] fix tests by skipping version 2.3.x of Play for certain tests Signed-off-by: Cosmin Stroe --- .../tasks/AbstractRoutesCompileIntegrationTest.groovy | 11 +++++++++++ .../tasks/Play24RoutesCompileIntegrationTest.groovy | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy index 87a6d4f0..29f1f03f 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy @@ -4,6 +4,7 @@ import org.gradle.playframework.PlayMultiVersionIntegrationTest import org.gradle.testkit.runner.BuildResult import org.gradle.testkit.runner.TaskOutcome import org.gradle.util.VersionNumber +import org.junit.Assume import static org.gradle.playframework.fixtures.Repositories.playRepositories import static org.gradle.playframework.fixtures.file.FileFixtures.assertContentsHaveChangedSince @@ -81,6 +82,8 @@ object Application extends Controller { } def "can run RoutesCompile"() { + // Play version 2.3 not supported + Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) given: withRoutesTemplate() expect: @@ -92,6 +95,8 @@ object Application extends Controller { } def "recompiles on changed routes file input"() { + // Play version 2.3 not supported + Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) given: File templateFile = withRoutesTemplate() build(ROUTES_COMPILE_TASK_NAME) @@ -143,6 +148,8 @@ GET /newroute ${controllers()}.Application.index() } def "compiles additional routes file and cleans up output on removal"() { + // Play version 2.3 does not support injected routers + Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) when: withRoutesTemplate() then: @@ -173,6 +180,8 @@ GET /newroute ${controllers()}.Application.index() } def "can run RoutesCompile with namespaceReverseRouter set"() { + // Play version 2.3 not supported + Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) given: withRoutesTemplate("org.gradle.test") buildFile << """ @@ -242,6 +251,8 @@ GET / ${controllers()}${packageId}.Application.inde } def "can add additional imports"() { + // Play version 2.3 not supported + Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) given: withRoutesTemplate() and: diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy index 30b88cda..39da0910 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy @@ -31,6 +31,12 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio } def "can specify route compiler type as injected"() { + // Play version 2.3 does not support injected routers + Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) + // Play before version 2.6 does not support Java 1.9+ + if (playVersion.compareTo(VersionNumber.parse("2.6")) < 0) { + Assume.assumeTrue(System.getProperty("java.version").startsWith("1.8")) + } given: withRoutesTemplate() withInjectedRoutesController() @@ -48,6 +54,8 @@ play { } def "recompiles when route compiler type is changed"() { + // Play version 2.3 not supported + Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) // Play 2.7+ only has a single route compiler type. Assume.assumeTrue(playVersion < VersionNumber.parse("2.7")) when: From 1c341e663910d3b6743c25c425c01c41b22043b8 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Thu, 10 Sep 2020 20:06:43 -0500 Subject: [PATCH 05/51] fix assertions for version 2.3 Signed-off-by: Cosmin Stroe --- ...layApplicationPluginIntegrationTest.groovy | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/integTest/groovy/org/gradle/playframework/application/PlayApplicationPluginIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/application/PlayApplicationPluginIntegrationTest.groovy index 79321f81..f65f2c78 100644 --- a/src/integTest/groovy/org/gradle/playframework/application/PlayApplicationPluginIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/application/PlayApplicationPluginIntegrationTest.groovy @@ -52,13 +52,23 @@ abstract class PlayApplicationPluginIntegrationTest extends PlayMultiVersionAppl } void verifyJars() { - jar("build/libs/${playApp.name}.jar").containsDescendants( - 'router/Routes.class', - 'views/html/index.class', - 'views/html/main.class', - 'controllers/Application.class', - 'application.conf', - 'logback.xml') + if (playVersion.major == 2 && playVersion.minor == 3) { + jar("build/libs/${playApp.name}.jar").containsDescendants( + 'Routes.class', + 'views/html/index.class', + 'views/html/main.class', + 'controllers/Application.class', + 'application.conf', + 'logback.xml') + } else { + jar("build/libs/${playApp.name}.jar").containsDescendants( + 'router/Routes.class', + 'views/html/index.class', + 'views/html/main.class', + 'controllers/Application.class', + 'application.conf', + 'logback.xml') + } jar("build/libs/${playApp.name}-assets.jar").containsDescendants( 'public/images/favicon.svg', 'public/stylesheets/main.css', From 0ecc385184d4008d8860fdcee76fb54005640a28 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Thu, 10 Sep 2020 23:12:21 -0500 Subject: [PATCH 06/51] Play 2.7 no longer works with static methods Signed-off-by: Cosmin Stroe --- .../app/advancedplayapp/app/controllers/jva/PureJava.java | 2 +- .../app/advancedplayapp/app/controllers/scla/MixedJava.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java index 5d3e89a2..e9b26e74 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java @@ -21,7 +21,7 @@ public class PureJava extends Controller { - public static Result index() { + public Result index() { return ok(index.render("Your new application is ready.")); } diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java index f4d9e7dc..7a931080 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java @@ -22,7 +22,7 @@ public class MixedJava extends Controller { - public static Result index() { + public Result index() { System.out.println(new models.ScalaClass("Java can also reference Scala files")); return ok(index.render("Your new mixed application is ready.")); } From 540664d18e60c4e3c08ee97478d99fdb63eac1b0 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:26:26 -0500 Subject: [PATCH 07/51] tests generate correct files for all supported Play versions Signed-off-by: Cosmin Stroe --- build.gradle.kts | 1 + .../playframework/fixtures/app/PlayApp.groovy | 66 +++++++++++++------ .../fixtures/app/SourceFile.groovy | 5 ++ ...pplication.scala => Application.scala.ftl} | 19 ++++++ .../app/controllers/Application.scala.old | 35 ---------- .../jva/{PureJava.java => PureJava.java.ftl} | 4 ++ .../{MixedJava.java => MixedJava.java.ftl} | 4 ++ ...pplication.scala => Application.scala.ftl} | 11 ++++ .../special/strangename/Application.scala.old | 24 ------- .../{build.gradle => build.gradle.ftl} | 2 + .../app/advancedplayapp/build.gradle.old | 15 ----- .../fixtures/app/advancedplayapp/conf/routes | 10 --- .../app/advancedplayapp/conf/routes.ftl | 25 +++++++ .../app/advancedplayapp/conf/routes.old | 10 --- .../app/advancedplayapp/conf/scala.routes | 2 - .../app/advancedplayapp/conf/scala.routes.ftl | 9 +++ .../app/advancedplayapp/conf/scala.routes.old | 2 - 17 files changed, 126 insertions(+), 118 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/{Application.scala => Application.scala.ftl} (71%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala.old rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/{PureJava.java => PureJava.java.ftl} (91%) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/{MixedJava.java => MixedJava.java.ftl} (92%) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/{Application.scala => Application.scala.ftl} (78%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.old rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/{build.gradle => build.gradle.ftl} (88%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.old delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes create mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.old delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes create mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.old diff --git a/build.gradle.kts b/build.gradle.kts index ef89b4e5..ba279743 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,6 +25,7 @@ dependencies { integTestFixturesImplementation("com.google.guava:guava:23.0") integTestFixturesImplementation("org.hamcrest:hamcrest-library:1.3") integTestFixturesImplementation("org.apache.ant:ant:1.9.3") + integTestFixturesImplementation("org.freemarker:freemarker:2.3.30") docTestImplementation("org.gradle:sample-check:0.7.0") docTestRuntimeOnly("org.slf4j:slf4j-simple:1.7.16") } diff --git a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy index 1456e810..b5c25509 100644 --- a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy +++ b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy @@ -16,38 +16,59 @@ package org.gradle.playframework.fixtures.app +import freemarker.cache.ClassTemplateLoader +import freemarker.template.Configuration +import freemarker.template.Template +import freemarker.template.TemplateExceptionHandler +import org.gradle.playframework.extensions.PlayPlatform import org.gradle.util.RelativePathUtil import org.gradle.util.VersionNumber import static org.gradle.playframework.fixtures.Repositories.playRepositories abstract class PlayApp { - boolean oldVersion + final VersionNumber playVersion + final Configuration cfg + final Map model PlayApp() { + this(VersionNumber.parse(PlayPlatform.DEFAULT_PLAY_VERSION)) } PlayApp(VersionNumber version) { - this.oldVersion = version < VersionNumber.parse('2.6.0') + playVersion = version + cfg = new Configuration(Configuration.VERSION_2_3_29) + cfg.setTemplateLoader(new ClassTemplateLoader()) + cfg.setDefaultEncoding("UTF-8") + cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER) + cfg.setLogTemplateExceptions(false) + cfg.setWrapUncheckedExceptions(true) + cfg.setFallbackOnNullLoopVariable(false) + model = new HashMap<>() + model.put("playVersion", playVersion.major + "." + playVersion.minor) } String getName() { getClass().getSimpleName().toLowerCase() } + String getResourcePath(String relativePath) { + String basePath = this.getClass().getCanonicalName().split("\\.").dropRight(1).join("/") + return basePath + "/" + getName() + "/" + relativePath + } + List getAllFiles() { return appSources + testSources + viewSources + assetSources + confSources + otherSources } SourceFile getGradleBuild() { - def buildFileName = oldVersion ? "build.gradle.old" : "build.gradle" - def gradleBuild = sourceFile("", buildFileName) - def gradleBuildWithRepositories = gradleBuild.content.concat """ + String gradleBuildContent = renderTemplate(getResourcePath("build.gradle.ftl")) + def gradleBuildWithRepositories = gradleBuildContent.concat """ allprojects { ${playRepositories()} } """ - return new SourceFile(gradleBuild.path, "build.gradle", gradleBuildWithRepositories) + return new SourceFile("", "build.gradle", gradleBuildWithRepositories) } List getAssetSources() { @@ -90,10 +111,15 @@ abstract class PlayApp { } } + /** + * Generate a list of source files for this app, based on existing files + * in the project. + */ List sourceFiles(String baseDir, String rootDir = getName()) { List sourceFiles = new ArrayList() - URL resource = getClass().getResource("$rootDir/$baseDir") + String resourcePath = "$rootDir/$baseDir" + URL resource = getClass().getResource(resourcePath) if(resource != null){ File baseDirFile = new File(resource.toURI()) baseDirFile.eachFileRecurse { File source -> @@ -103,16 +129,13 @@ abstract class PlayApp { def subpath = RelativePathUtil.relativePath(baseDirFile, source.parentFile) - if(oldVersion) { - if(isOldVersionFile(source)) { - sourceFiles.add(new SourceFile("$baseDir/$subpath", source.name[0..<-4], source.text)) - } else if (!oldVersionFileExists(source)) { - sourceFiles.add(new SourceFile("$baseDir/$subpath", source.name, source.text)) - } + if(isTemplate(source)) { + String content = renderTemplate(getResourcePath(baseDir + "/" + subpath + "/" + source.name)) + SourceFile file = new SourceFile("$baseDir/$subpath", source.name[0..<-4], content) + sourceFiles.add(file) } else { - if(!isOldVersionFile(source)) { - sourceFiles.add(new SourceFile("$baseDir/$subpath", source.name, source.text)) - } + SourceFile file = new SourceFile("$baseDir/$subpath", source.name, source.text) + sourceFiles.add(file) } } } @@ -120,11 +143,14 @@ abstract class PlayApp { return sourceFiles } - static boolean isOldVersionFile(File file) { - return file.name.endsWith('.old') + static boolean isTemplate(File file) { + return file.name.endsWith('.ftl') } - static boolean oldVersionFileExists(File file) { - return new File(file.parentFile, "${file.name}.old").exists() + String renderTemplate(String templatePath) { + Template tmpl = cfg.getTemplate(templatePath) + StringWriter sw = new StringWriter() + tmpl.process(model, sw) + return sw.toString() } } diff --git a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/SourceFile.groovy b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/SourceFile.groovy index c6bb39a6..1e57f49a 100644 --- a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/SourceFile.groovy +++ b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/SourceFile.groovy @@ -49,4 +49,9 @@ class SourceFile { } file.write(content) } + + @Override + String toString() { + return path + File.separator + name + } } diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala.ftl similarity index 71% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala.ftl index df0a3507..3d757f70 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala.ftl @@ -16,6 +16,7 @@ package controllers +<#if playVersion == "2.7" || playVersion == "2.6"> import javax.inject._ import play.api._ import play.api.mvc._ @@ -34,3 +35,21 @@ class Application @Inject() extends InjectedController { Ok("shutdown") } } +<#else> +import play.api._ +import play.api.mvc._ +import models._ + +object Application extends Controller { + def index = Action { + Ok(views.html.index("Your new application is ready.")) + } + def root = Action { + Ok(views.html.awesome.index(java.util.Arrays.asList(new DataType("bar", 2)))) + } + def shutdown = Action { + System.exit(0) + Ok("shutdown") + } +} + diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala.old deleted file mode 100644 index 12506bb1..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/Application.scala.old +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2014 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package controllers - - -import play.api._ -import play.api.mvc._ -import models._ - -object Application extends Controller { - def index = Action { - Ok(views.html.index("Your new application is ready.")) - } - def root = Action { - Ok(views.html.awesome.index(java.util.Arrays.asList(new DataType("bar", 2)))) - } - def shutdown = Action { - System.exit(0) - Ok("shutdown") - } -} \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java.ftl similarity index 91% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java.ftl index e9b26e74..fa02fed1 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/jva/PureJava.java.ftl @@ -21,7 +21,11 @@ public class PureJava extends Controller { +<#if playVersion == "2.7"> public Result index() { +<#else> + public static Result index() { + return ok(index.render("Your new application is ready.")); } diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java.ftl similarity index 92% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java.ftl index 7a931080..38dae35c 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/controllers/scla/MixedJava.java.ftl @@ -22,7 +22,11 @@ public class MixedJava extends Controller { +<#if playVersion == "2.7"> public Result index() { +<#else> + public static Result index() { + System.out.println(new models.ScalaClass("Java can also reference Scala files")); return ok(index.render("Your new mixed application is ready.")); } diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl similarity index 78% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl index 5bfda207..5a9dfda9 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl @@ -15,6 +15,8 @@ */ package special.strangename + +<#if playVersion == "2.7" || playVersion == "2.6"> import javax.inject._ import play.api._ import play.api.mvc._ @@ -25,3 +27,12 @@ class Application @Inject() extends InjectedController { Ok(views.html.index("Your new application is ready.")) } } +<#else> +import play.api._ +import play.api.mvc._ +object Application extends Controller { + def index = Action { + Ok(views.html.index("Your new application is ready.")) + } +} + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.old deleted file mode 100644 index 06077252..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.old +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package special.strangename -import play.api._ -import play.api.mvc._ -object Application extends Controller { - def index = Action { - Ok(views.html.index("Your new application is ready.")) - } -} \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl similarity index 88% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl index fa5fc707..506fcb35 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl @@ -14,7 +14,9 @@ sourceSets { } } +<#if playVersion == "2.7" || playVersion == "2.6"> dependencies { implementation "com.typesafe.play:play-guice_2.12:2.6.15" implementation "ch.qos.logback:logback-classic:1.2.3" } + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.old deleted file mode 100644 index 094ee193..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.old +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id 'org.gradle.playframework' -} - -// repositories added in PlayApp class - -sourceSets { - main { - twirl { - defaultImports = org.gradle.playframework.sourcesets.TwirlImports.JAVA - srcDir "templates" - include "jva/**/*" - } - } -} diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes deleted file mode 100644 index 078bf728..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes +++ /dev/null @@ -1,10 +0,0 @@ -# Routes -GET / @controllers.Application.index -GET /root @controllers.Application.root -GET /shutdown @controllers.Application.shutdown - --> /scala scala.Routes --> /java jva.Routes - -# Map static resources from the /public folder to the /assets URL path -GET /assets/*file @controllers.Assets.at(path="/public", file) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl new file mode 100644 index 00000000..474dc78e --- /dev/null +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl @@ -0,0 +1,25 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> +# Routes +GET / @controllers.Application.index +GET /root @controllers.Application.root +GET /shutdown @controllers.Application.shutdown + +-> /scala scala.Routes +-> /java jva.Routes + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file @controllers.Assets.at(path="/public", file) + +<#else> +# Routes +GET / controllers.Application.index +GET /root controllers.Application.root +GET /shutdown controllers.Application.shutdown + +-> /scala scala.Routes +-> /java jva.Routes + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file controllers.Assets.at(path="/public", file) + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.old deleted file mode 100644 index d63c4f3f..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.old +++ /dev/null @@ -1,10 +0,0 @@ -# Routes -GET / controllers.Application.index -GET /root controllers.Application.root -GET /shutdown controllers.Application.shutdown - --> /scala scala.Routes --> /java jva.Routes - -# Map static resources from the /public folder to the /assets URL path -GET /assets/*file controllers.Assets.at(path="/public", file) \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes deleted file mode 100644 index 36db0de8..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes +++ /dev/null @@ -1,2 +0,0 @@ -GET /one controllers.scla.MixedJava.index -POST /two @special.strangename.Application.index diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl new file mode 100644 index 00000000..6a0c36d0 --- /dev/null +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl @@ -0,0 +1,9 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> +GET /one controllers.scla.MixedJava.index +POST /two @special.strangename.Application.index + +<#else> +GET /one controllers.scla.MixedJava.index +POST /two special.strangename.Application.index + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.old deleted file mode 100644 index 9681abfb..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.old +++ /dev/null @@ -1,2 +0,0 @@ -GET /one controllers.scla.MixedJava.index -POST /two special.strangename.Application.index From 16f977c652244f459345b57a6d61236692a13cac Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:31:48 -0500 Subject: [PATCH 08/51] convert Application.scala into template Signed-off-by: Cosmin Stroe --- ...pplication.scala => Application.scala.ftl} | 18 ++++++++++ .../app/controllers/Application.scala.old | 33 ------------------- 2 files changed, 18 insertions(+), 33 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/{Application.scala => Application.scala.ftl} (73%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl similarity index 73% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl index a5ea459f..41e2121a 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl @@ -16,6 +16,7 @@ package controllers +<#if playVersion == "2.7" || playVersion == "2.6"> import javax.inject._ import com.google.common.base.Strings import play.api._ @@ -33,3 +34,20 @@ class Application @Inject() extends InjectedController { Ok("shutdown") } } +<#else> +import com.google.common.base.Strings +import play.api._ +import play.api.mvc._ + +object Application extends Controller { + + def index = Action { + Ok(views.html.index(Strings.nullToEmpty("Your new application is ready."))) + } + + def shutdown = Action { + System.exit(0) + Ok("shutdown") + } +} +<#/if> \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.old deleted file mode 100644 index b984a170..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.old +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2014 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package controllers - -import com.google.common.base.Strings -import play.api._ -import play.api.mvc._ - -object Application extends Controller { - - def index = Action { - Ok(views.html.index(Strings.nullToEmpty("Your new application is ready."))) - } - - def shutdown = Action { - System.exit(0) - Ok("shutdown") - } -} \ No newline at end of file From 86c16b6888d4333f8e08675b6604fd61648ab110 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:33:46 -0500 Subject: [PATCH 09/51] convert routes to template Signed-off-by: Cosmin Stroe --- .../app/playappwithdependencies/conf/routes | 9 -------- .../playappwithdependencies/conf/routes.ftl | 21 +++++++++++++++++++ .../playappwithdependencies/conf/routes.old | 9 -------- 3 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes create mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes deleted file mode 100644 index 1d2ec1b4..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes +++ /dev/null @@ -1,9 +0,0 @@ -# Routes -# Home page -GET / @controllers.Application.index - -GET /shutdown @controllers.Application.shutdown - -# Map static resources from the /public folder to the /assets URL path -GET /assets/*file @controllers.Assets.at(path="/public", file) - diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl new file mode 100644 index 00000000..3dc1a537 --- /dev/null +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl @@ -0,0 +1,21 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> +# Routes +# Home page +GET / @controllers.Application.index + +GET /shutdown @controllers.Application.shutdown + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file @controllers.Assets.at(path="/public", file) + +<#else> +# Routes +# Home page +GET / controllers.Application.index + +GET /shutdown controllers.Application.shutdown + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file controllers.Assets.at(path="/public", file) + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.old deleted file mode 100644 index 784cdbe5..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.old +++ /dev/null @@ -1,9 +0,0 @@ -# Routes -# Home page -GET / controllers.Application.index - -GET /shutdown controllers.Application.shutdown - -# Map static resources from the /public folder to the /assets URL path -GET /assets/*file controllers.Assets.at(path="/public", file) - From e8bcfd224fd3244fbf4db9dcda4984b47457b1bf Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:35:39 -0500 Subject: [PATCH 10/51] convert build.gradle into template Signed-off-by: Cosmin Stroe --- .../{build.gradle => build.gradle.ftl} | 15 +++++++++++++++ .../app/playappwithdependencies/build.gradle.old | 10 ---------- 2 files changed, 15 insertions(+), 10 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/{build.gradle => build.gradle.ftl} (54%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl similarity index 54% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl index fb323b75..5876d491 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl @@ -1,3 +1,4 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> plugins { id 'org.gradle.playframework' } @@ -10,3 +11,17 @@ dependencies { } // repositories added in PlayApp class + +<#else> +plugins { + id 'org.gradle.playframework' +} + +dependencies { + implementation "com.google.guava:guava:17.0" + testImplementation "commons-lang:commons-lang:2.6" +} + +// repositories added in PlayApp class + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.old deleted file mode 100644 index 52731a42..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.old +++ /dev/null @@ -1,10 +0,0 @@ -plugins { - id 'org.gradle.playframework' -} - -dependencies { - implementation "com.google.guava:guava:17.0" - testImplementation "commons-lang:commons-lang:2.6" -} - -// repositories added in PlayApp class From e258c4f8dde66e0005fa0cc0b5110e0ee9cd3714 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:37:54 -0500 Subject: [PATCH 11/51] convert Application.scala into template Signed-off-by: Cosmin Stroe --- ...pplication.scala => Application.scala.ftl} | 19 +++++++++++ .../app/controllers/Application.scala.old | 32 ------------------- 2 files changed, 19 insertions(+), 32 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/{Application.scala => Application.scala.ftl} (75%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl similarity index 75% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl index 401adbf6..facf679b 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl @@ -16,6 +16,7 @@ package controllers +<#if playVersion == "2.7" || playVersion == "2.6"> import javax.inject._ import play.api._ import play.api.mvc._ @@ -32,3 +33,21 @@ class Application @Inject() extends InjectedController { Ok("shutdown") } } + +<#else> +import play.api._ +import play.api.mvc._ + +object Application extends Controller { + + def index = Action { + Ok(views.html.index("Your new application is ready.")) + } + + def shutdown = Action { + System.exit(0) + Ok("shutdown") + } +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.old deleted file mode 100644 index 0d6bc74e..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.old +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package controllers - -import play.api._ -import play.api.mvc._ - -object Application extends Controller { - - def index = Action { - Ok(views.html.index("Your new application is ready.")) - } - - def shutdown = Action { - System.exit(0) - Ok("shutdown") - } -} \ No newline at end of file From 7109080b5401800c4f66699331f59f3351f2aa0d Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:40:00 -0500 Subject: [PATCH 12/51] convert Application.scala to template Signed-off-by: Cosmin Stroe --- ...pplication.scala => Application.scala.ftl} | 21 +++++++++++++++++++ .../app/controllers/Application.scala.old | 18 ---------------- 2 files changed, 21 insertions(+), 18 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/{Application.scala => Application.scala.ftl} (51%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl similarity index 51% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl index 427a93be..c1ae548e 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl @@ -1,5 +1,6 @@ package controllers +<#if playVersion == "2.7" || playVersion == "2.6"> import javax.inject._ import play.api._ import play.api.mvc._ @@ -18,3 +19,23 @@ class Application @Inject() extends InjectedController { Ok("shutdown") } } + +<#else> +import play.api._ +import play.api.mvc._ + +import org.test.Util + +object Application extends Controller { + + def index = Action { + Ok(Util.fullStop("Your new application is ready")) + } + + def shutdown = Action { + System.exit(0) + Ok("shutdown") + } +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.old deleted file mode 100644 index f3124eb1..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.old +++ /dev/null @@ -1,18 +0,0 @@ -package controllers - -import play.api._ -import play.api.mvc._ - -import org.test.Util - -object Application extends Controller { - - def index = Action { - Ok(Util.fullStop("Your new application is ready")) - } - - def shutdown = Action { - System.exit(0) - Ok("shutdown") - } -} \ No newline at end of file From 78fbb3fd923501c53d97448160d10abb1bd98ef5 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:41:33 -0500 Subject: [PATCH 13/51] convert Application.scala to template Signed-off-by: Cosmin Stroe --- .../{Application.scala => Application.scala.ftl} | 14 ++++++++++++++ .../controllers/submodule/Application.scala.old | 12 ------------ 2 files changed, 14 insertions(+), 12 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/{Application.scala => Application.scala.ftl} (51%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl similarity index 51% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl index 3328b4b4..34f59a39 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl @@ -1,5 +1,6 @@ package controllers.submodule +<#if playVersion == "2.7" || playVersion == "2.6"> import javax.inject._ import play.api._ import play.api.mvc._ @@ -12,3 +13,16 @@ class Application @Inject() extends InjectedController { } } +<#else> +import play.api._ +import play.api.mvc._ + +object Application extends Controller { + + def index = Action { + Ok("Submodule page") + } + +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.old deleted file mode 100644 index 5a0a6a4d..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.old +++ /dev/null @@ -1,12 +0,0 @@ -package controllers.submodule - -import play.api._ -import play.api.mvc._ - -object Application extends Controller { - - def index = Action { - Ok("Submodule page") - } - -} \ No newline at end of file From 3c7aa5964c79713108ccb743c416383e58e1fd3d Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:42:38 -0500 Subject: [PATCH 14/51] convert Application.scala to template Signed-off-by: Cosmin Stroe --- ...pplication.scala => Application.scala.ftl} | 21 +++++++++++++++++++ .../app/controllers/Application.scala.old | 18 ---------------- 2 files changed, 21 insertions(+), 18 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/{Application.scala => Application.scala.ftl} (51%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl similarity index 51% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl index 427a93be..c1ae548e 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl @@ -1,5 +1,6 @@ package controllers +<#if playVersion == "2.7" || playVersion == "2.6"> import javax.inject._ import play.api._ import play.api.mvc._ @@ -18,3 +19,23 @@ class Application @Inject() extends InjectedController { Ok("shutdown") } } + +<#else> +import play.api._ +import play.api.mvc._ + +import org.test.Util + +object Application extends Controller { + + def index = Action { + Ok(Util.fullStop("Your new application is ready")) + } + + def shutdown = Action { + System.exit(0) + Ok("shutdown") + } +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.old deleted file mode 100644 index adf8f9c4..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.old +++ /dev/null @@ -1,18 +0,0 @@ -package controllers - -import play.api._ -import play.api.mvc._ - -import org.test.Util - -object Application extends Controller { - - def index = Action { - Ok(Util.fullStop("Your new application is ready")) - } - - def shutdown = Action { - System.exit(0) - Ok("shutdown") - } -} From 6513851d0a348f46a75d5b65b3bc3dcb0fadcea1 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:44:07 -0500 Subject: [PATCH 15/51] convert routes to template Signed-off-by: Cosmin Stroe --- .../fixtures/app/basicplayapp/conf/routes | 9 -------- .../fixtures/app/basicplayapp/conf/routes.ftl | 21 +++++++++++++++++++ .../fixtures/app/basicplayapp/conf/routes.old | 9 -------- 3 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes create mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes deleted file mode 100644 index 1d2ec1b4..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes +++ /dev/null @@ -1,9 +0,0 @@ -# Routes -# Home page -GET / @controllers.Application.index - -GET /shutdown @controllers.Application.shutdown - -# Map static resources from the /public folder to the /assets URL path -GET /assets/*file @controllers.Assets.at(path="/public", file) - diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl new file mode 100644 index 00000000..3dc1a537 --- /dev/null +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl @@ -0,0 +1,21 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> +# Routes +# Home page +GET / @controllers.Application.index + +GET /shutdown @controllers.Application.shutdown + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file @controllers.Assets.at(path="/public", file) + +<#else> +# Routes +# Home page +GET / controllers.Application.index + +GET /shutdown controllers.Application.shutdown + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file controllers.Assets.at(path="/public", file) + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.old deleted file mode 100644 index 784cdbe5..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.old +++ /dev/null @@ -1,9 +0,0 @@ -# Routes -# Home page -GET / controllers.Application.index - -GET /shutdown controllers.Application.shutdown - -# Map static resources from the /public folder to the /assets URL path -GET /assets/*file controllers.Assets.at(path="/public", file) - From c56e624d35e453741940e77124661a13495499de Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:45:05 -0500 Subject: [PATCH 16/51] convert routes to template Signed-off-by: Cosmin Stroe --- .../app/playmultiproject/primary/conf/routes | 5 ----- .../app/playmultiproject/primary/conf/routes.ftl | 13 +++++++++++++ .../app/playmultiproject/primary/conf/routes.old | 5 ----- 3 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes create mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes deleted file mode 100644 index c9b89dc3..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes +++ /dev/null @@ -1,5 +0,0 @@ -GET / @controllers.Application.index -GET /shutdown @controllers.Application.shutdown -GET /submodule @controllers.submodule.Application.index -GET /assets/*file @controllers.Assets.at(path="/public", file) - diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl new file mode 100644 index 00000000..adba0095 --- /dev/null +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl @@ -0,0 +1,13 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> +GET / @controllers.Application.index +GET /shutdown @controllers.Application.shutdown +GET /submodule @controllers.submodule.Application.index +GET /assets/*file @controllers.Assets.at(path="/public", file) + +<#else> +GET / controllers.Application.index +GET /shutdown controllers.Application.shutdown +GET /submodule controllers.submodule.Application.index +GET /assets/*file controllers.Assets.at(path="/public", file) + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.old deleted file mode 100644 index 286027e9..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.old +++ /dev/null @@ -1,5 +0,0 @@ -GET / controllers.Application.index -GET /shutdown controllers.Application.shutdown -GET /submodule controllers.submodule.Application.index -GET /assets/*file controllers.Assets.at(path="/public", file) - From b685591e959dec7e83c0bac6bef9694a1133ca5a Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:46:02 -0500 Subject: [PATCH 17/51] convert routes to template Signed-off-by: Cosmin Stroe --- .../fixtures/app/playcompositebuild/conf/routes | 4 ---- .../fixtures/app/playcompositebuild/conf/routes.ftl | 11 +++++++++++ .../fixtures/app/playcompositebuild/conf/routes.old | 4 ---- 3 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes create mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes deleted file mode 100644 index cd77fa21..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes +++ /dev/null @@ -1,4 +0,0 @@ -GET / @controllers.Application.index -GET /shutdown @controllers.Application.shutdown -GET /assets/*file @controllers.Assets.at(path="/public", file) - diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl new file mode 100644 index 00000000..98abba44 --- /dev/null +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl @@ -0,0 +1,11 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> +GET / @controllers.Application.index +GET /shutdown @controllers.Application.shutdown +GET /assets/*file @controllers.Assets.at(path="/public", file) + +<#else> +GET / controllers.Application.index +GET /shutdown controllers.Application.shutdown +GET /assets/*file controllers.Assets.at(path="/public", file) + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.old deleted file mode 100644 index d5f789b5..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.old +++ /dev/null @@ -1,4 +0,0 @@ -GET / controllers.Application.index -GET /shutdown controllers.Application.shutdown -GET /assets/*file controllers.Assets.at(path="/public", file) - From 97b1c5d5d64a0051d46874bbf8ab35db8c61e69c Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:47:24 -0500 Subject: [PATCH 18/51] convert build.gradle to template Signed-off-by: Cosmin Stroe --- .../basicplayapp/{build.gradle => build.gradle.ftl} | 10 ++++++++++ .../fixtures/app/basicplayapp/build.gradle.old | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/{build.gradle => build.gradle.ftl} (59%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl similarity index 59% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl index 53a51e73..aefafa84 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl @@ -1,3 +1,4 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> plugins { id 'org.gradle.playframework' } @@ -7,3 +8,12 @@ dependencies { implementation "com.typesafe.play:play-guice_2.12:2.6.15" implementation "ch.qos.logback:logback-classic:1.2.3" } + +<#else> +plugins { + id 'org.gradle.playframework' +} + +// repositories added in PlayApp class + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.old deleted file mode 100644 index fcd36b68..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.old +++ /dev/null @@ -1,5 +0,0 @@ -plugins { - id 'org.gradle.playframework' -} - -// repositories added in PlayApp class From e7031bff94b2d59d7f3efccf7c7bc3fd81038270 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:48:11 -0500 Subject: [PATCH 19/51] convert build.gradle to template Signed-off-by: Cosmin Stroe --- .../primary/{build.gradle => build.gradle.ftl} | 13 +++++++++++++ .../app/playmultiproject/primary/build.gradle.old | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/{build.gradle => build.gradle.ftl} (55%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl similarity index 55% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl index 54ba168d..b9d3b84b 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl @@ -1,3 +1,4 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> plugins { id 'org.gradle.playframework' } @@ -8,3 +9,15 @@ dependencies { implementation "com.typesafe.play:play-guice_2.12:2.6.15" implementation "ch.qos.logback:logback-classic:1.2.3" } + +<#else> +plugins { + id 'org.gradle.playframework' +} + +dependencies { + implementation project(":submodule") + implementation project(":javalibrary") +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.old deleted file mode 100644 index 4cc00ef9..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.old +++ /dev/null @@ -1,8 +0,0 @@ -plugins { - id 'org.gradle.playframework' -} - -dependencies { - implementation project(":submodule") - implementation project(":javalibrary") -} From ce18994b4d60ee48771884c5b3b2c80f020be99f Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:49:12 -0500 Subject: [PATCH 20/51] convert build.gradle to template Signed-off-by: Cosmin Stroe --- .../submodule/{build.gradle => build.gradle.ftl} | 8 ++++++++ .../app/playmultiproject/submodule/build.gradle.old | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/{build.gradle => build.gradle.ftl} (61%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl similarity index 61% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl index f0eace12..740e2627 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl @@ -1,3 +1,4 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> plugins { id 'org.gradle.playframework' } @@ -6,3 +7,10 @@ dependencies { implementation "com.typesafe.play:play-guice_2.12:2.6.15" implementation "ch.qos.logback:logback-classic:1.2.3" } + +<#else> +plugins { + id 'org.gradle.playframework' +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.old deleted file mode 100644 index ed5cc055..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.old +++ /dev/null @@ -1,3 +0,0 @@ -plugins { - id 'org.gradle.playframework' -} \ No newline at end of file From 56f015921bd4325f731273c9c7dd92abf773b3d7 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:49:50 -0500 Subject: [PATCH 21/51] convert build.gradle to template Signed-off-by: Cosmin Stroe --- .../playmultiproject/{build.gradle => build.gradle.ftl} | 8 ++++++++ .../fixtures/app/playmultiproject/build.gradle.old | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/{build.gradle => build.gradle.ftl} (61%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl similarity index 61% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl index f0eace12..740e2627 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl @@ -1,3 +1,4 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> plugins { id 'org.gradle.playframework' } @@ -6,3 +7,10 @@ dependencies { implementation "com.typesafe.play:play-guice_2.12:2.6.15" implementation "ch.qos.logback:logback-classic:1.2.3" } + +<#else> +plugins { + id 'org.gradle.playframework' +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.old deleted file mode 100644 index c7c4dfce..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.old +++ /dev/null @@ -1,3 +0,0 @@ -plugins { - id 'org.gradle.playframework' -} From 59bf500f093643a2e72d500bf6a1b100d71cdc87 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:50:44 -0500 Subject: [PATCH 22/51] convert build.gradle to template Signed-off-by: Cosmin Stroe --- .../{build.gradle => build.gradle.ftl} | 12 ++++++++++++ .../fixtures/app/playcompositebuild/build.gradle.old | 7 ------- 2 files changed, 12 insertions(+), 7 deletions(-) rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/{build.gradle => build.gradle.ftl} (56%) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl similarity index 56% rename from src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle rename to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl index 38455c09..41eba320 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl @@ -1,3 +1,4 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> plugins { id 'org.gradle.playframework' } @@ -7,3 +8,14 @@ dependencies { implementation "com.typesafe.play:play-guice_2.12:2.6.15" implementation "ch.qos.logback:logback-classic:1.2.3" } + +<#else> +plugins { + id 'org.gradle.playframework' +} + +dependencies { + implementation "org.my:java-lib:1.0" +} + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.old deleted file mode 100644 index d875fe41..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.old +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - id 'org.gradle.playframework' -} - -dependencies { - implementation "org.my:java-lib:1.0" -} From 34d8d70e8c0a5d923607316a3e8d6904afe216eb Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:52:40 -0500 Subject: [PATCH 23/51] convert application.conf to template Signed-off-by: Cosmin Stroe --- .../fixtures/app/shared/conf/application.conf | 1 - .../conf/{application.conf.old => application.conf.ftl} | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf rename src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/{application.conf.old => application.conf.ftl} (56%) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf deleted file mode 100644 index 965882f7..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf +++ /dev/null @@ -1 +0,0 @@ -play.http.secret.key="TY9[b`xw2MeXUt;M +play.http.secret.key="TY9[b`xw2MeXUt;M application.secret="TY9[b`xw2MeXUt;M \ No newline at end of file From bc78ebd400236d621710f285ffa8cde6d3e4f82a Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:53:57 -0500 Subject: [PATCH 24/51] convert application.conf to template Signed-off-by: Cosmin Stroe --- .../primary/conf/application.conf | 2 -- .../primary/conf/application.conf.ftl | 18 ++++++++++++++++++ .../primary/conf/application.conf.old | 11 ----------- 3 files changed, 18 insertions(+), 13 deletions(-) delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf create mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl delete mode 100644 src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.old diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf deleted file mode 100644 index 228d7786..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf +++ /dev/null @@ -1,2 +0,0 @@ -# https://www.playframework.com/documentation/2.6.x/ApplicationSecret -play.http.secret.key="somethingsecret" diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl new file mode 100644 index 00000000..fca1c741 --- /dev/null +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl @@ -0,0 +1,18 @@ +<#if playVersion == "2.7" || playVersion == "2.6"> +# https://www.playframework.com/documentation/2.6.x/ApplicationSecret +play.http.secret.key="somethingsecret" + +<#else> +application.secret="changeme" +application.langs="en" + +# Root logger: +logger.root=ERROR + +# Logger used by the framework: +logger.play=INFO + +# Logger provided to your application: +logger.application=DEBUG + + \ No newline at end of file diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.old b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.old deleted file mode 100644 index f16d74c9..00000000 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.old +++ /dev/null @@ -1,11 +0,0 @@ -application.secret="changeme" -application.langs="en" - -# Root logger: -logger.root=ERROR - -# Logger used by the framework: -logger.play=INFO - -# Logger provided to your application: -logger.application=DEBUG \ No newline at end of file From 6236a3270bfab6f95742f985f1b2a77dee4e6ee2 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 22:56:10 -0500 Subject: [PATCH 25/51] fix typo Signed-off-by: Cosmin Stroe --- .../app/controllers/Application.scala.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl index 41e2121a..07a07b1f 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl @@ -50,4 +50,4 @@ object Application extends Controller { Ok("shutdown") } } -<#/if> \ No newline at end of file + \ No newline at end of file From 5a5dc1ecb012cbc252de3201bec1c346f948d398 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 23:09:36 -0500 Subject: [PATCH 26/51] fix template loading issues Signed-off-by: Cosmin Stroe --- .../playframework/fixtures/app/PlayApp.groovy | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy index b5c25509..591babfc 100644 --- a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy +++ b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy @@ -54,7 +54,7 @@ abstract class PlayApp { String getResourcePath(String relativePath) { String basePath = this.getClass().getCanonicalName().split("\\.").dropRight(1).join("/") - return basePath + "/" + getName() + "/" + relativePath + return basePath + "/" + relativePath } List getAllFiles() { @@ -62,7 +62,7 @@ abstract class PlayApp { } SourceFile getGradleBuild() { - String gradleBuildContent = renderTemplate(getResourcePath("build.gradle.ftl")) + String gradleBuildContent = renderTemplate(getResourcePath(getName() + "/build.gradle.ftl")) def gradleBuildWithRepositories = gradleBuildContent.concat """ allprojects { ${playRepositories()} @@ -130,7 +130,7 @@ abstract class PlayApp { def subpath = RelativePathUtil.relativePath(baseDirFile, source.parentFile) if(isTemplate(source)) { - String content = renderTemplate(getResourcePath(baseDir + "/" + subpath + "/" + source.name)) + String content = renderTemplate(getResourcePath(resourcePath + "/" + subpath + "/" + source.name)) SourceFile file = new SourceFile("$baseDir/$subpath", source.name[0..<-4], content) sourceFiles.add(file) } else { @@ -148,9 +148,13 @@ abstract class PlayApp { } String renderTemplate(String templatePath) { - Template tmpl = cfg.getTemplate(templatePath) - StringWriter sw = new StringWriter() - tmpl.process(model, sw) - return sw.toString() + try { + Template tmpl = cfg.getTemplate(templatePath) + StringWriter sw = new StringWriter() + tmpl.process(model, sw) + return sw.toString() + } catch(Exception e) { + throw e + } } } From 7a0413e925a4bc1121435c0591cded600beabf24 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Fri, 11 Sep 2020 23:51:27 -0500 Subject: [PATCH 27/51] Fix WithFailingTestsApp to correctly write build.gradle file Signed-off-by: Cosmin Stroe --- .../playframework/fixtures/app/PlayApp.groovy | 17 ++++++++++++++--- .../fixtures/app/WithFailingTestsApp.groovy | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy index 591babfc..96abd4c7 100644 --- a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy +++ b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/PlayApp.groovy @@ -99,9 +99,20 @@ abstract class PlayApp { protected SourceFile sourceFile(String path, String name, String baseDir = getName()) { - URL resource = getClass().getResource("$baseDir/$path/$name") - File file = new File(resource.toURI()) - return new SourceFile(path, name, file.text) + String resourcePath = getResourcePath("$baseDir/$path/$name") + URL resource = getClass().getClassLoader().getResource(resourcePath) + + if(resource == null) { + throw new IllegalStateException("Could not find resource on the classpath: $resourcePath") + } + + File source = new File(resource.toURI()) + if(isTemplate(source)) { + String content = renderTemplate(resourcePath) + return new SourceFile(path, source.name[0..<-4], content) + } else { + return new SourceFile(path, source.name, source.text) + } } void writeSources(File sourceDir) { diff --git a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/WithFailingTestsApp.groovy b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/WithFailingTestsApp.groovy index 6c9dc988..18486a1c 100644 --- a/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/WithFailingTestsApp.groovy +++ b/src/integTestFixtures/groovy/org/gradle/playframework/fixtures/app/WithFailingTestsApp.groovy @@ -12,7 +12,7 @@ class WithFailingTestsApp extends PlayApp { @Override SourceFile getGradleBuild() { - def gradleBuild = sourceFile("", "build.gradle", "basicplayapp") + def gradleBuild = sourceFile("", "build.gradle.ftl", "basicplayapp") def gradleBuildWithRepositories = gradleBuild.content.concat """ allprojects { ${playRepositories()} From 2ea4c2b282dc566a3c033133dfec782ab609a422 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Sat, 12 Sep 2020 00:53:22 -0500 Subject: [PATCH 28/51] run tests in parallel again Signed-off-by: Cosmin Stroe --- .../main/kotlin/org/gradle/playframework/TestSetupPlugin.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt index 8707374b..070c2b92 100644 --- a/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt +++ b/buildSrc/src/main/kotlin/org/gradle/playframework/TestSetupPlugin.kt @@ -28,7 +28,6 @@ class TestSetupPlugin : Plugin { private fun determineMaxParallelForks(): Int { - // return if ((Runtime.getRuntime().availableProcessors() / 2) < 1) 1 else (Runtime.getRuntime().availableProcessors() / 2) - return 1 + return if ((Runtime.getRuntime().availableProcessors() / 2) < 1) 1 else (Runtime.getRuntime().availableProcessors() / 2) } } From 8b895e6ff0afa4ad761c89a593e8a5f092565942 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Sat, 12 Sep 2020 02:02:39 -0500 Subject: [PATCH 29/51] Break up CI build into several smaller builds Signed-off-by: Cosmin Stroe --- .travis.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 869fdda7..6a01e1c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,23 @@ install: true jdk: - openjdk8 -matrix: +jobs: include: - - env: GRADLE_TASK=integrationTest - - env: GRADLE_TASK=docTest + - name: "Play 2.3.10 Integration Tests" + env: GRADLE_TASK=integrationTest PLAY_VERSION=2.3.10 + - name: "Play 2.4.11 Integration Tests" + env: GRADLE_TASK=integrationTest PLAY_VERSION=2.4.11 + - name: "Play 2.5.19 Integration Tests" + env: GRADLE_TASK=integrationTest PLAY_VERSION=2.5.19 + - name: "Play 2.6.25 Integration Tests" + env: GRADLE_TASK=integrationTest PLAY_VERSION=2.6.25 + - name: "Play 2.7.3 Integration Tests" + env: GRADLE_TASK=integrationTest PLAY_VERSION=2.7.3 + - name: "Documentation Tests" + env: GRADLE_TASK=docTest PLAY_VERSION=not_used script: - - ./gradlew $GRADLE_TASK -s --continue + - ./gradlew -Pplayframework.int-test.target.version=$PLAY_VERSION $GRADLE_TASK -s --continue before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock From e7ec34a685a2179b17d8d82fb810fe5cc620d994 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Sat, 12 Sep 2020 03:29:27 -0500 Subject: [PATCH 30/51] fix some 2.3 integration tests Signed-off-by: Cosmin Stroe --- ...bstractRoutesCompileIntegrationTest.groovy | 4 ---- .../Play24RoutesCompileIntegrationTest.groovy | 24 ++++++++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy index 29f1f03f..9070c595 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy @@ -82,8 +82,6 @@ object Application extends Controller { } def "can run RoutesCompile"() { - // Play version 2.3 not supported - Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) given: withRoutesTemplate() expect: @@ -95,8 +93,6 @@ object Application extends Controller { } def "recompiles on changed routes file input"() { - // Play version 2.3 not supported - Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) given: File templateFile = withRoutesTemplate() build(ROUTES_COMPILE_TASK_NAME) diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy index 39da0910..326cc4ce 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy @@ -14,20 +14,32 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio @Override def getReverseRoutesFileName(String packageName, String namespace) { - return "${namespace ? namespace + '/' :''}controllers/${packageName ? packageName + '/' :''}ReverseRoutes.scala" + if (playVersion < VersionNumber.parse("2.4")) { + return "routes_reverseRouting.scala" + } else { + return "${namespace ? namespace + '/' : ''}controllers/${packageName ? packageName + '/' : ''}ReverseRoutes.scala" + } } @Override def getScalaRoutesFileName(String packageName, String namespace) { - return "${packageName?:'router'}/Routes.scala" + if (playVersion < VersionNumber.parse("2.4")) { + return "routes_routing.scala" + } else { + return "${packageName ?: 'router'}/Routes.scala" + } } @Override def getOtherRoutesFileNames() { - return [ - {packageName, namespace -> "${namespace ? namespace + '/' :''}controllers/${packageName ? packageName + '/' :''}javascript/JavaScriptReverseRoutes.scala" }, - {packageName, namespace -> "${packageName?:'router'}/RoutesPrefix.scala" } - ] + if (playVersion < VersionNumber.parse("2.4")) { + return [] + } else { + return [ + { packageName, namespace -> "${namespace ? namespace + '/' : ''}controllers/${packageName ? packageName + '/' : ''}javascript/JavaScriptReverseRoutes.scala" }, + { packageName, namespace -> "${packageName ?: 'router'}/RoutesPrefix.scala" } + ] + } } def "can specify route compiler type as injected"() { From d03a667fe653119763e132dfc835652e052c2239 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Sat, 12 Sep 2020 03:46:17 -0500 Subject: [PATCH 31/51] fix another 2.3 test Signed-off-by: Cosmin Stroe --- .../tasks/AbstractRoutesCompileIntegrationTest.groovy | 2 -- .../tasks/Play24RoutesCompileIntegrationTest.groovy | 10 +++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy index 9070c595..e2214e08 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy @@ -144,8 +144,6 @@ GET /newroute ${controllers()}.Application.index() } def "compiles additional routes file and cleans up output on removal"() { - // Play version 2.3 does not support injected routers - Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) when: withRoutesTemplate() then: diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy index 326cc4ce..d6e4c9a0 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy @@ -9,13 +9,17 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio @Override def getJavaRoutesFileName(String packageName, String namespace) { - return "${namespace ? namespace + '/' :''}controllers/${packageName ? packageName + '/' :''}routes.java" + if (playVersion < VersionNumber.parse("2.4")) { + return "controllers/${packageName ? packageName + "/" : ''}/routes.java" + } else { + return "${namespace ? namespace + '/' : ''}controllers/${packageName ? packageName + '/' : ''}routes.java" + } } @Override def getReverseRoutesFileName(String packageName, String namespace) { if (playVersion < VersionNumber.parse("2.4")) { - return "routes_reverseRouting.scala" + return "${packageName ? packageName + '/' : ''}routes_reverseRouting.scala" } else { return "${namespace ? namespace + '/' : ''}controllers/${packageName ? packageName + '/' : ''}ReverseRoutes.scala" } @@ -24,7 +28,7 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio @Override def getScalaRoutesFileName(String packageName, String namespace) { if (playVersion < VersionNumber.parse("2.4")) { - return "routes_routing.scala" + return "${packageName ? packageName + '/' : ''}routes_routing.scala" } else { return "${packageName ?: 'router'}/Routes.scala" } From f396931d3231ddfc97e1a981a2f050e5473e0eb4 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Sat, 12 Sep 2020 03:55:08 -0500 Subject: [PATCH 32/51] Fix another 2.3 test Signed-off-by: Cosmin Stroe --- .../AbstractRoutesCompileIntegrationTest.groovy | 2 -- .../Play24RoutesCompileIntegrationTest.groovy | 14 +++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy index e2214e08..946323f8 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy @@ -174,8 +174,6 @@ GET /newroute ${controllers()}.Application.index() } def "can run RoutesCompile with namespaceReverseRouter set"() { - // Play version 2.3 not supported - Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) given: withRoutesTemplate("org.gradle.test") buildFile << """ diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy index d6e4c9a0..59b23c41 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy @@ -10,7 +10,7 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio @Override def getJavaRoutesFileName(String packageName, String namespace) { if (playVersion < VersionNumber.parse("2.4")) { - return "controllers/${packageName ? packageName + "/" : ''}/routes.java" + return "${namespace ? namespace + '/' : ''}controllers/${packageName ? packageName + "/" : ''}/routes.java" } else { return "${namespace ? namespace + '/' : ''}controllers/${packageName ? packageName + '/' : ''}routes.java" } @@ -19,7 +19,11 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio @Override def getReverseRoutesFileName(String packageName, String namespace) { if (playVersion < VersionNumber.parse("2.4")) { - return "${packageName ? packageName + '/' : ''}routes_reverseRouting.scala" + if (namespace) { + return "${namespace ? namespace + '/' : ''}routes_reverseRouting.scala" + } else { + return "${packageName ? packageName + '/' : ''}routes_reverseRouting.scala" + } } else { return "${namespace ? namespace + '/' : ''}controllers/${packageName ? packageName + '/' : ''}ReverseRoutes.scala" } @@ -28,7 +32,11 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio @Override def getScalaRoutesFileName(String packageName, String namespace) { if (playVersion < VersionNumber.parse("2.4")) { - return "${packageName ? packageName + '/' : ''}routes_routing.scala" + if (namespace) { + return "${namespace ? namespace + '/' : ''}routes_routing.scala" + } else { + return "${packageName ? packageName + '/' : ''}routes_routing.scala" + } } else { return "${packageName ?: 'router'}/Routes.scala" } From ec0ceaadf6ce223523860e447d0589b5d9a288a2 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Sat, 12 Sep 2020 04:01:46 -0500 Subject: [PATCH 33/51] Fix all 2.3 tests Signed-off-by: Cosmin Stroe --- .../tasks/AbstractRoutesCompileIntegrationTest.groovy | 2 +- .../tasks/Play24RoutesCompileIntegrationTest.groovy | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy index 946323f8..02464268 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/AbstractRoutesCompileIntegrationTest.groovy @@ -244,7 +244,7 @@ GET / ${controllers()}${packageId}.Application.inde def "can add additional imports"() { // Play version 2.3 not supported - Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) + Assume.assumeTrue(playVersion > VersionNumber.parse("2.3.99")) given: withRoutesTemplate() and: diff --git a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy index 59b23c41..9b9a0018 100644 --- a/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy +++ b/src/integTest/groovy/org/gradle/playframework/tasks/Play24RoutesCompileIntegrationTest.groovy @@ -55,12 +55,8 @@ class Play24RoutesCompileIntegrationTest extends AbstractRoutesCompileIntegratio } def "can specify route compiler type as injected"() { - // Play version 2.3 does not support injected routers - Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) - // Play before version 2.6 does not support Java 1.9+ - if (playVersion.compareTo(VersionNumber.parse("2.6")) < 0) { - Assume.assumeTrue(System.getProperty("java.version").startsWith("1.8")) - } + // Play version 2.3 not supported + Assume.assumeTrue(playVersion > VersionNumber.parse("2.3.99")) given: withRoutesTemplate() withInjectedRoutesController() @@ -79,7 +75,7 @@ play { def "recompiles when route compiler type is changed"() { // Play version 2.3 not supported - Assume.assumeTrue(playVersion.compareTo(VersionNumber.parse("2.4")) >= 0) + Assume.assumeTrue(playVersion > VersionNumber.parse("2.3.99")) // Play 2.7+ only has a single route compiler type. Assume.assumeTrue(playVersion < VersionNumber.parse("2.7")) when: From 949dde90b18211f7fadf525ddbe230ba18ef6ef1 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Mon, 14 Sep 2020 15:39:42 -0500 Subject: [PATCH 34/51] Add EOL @ EOF to src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playmultiproject/build.gradle.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl index 740e2627..a6708b50 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/build.gradle.ftl @@ -13,4 +13,4 @@ plugins { id 'org.gradle.playframework' } - \ No newline at end of file + From 226add54dd909ad7f3f103548b5f78b61a160f7e Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Mon, 14 Sep 2020 15:43:38 -0500 Subject: [PATCH 35/51] Add EOL @ EOF for src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../primary/app/controllers/Application.scala.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl index c1ae548e..6d69a2f2 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/app/controllers/Application.scala.ftl @@ -38,4 +38,4 @@ object Application extends Controller { } } - \ No newline at end of file + From f0dae8a940f7af05fddb6a0f8b2c37293f269b75 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Mon, 14 Sep 2020 15:43:54 -0500 Subject: [PATCH 36/51] Add EOL @ EOF for src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playmultiproject/primary/build.gradle.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl index b9d3b84b..83d9f8f1 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/build.gradle.ftl @@ -20,4 +20,4 @@ dependencies { implementation project(":javalibrary") } - \ No newline at end of file + From 7589bef01f811391c8cc928ab5a8483f9e608a1a Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Mon, 14 Sep 2020 15:44:25 -0500 Subject: [PATCH 37/51] Add EOL @ EOF for src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playmultiproject/primary/conf/routes.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl index adba0095..8c47ca18 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/routes.ftl @@ -10,4 +10,4 @@ GET /shutdown controllers.Application.shutdown GET /submodule controllers.submodule.Application.index GET /assets/*file controllers.Assets.at(path="/public", file) - \ No newline at end of file + From e1650eb3fb54fac163952ed560fb1d2a4738f46c Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Mon, 14 Sep 2020 15:44:41 -0500 Subject: [PATCH 38/51] Add EOL @ EOF for src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../submodule/app/controllers/submodule/Application.scala.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl index 34f59a39..1a367dc6 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/app/controllers/submodule/Application.scala.ftl @@ -25,4 +25,4 @@ object Application extends Controller { } - \ No newline at end of file + From ab1d2a9ede9a3c3a5b9d6b3cc3e47f4fb617d6ff Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Mon, 14 Sep 2020 15:44:58 -0500 Subject: [PATCH 39/51] Add EOL @ EOF for src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playmultiproject/submodule/build.gradle.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl index 740e2627..a6708b50 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/submodule/build.gradle.ftl @@ -13,4 +13,4 @@ plugins { id 'org.gradle.playframework' } - \ No newline at end of file + From 83bd68c2c45ff6922490acb0ae1a7bbd4c62e883 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Mon, 14 Sep 2020 15:45:12 -0500 Subject: [PATCH 40/51] Add EOL @ EOF for src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../playframework/fixtures/app/shared/conf/application.conf.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf.ftl index 08c6d1fe..eb94ad71 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/shared/conf/application.conf.ftl @@ -14,4 +14,4 @@ logger.play=INFO # Logger provided to your application: logger.application=DEBUG - \ No newline at end of file + From 9fdefb9a8c747bdd0032fe4266a87fe8702a47bc Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:02:38 -0500 Subject: [PATCH 41/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../app/special/strangename/Application.scala.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl index 5a9dfda9..d153a2e2 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/app/special/strangename/Application.scala.ftl @@ -35,4 +35,4 @@ object Application extends Controller { Ok(views.html.index("Your new application is ready.")) } } - \ No newline at end of file + From 3f744fbbfbdfa6c2fbfdc78d292dcfc063274ef3 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:02:50 -0500 Subject: [PATCH 42/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../playframework/fixtures/app/advancedplayapp/conf/routes.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl index 474dc78e..4682b520 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/routes.ftl @@ -22,4 +22,4 @@ GET /shutdown controllers.Application.shutdown # Map static resources from the /public folder to the /assets URL path GET /assets/*file controllers.Assets.at(path="/public", file) - \ No newline at end of file + From 1c3dd6e911392fcea53bed2c9b6225491aec900d Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:03:01 -0500 Subject: [PATCH 43/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/advancedplayapp/conf/scala.routes.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl index 6a0c36d0..b369cf96 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/conf/scala.routes.ftl @@ -6,4 +6,4 @@ POST /two @special.strangename.Application.index GET /one controllers.scla.MixedJava.index POST /two special.strangename.Application.index - \ No newline at end of file + From 345ffc148564a33821e1c9a04dd84e7e559c2863 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:03:12 -0500 Subject: [PATCH 44/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../app/basicplayapp/app/controllers/Application.scala.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl index facf679b..39db1edb 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/app/controllers/Application.scala.ftl @@ -50,4 +50,4 @@ object Application extends Controller { } } - \ No newline at end of file + From 992bcc3815ceec802b2efd628fe9cdbea156a903 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:03:22 -0500 Subject: [PATCH 45/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playappwithdependencies/build.gradle.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl index 5876d491..39aafe74 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/build.gradle.ftl @@ -24,4 +24,4 @@ dependencies { // repositories added in PlayApp class - \ No newline at end of file + From cb03a6f92895e09583beebd993673581404c3900 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:03:33 -0500 Subject: [PATCH 46/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../playcompositebuild/app/controllers/Application.scala.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl index c1ae548e..6d69a2f2 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/app/controllers/Application.scala.ftl @@ -38,4 +38,4 @@ object Application extends Controller { } } - \ No newline at end of file + From f3e50599dfe7dcf29ab521d2c63e7359ea008dce Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:03:42 -0500 Subject: [PATCH 47/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playcompositebuild/build.gradle.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl index 41eba320..47d52b96 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/build.gradle.ftl @@ -18,4 +18,4 @@ dependencies { implementation "org.my:java-lib:1.0" } - \ No newline at end of file + From 6ea182624a6a1b9aa631324e49650ce22eb0b774 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:03:53 -0500 Subject: [PATCH 48/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playappwithdependencies/conf/routes.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl index 3dc1a537..6d724563 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/conf/routes.ftl @@ -18,4 +18,4 @@ GET /shutdown controllers.Application.shutdown # Map static resources from the /public folder to the /assets URL path GET /assets/*file controllers.Assets.at(path="/public", file) - \ No newline at end of file + From d09b0686d55ad6e34a69e5ded2b06af9d52df9e4 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:04:02 -0500 Subject: [PATCH 49/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../fixtures/app/playcompositebuild/conf/routes.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl index 98abba44..dbba7a04 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playcompositebuild/conf/routes.ftl @@ -8,4 +8,4 @@ GET / controllers.Application.index GET /shutdown controllers.Application.shutdown GET /assets/*file controllers.Assets.at(path="/public", file) - \ No newline at end of file + From 1d6423e4e66c022a143ccf2484edf294570029c0 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 20:04:23 -0500 Subject: [PATCH 50/51] Update src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl Co-authored-by: Jonathan Leitschuh Signed-off-by: Cosmin Stroe --- .../playframework/fixtures/app/advancedplayapp/build.gradle.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl index 506fcb35..f740dfff 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/advancedplayapp/build.gradle.ftl @@ -19,4 +19,4 @@ dependencies { implementation "com.typesafe.play:play-guice_2.12:2.6.15" implementation "ch.qos.logback:logback-classic:1.2.3" } - \ No newline at end of file + From a7f11752314d0b54ba4179ebbd54a94c0a963896 Mon Sep 17 00:00:00 2001 From: Cosmin Stroe Date: Tue, 15 Sep 2020 21:07:23 -0500 Subject: [PATCH 51/51] add EOL @ EOF Signed-off-by: Cosmin Stroe --- .../playframework/fixtures/app/basicplayapp/build.gradle.ftl | 2 +- .../playframework/fixtures/app/basicplayapp/conf/routes.ftl | 2 +- .../app/controllers/Application.scala.ftl | 2 +- .../app/playmultiproject/primary/conf/application.conf.ftl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl index aefafa84..3664629d 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/build.gradle.ftl @@ -16,4 +16,4 @@ plugins { // repositories added in PlayApp class - \ No newline at end of file + diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl index 3dc1a537..6d724563 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/basicplayapp/conf/routes.ftl @@ -18,4 +18,4 @@ GET /shutdown controllers.Application.shutdown # Map static resources from the /public folder to the /assets URL path GET /assets/*file controllers.Assets.at(path="/public", file) - \ No newline at end of file + diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl index 07a07b1f..a13bd84c 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playappwithdependencies/app/controllers/Application.scala.ftl @@ -50,4 +50,4 @@ object Application extends Controller { Ok("shutdown") } } - \ No newline at end of file + diff --git a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl index fca1c741..2a307aea 100644 --- a/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl +++ b/src/integTestFixtures/resources/org/gradle/playframework/fixtures/app/playmultiproject/primary/conf/application.conf.ftl @@ -15,4 +15,4 @@ logger.play=INFO # Logger provided to your application: logger.application=DEBUG - \ No newline at end of file +