playframework icon indicating copy to clipboard operation
playframework copied to clipboard

Remove Explicit Support for Play 2.3 and Gradle pre-6

Open marracuene opened this issue 5 years ago • 6 comments

Per @JLLeitschuh 's request on #136 .

Removal of support comprises 3 aspects:

  1. Updating docs to reflect new supported range.
  2. Updating Test Coverage to no longer include Play 2.3 and Gradle 5.x versions
  3. Updating Plugin code to no longer include Play 2.3, and issue a warning if this is used, as follows:
  • PlayApplicationPlugin.apply: fail fast and explicitly if a specific version is declared, which is unsupported
  • PlayDistributionPlugin.getMainClass: no longer suggest the NettyServer
  • RoutesCompilerAdapterV23X: remove
  • RoutesCompilerFactory remove 2.3 code
  • PlayRunAdapterV23X remove
  • PlayApplicationRunnerFactory remove 2.3 code
  • PlayTwirlAdapterV23X remove
  • TwirlCompilerFactory remove 2.3 code

marracuene avatar Jul 25 '20 13:07 marracuene

Hey, sorry for my ignorance. But I'm exactly trying to migrate from Gradle 4.2 to 6.X and my app is using play 2.3.X. Does this issue mean that Gradle 6 is not compatible with 2.3.x?

thiagohora avatar Aug 20 '20 15:08 thiagohora

We're working on dropping support for Play 2.3 in the next release.

@marracuene one thing we need to ensure we continue to support is a migration path for people in these situations. It would be helpful if we could offer a specific set of upgrade instructions on what set of (hopefully no more than 2) versions someone would have to go through to get upgraded to Gradle 6 and the latest version of Play.

JLLeitschuh avatar Aug 20 '20 17:08 JLLeitschuh

Hey, sorry for my ignorance. But I'm exactly trying to migrate from Gradle 4.2 to 6.X and my app is using play 2.3.X. Does this issue mean that Gradle 6 is not compatible with 2.3.x?

If you use the latest released version of this plugin (0.9.0), it should work fine with Gradle 6.x and Play 2.3.x. All the 2.3 unit tests pass.

In a future unreleased version, 2.3 support will be dropped. This is more due to reducing maintenance scope, rather than any fundamental incompatibility.

marracuene avatar Aug 20 '20 17:08 marracuene

Thank you for the quick answer. If you allow me, it would be great to have an example or guide to migrate. I'm trying to make them work together, but I cannot configure the routes compilation.

plugins {
    id 'org.gradle.playframework' version '0.9'
    id "application"
}
...

dependencies {
... 
}

play {
    platform {
        playVersion = "2.3.10"
        scalaVersion = "2.11.12"
        javaVersion = JavaVersion.VERSION_1_8
    }
}

sourceSets {
    main {
        scala.srcDirs = ["app/", "build/src/play/binary/"]
        resources.srcDirs = ["conf", "resources"]
        routes.srcDirs = files("conf")
    }
    test {
        java.srcDir "test"
        resources.srcDirs "test/resources"
    }
    intTest {
        java.srcDirs = ['integration-test/java']
        resources.srcDirs = ["conf", 'integration-test/resources']
        compileClasspath += testFixtures.output
    }
}

But I get this error:

`;' expected but `{' found.
`;' expected but `{' found.

However, the same code compiles in the 4.20. Do you have any idea or suggestion?

thiagohora avatar Aug 20 '20 18:08 thiagohora

@thiagohora sorry for the long delay in replying. Looks like Play 2.3 support might not be dropped after all, thanks to @cstroe 's work fixing the CI build. Therefore I am closing this issue. If you are still having the above-mentioned problem, please can you create a new issue here, specifying the exact gradle 6.x version you are using?

marracuene avatar Oct 09 '20 10:10 marracuene

@marracuene Hi, sure.

thiagohora avatar Oct 09 '20 11:10 thiagohora