-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathbuild.gradle
84 lines (67 loc) · 2.43 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
plugins {
id 'java'
id 'application'
id 'idea'
// Creates fat JAR
id 'com.github.johnrengelman.shadow' version '7.0.0'
// Adds dependencyUpdates task
id 'com.github.ben-manes.versions' version '0.39.0'
}
distZip.enabled = shadowDistZip.enabled = false
distTar.enabled = shadowDistTar.enabled = false
// Required by shadow but not necessary
mainClassName = 'not-necessary'
group = 'CDDBenchmarkJava'
version = '1.0-SNAPSHOT'
description = """"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
def gradleDependencyVersion = '6.8.1'
wrapper {
gradleVersion = gradleDependencyVersion
distributionType = Wrapper.DistributionType.ALL
}
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://jitpack.io' }
}
// Guidance from: https://stackoverflow.com/questions/23446233/compile-jar-from-url-in-gradle
def githubJar = { organization, module, revision, name ->
File file = new File("$buildDir/libs/${name}.jar")
file.parentFile.mkdirs()
if (!file.exists()) {
def url = "https://github.com/$organization/$module/raw/v$revision/sdk/GreengrassJavaSDK.jar"
new URL(url).withInputStream { downloadStream ->
file.withOutputStream { fileOut ->
fileOut << downloadStream
}
}
}
files(file.absolutePath)
}
def awsGreengrassCoreSdkJava = '1.4.1'
def cddVersion = '0.8.74'
def gsonVersion = '2.8.7'
def slf4jVersion = '2.0.0-alpha1'
def awsSdkVersion = '1.12.8'
def jacksonVersion = '2.11.3'
def awsLambdaJavaCoreVersion = '1.2.1'
def daggerVersion = '2.37'
dependencies {
implementation githubJar('aws', 'aws-greengrass-core-sdk-java', awsGreengrassCoreSdkJava, 'GreengrassJavaSDK')
compile "com.github.aws-samples:aws-greengrass-lambda-functions:$cddVersion"
// Dagger code generation
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
// Dependency injection with Dagger
compile "com.google.dagger:dagger:$daggerVersion"
compile "com.google.code.gson:gson:$gsonVersion"
compile "org.slf4j:slf4j-jdk14:$slf4jVersion"
compile "com.amazonaws:aws-java-sdk-core:$awsSdkVersion"
compile "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile "com.amazonaws:aws-lambda-java-core:$awsLambdaJavaCoreVersion"
}