-
-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gradle support for
play-scala-rest-api-example
- Loading branch information
Showing
13 changed files
with
477 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import play.gradle.Language | ||
import play.gradle.plugin.PlayPlugin | ||
|
||
plugins { | ||
alias(libs.plugins.twirl) | ||
alias(libs.plugins.play) | ||
} | ||
|
||
play { | ||
lang = Language.SCALA | ||
} | ||
|
||
def scalaVersion = System.getProperty('scala.version', PlayPlugin.DEFAULT_SCALA_VERSION).replaceAll('\\D*$', '') | ||
|
||
dependencies { | ||
implementation platform("org.playframework:play-bom_${scalaVersion}:${libs.versions.play.get()}") | ||
|
||
implementation "org.playframework:play-pekko-http-server_${scalaVersion}" | ||
implementation "org.playframework:play-guice_${scalaVersion}" | ||
implementation "org.playframework:play-logback_${scalaVersion}" | ||
implementation "net.codingwell:scala-guice_${scalaVersion}:${libs.versions.scala.guice.get()}" | ||
implementation "io.lemonlabs:scala-uri_${scalaVersion}:${libs.versions.scala.uri.get()}" | ||
implementation libs.logstash.logback.encoder | ||
|
||
testImplementation "org.playframework:play-test_${scalaVersion}" | ||
testImplementation "org.playframework:play-filters-helpers_${scalaVersion}" | ||
testImplementation "org.scalatestplus.play:scalatestplus-play_${scalaVersion}:${libs.versions.scalatestplus.play.get()}" | ||
testImplementation libs.scalatest.junit.runner | ||
} | ||
|
||
run { | ||
systemProperties System.properties | ||
} | ||
|
||
test { | ||
useJUnitPlatform { | ||
includeEngines 'scalatest' | ||
} | ||
} | ||
|
||
// TODO: Remove after release Play Gradle Plugin | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://oss.sonatype.org/content/repositories/snapshots") | ||
} | ||
mavenLocal() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[versions] | ||
twirl = "2.0.3" | ||
play = "3.0.1-03969c1e-SNAPSHOT" | ||
scala-guice = "6.0.0" | ||
scala-uri = "4.0.3" | ||
scalatestplus-play = "7.0.0" | ||
|
||
[libraries] | ||
logstash-logback-encoder = { group = "net.logstash.logback", name = "logstash-logback-encoder", version = "7.3" } | ||
scalatest-junit-runner = { group = "co.helmethair", name = "scalatest-junit-runner", version = "0.1.12" } | ||
scala-guice = { group = "net.codingwell", name = "scala-guice_2.13", version.ref = "scala-guice" } | ||
scala-uri = { group = "io.lemonlabs", name = "scala-uri_2.13", version.ref = "scala-uri" } | ||
scalatestplus-play = { group = "org.scalatestplus.play", name = "scalatestplus-play_2.13", version.ref = "scalatestplus-play" } | ||
|
||
[plugins] | ||
twirl = { id = "org.playframework.twirl", version.ref = "twirl" } | ||
play = { id = "org.playframework.play", version.ref = "play" } |
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
play-scala-rest-api-example/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.