Created
June 4, 2016 11:26
-
-
Save fomkin/9eeae63f4750da8443e86a643803cba7 to your computer and use it in GitHub Desktop.
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
apply plugin: 'application' | |
apply plugin: 'scala' | |
repositories { | |
mavenLocal() | |
mavenCentral() | |
} | |
mainClassName = 'PushkaTest.MainApp' | |
ext { | |
scalaBinaryVersion = "2.11" | |
scalaMinorVersion = "7" | |
} | |
configurations { | |
scalaCompilerPlugin | |
} | |
dependencies { | |
compile("org.scala-lang:scala-library:$scalaBinaryVersion.$scalaMinorVersion") | |
scalaCompilerPlugin "org.scalamacros:paradise_$scalaBinaryVersion.$scalaMinorVersion:2.1.0" | |
compile "com.github.fomkin:pushka-json_$scalaBinaryVersion:0.5.0" | |
} | |
sourceCompatibility = 1.8 | |
targetCompatibility = 1.8 | |
sourceSets { | |
main { | |
scala { | |
srcDirs = ['src/main/scala', | |
'src/main/java'] | |
} | |
java { | |
srcDirs = [] | |
} | |
resources { | |
srcDirs = ['src/main/resources'] | |
} | |
} | |
} | |
compileScala { | |
scalaCompileOptions.optimize = true | |
scalaCompileOptions.additionalParameters = ['-target:jvm-1.8', '-Ybackend:GenBCode', '-feature', | |
'-language:postfixOps', '-language:implicitConversions'] | |
} | |
tasks.withType(ScalaCompile) { | |
scalaCompileOptions.additionalParameters = [ | |
"-Xplugin:" + configurations.scalaCompilerPlugin.asPath | |
] | |
} | |
compileJava.options.encoding = 'UTF-8' | |
compileScala.options.encoding = 'UTF-8' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment