Skip to content

Instantly share code, notes, and snippets.

@dragon0
Created February 28, 2018 23:10
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 dragon0/60852da40d5737f20ac53c4197f80a1f to your computer and use it in GitHub Desktop.
Save dragon0/60852da40d5737f20ac53c4197f80a1f to your computer and use it in GitHub Desktop.
Build file for Scala App Uberjar
apply plugin: 'scala'
apply plugin: 'application'
mainClassName = 'App'
version = 'alpha'
repositories {
jcenter()
}
dependencies {
compile 'org.scala-lang:scala-library:2.11.8'
testCompile 'junit:junit:4.12'
testCompile 'org.scalatest:scalatest_2.11:3.0.1'
testRuntime 'org.scala-lang.modules:scala-xml_2.11:1.0.6'
}
jar {
from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
manifest {
attributes 'Implementation-Title': 'Foobar',
'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Main-Class': mainClassName
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment