Created
March 24, 2016 15:34
-
-
Save dalmat36/efda16c999eb6ff17b66 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
group 'testing' | |
version '1.0-SNAPSHOT' | |
apply plugin: 'groovy' | |
apply plugin: 'java' | |
sourceCompatibility = 1.8 | |
targetCompatibility = 1.8 | |
def mainClassName = 'testing.Hello' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile ( | |
'org.codehaus.groovy:groovy-all:2.3.11', | |
'com.amazonaws:aws-lambda-java-core:1.1.0', | |
'com.amazonaws:aws-lambda-java-events:1.1.0' | |
) | |
testCompile group: 'junit', name: 'junit', version: '4.11' | |
} | |
//Did not work with Lambda | |
/*task buildZip(type: Zip) { | |
from compileGroovy | |
from processResources | |
into('lib') { | |
from configurations.runtime | |
} | |
} | |
build.dependsOn buildZip*/ | |
//Works with Lambda | |
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(), | |
'Main-Class': mainClassName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment