Created
November 30, 2015 04:28
-
-
Save nodakai/8337e996073f1a94dfd6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 the scala plugin to add support for Scala | |
apply plugin: 'scala' | |
apply plugin: 'application' | |
version = '0.1' | |
configurations { | |
fatJar | |
} | |
// In this section you declare where to find the dependencies of your project | |
repositories { | |
// Use 'jcenter' for resolving your dependencies. | |
// You can declare any Maven/Ivy/file repository here. | |
jcenter() | |
} | |
// In this section you declare the dependencies for your production and test code | |
dependencies { | |
// We use Scala 2.11 in our library project | |
compile 'org.scala-lang:scala-library:2.11.7' | |
// We use Scalatest for testing our library | |
testCompile 'junit:junit:4.12' | |
testCompile 'org.scalatest:scalatest_2.11:2.2.5' | |
testRuntime 'org.scala-lang.modules:scala-xml_2.11:1.0.5' | |
fatJar 'org.scala-lang:scala-library:2.11.7' | |
} | |
mainClassName = 'AppMain' // application plugin | |
task fatJar(type: Jar) { | |
manifest { | |
attributes 'Implementation-Title': 'Gradle Scala FatJar Example', | |
'Implementation-Version': version, | |
'Main-Class': mainClassName, | |
'Implementation-Vendor': 'nodakai' | |
} | |
baseName = project.name + '-all' | |
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } | |
with jar | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment