-
Notifications
You must be signed in to change notification settings - Fork 59
/
build.gradle.kts
78 lines (60 loc) · 2.37 KB
/
build.gradle.kts
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
plugins {
kotlin("jvm") version "1.5.30"
id("application")
id("java")
id("idea")
// Creates fat JAR
id("com.github.johnrengelman.shadow") version "7.0.0"
}
extensions.findByName("buildScan")?.withGroovyBuilder {
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}
idea.module.isDownloadSources = true
idea.module.isDownloadJavadoc = true
java.toolchain.languageVersion.set(JavaLanguageVersion.of(11))
val gradleDependencyVersion = "7.2"
tasks.wrapper {
gradleVersion = gradleDependencyVersion
distributionType = Wrapper.DistributionType.ALL
}
repositories {
mavenCentral()
mavenLocal()
maven(url = "https://jitpack.io")
maven(url = "https://repo.gradle.org/gradle/libs-releases-local/")
}
application.mainClassName = "not-applicable"
tasks.distZip { enabled = false }
tasks.distTar { enabled = false }
tasks.shadowDistZip { enabled = false }
tasks.shadowDistTar { enabled = false }
tasks.shadowJar {
// AWS Lambda specific - fixes "StatusLogger Unrecognized format specifier [d]" errors, from https://stackoverflow.com/questions/48033792/log4j2-error-statuslogger-unrecognized-conversion-specifier
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer::class.java)
}
// Specify all of our dependency versions
val slf4jVersion = "1.7.32"
val gsonVersion = "2.8.8"
val cborVersion = "4.4.4"
val awsSdk2Version = "2.17.33"
val junitVersion = "4.13.2"
val awsLambdaJavaCoreVersion = "1.2.1"
val vavrVersion = "0.10.4"
val awsCdkVersion = "1.120.0"
val awsCdkConstructsForJavaVersion = "0.16.8"
dependencies {
implementation("io.vavr:vavr:$vavrVersion")
implementation( "com.amazonaws:aws-lambda-java-core:$awsLambdaJavaCoreVersion")
implementation( "software.amazon.awssdk:iot:$awsSdk2Version")
implementation( "software.amazon.awssdk:iotdataplane:$awsSdk2Version")
implementation( "com.google.code.gson:gson:$gsonVersion")
implementation( "com.upokecenter:cbor:$cborVersion")
implementation( "org.slf4j:slf4j-log4j12:$slf4jVersion")
api("com.github.aws-samples:aws-cdk-constructs-for-java:$awsCdkConstructsForJavaVersion")
testImplementation("junit:junit:$junitVersion")
}
task("synth", JavaExec::class) {
classpath = sourceSets["main"].runtimeClasspath
main = "com.awssamples.cbor.CborStack"
}