• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
<lambda>null17 plugins { kotlin("jvm") version "1.8.22" }
18 
<lambda>null19 repositories {
20   mavenLocal()
21   mavenCentral()
22 }
23 
24 val ktfmtVersion = rootProject.file("../stable_version.txt").readText().trim()
25 
<lambda>null26 dependencies {
27   implementation("com.facebook:ktfmt:$ktfmtVersion")
28   implementation(platform("software.amazon.awssdk:bom:2.10.73"))
29   implementation("software.amazon.awssdk:lambda")
30   implementation("com.amazonaws:aws-lambda-java-core:1.2.1")
31   implementation("com.amazonaws:aws-lambda-java-events:2.2.9")
32   implementation("com.google.code.gson:gson:2.8.6")
33   testImplementation(kotlin("test-junit"))
34 }
35 
<lambda>null36 kotlin { jvmToolchain(11) }
37 
<lambda>null38 tasks {
39   test { useJUnit() }
40 
41   val packageFat by
42       creating(Zip::class) {
43         from(compileKotlin)
44         from(processResources)
45         into("lib") { from(configurations.runtimeClasspath) }
46         dirMode = 0b111101101 // 0755
47         fileMode = 0b111101101 // 0755
48       }
49 
50   val packageLibs by
51       creating(Zip::class) {
52         into("java/lib") { from(configurations.runtimeClasspath) }
53         dirMode = 0b111101101 // 0755
54         fileMode = 0b111101101 // 0755
55       }
56 
57   val packageSkinny by
58       creating(Zip::class) {
59         from(compileKotlin)
60         from(processResources)
61       }
62 
63   build { dependsOn(packageSkinny) }
64 }
65