Skip to content

Instantly share code, notes, and snippets.

@felixoi
Created March 19, 2018 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixoi/3ee1ac4247ab696a937c790212161f20 to your computer and use it in GitHub Desktop.
Save felixoi/3ee1ac4247ab696a937c790212161f20 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.iatoki:gradle-play-webjars:0.1.0'
classpath "gradle.plugin.org.kravemir.gradle.sass:GradleSassPlugin:1.2.2"
}
}
plugins {
id 'play'
id 'idea'
}
apply plugin: 'org.iatoki.play-webjars'
def scalaVersion = "2.12"
def playVersion = "2.6.12"
def playExtentions = ['play-guice', 'play-ahc-ws', 'play-ehcache', 'filters-helpers', 'play-logback']
def flexmarkVersion = "0.32.4"
def flexmarkExtentions = ['autolink', 'anchorlink', 'gfm-strikethrough', 'gfm-tasklist', 'tables', 'typographic', 'wikilink']
dependencies {
playExtentions.each { extention ->
play "com.typesafe.play:${extention}_$scalaVersion:$playVersion"
}
play "com.vladsch.flexmark:flexmark:$flexmarkVersion"
flexmarkExtentions.each { extention ->
play "com.vladsch.flexmark:flexmark-ext-$extention:$flexmarkVersion"
}
play "org.spongepowered:play-discourse:2.0.0-SNAPSHOT"
play "org.spongepowered:plugin-meta:0.4.1"
play "org.webjars:jquery:2.2.4"
play "org.webjars:font-awesome:4.7.0"
play "org.webjars.bower:filesize:3.5.6"
play "org.webjars.bower:momentjs:2.20.1"
play "org.postgresql:postgresql:42.2.1"
play "com.typesafe.play:play-slick_$scalaVersion:3.0.3"
play "com.typesafe.play:play-slick-evolutions_$scalaVersion:3.0.3"
play "com.github.tminglei:slick-pg_$scalaVersion:0.15.5"
play "javax.mail:mail:1.4.7"
play "io.sentry:sentry-logback:1.7.0"
play "org.bouncycastle:bcprov-jdk15on:1.59"
play "org.bouncycastle:bcpkix-jdk15on:1.59"
play "org.bouncycastle:bcpg-jdk15on:1.59"
}
repositories {
jcenter()
maven {
name "lightbend-maven-release"
url "https://repo.lightbend.com/lightbend/maven-releases"
}
ivy {
name "lightbend-ivy-release"
url "https://repo.lightbend.com/lightbend/ivy-releases"
layout "ivy"
}
maven {
name "sponge"
url "https://repo.spongepowered.org/maven"
}
}
model {
components {
play {
platform play: playVersion, scala: scalaVersion, java: '1.8'
injectedRoutesGenerator = true
sources {
twirlTemplates {
defaultImports = TwirlImports.SCALA
}
}
binaries.all { binary ->
tasks.create("${binary.name}Sass", SassCompileTask) { sassTask ->
source "app/assets/stylesheets"
exclude ["**/_*.scss", "**/_*.sass"]
dest = "${buildDir}/tmp/${sassTask.name}"
binary.assets.builtBy(sassTask)
}
}
}
}
}
idea {
module {
sourceDirs += file("app")
testSourceDirs += file("test")
scopes.COMPILE = [plus: [configurations.play], minus: []]
scopes.RUNTIME = [plus: [configurations.playRun], minus: [configurations.play]]
scopes.TEST = [plus: [configurations.playTest], minus: [configurations.playRun]]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment