4 4 |
|
5 5 | kotlin {
|
6 6 | sourceSets {
|
7 7 | commonMain {
|
8 8 | dependencies {
|
9 9 | implementation("aws.smithy.kotlin:aws-credentials:1.3.13-SNAPSHOT")
|
10 10 | implementation(project(":aws-runtime:aws-http"))
|
11 11 | implementation("aws.smithy.kotlin:aws-json-protocols:1.3.13-SNAPSHOT")
|
12 12 | implementation("aws.smithy.kotlin:aws-protocol-core:1.3.13-SNAPSHOT")
|
13 13 | implementation("aws.smithy.kotlin:aws-signing-common:1.3.13-SNAPSHOT")
|
14 14 | implementation("aws.smithy.kotlin:aws-signing-default:1.3.13-SNAPSHOT")
|
15 15 | implementation("aws.smithy.kotlin:http:1.3.13-SNAPSHOT")
|
16 16 | implementation("aws.smithy.kotlin:http-auth:1.3.13-SNAPSHOT")
|
17 17 | implementation("aws.smithy.kotlin:http-auth-aws:1.3.13-SNAPSHOT")
|
18 18 | implementation("aws.smithy.kotlin:http-client-engine-default:1.3.13-SNAPSHOT")
|
19 19 | implementation("aws.smithy.kotlin:identity-api:1.3.13-SNAPSHOT")
|
20 20 | implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.10")
|
21 21 | implementation("aws.smithy.kotlin:serde:1.3.13-SNAPSHOT")
|
22 22 | implementation("aws.smithy.kotlin:serde-json:1.3.13-SNAPSHOT")
|
23 23 | implementation("aws.smithy.kotlin:telemetry-defaults:1.3.13-SNAPSHOT")
|
24 24 | api(project(":aws-runtime:aws-config"))
|
25 25 | api(project(":aws-runtime:aws-core"))
|
26 26 | api(project(":aws-runtime:aws-endpoint"))
|
27 27 | api("aws.smithy.kotlin:http-client:1.3.13-SNAPSHOT")
|
28 28 | api("aws.smithy.kotlin:runtime-core:1.3.13-SNAPSHOT")
|
29 29 | api("aws.smithy.kotlin:smithy-client:1.3.13-SNAPSHOT")
|
30 30 | api("aws.smithy.kotlin:telemetry-api:1.3.13-SNAPSHOT")
|
31 31 | }
|
32 32 | }
|
33 33 | }
|
34 + |
|
35 + | jvm {
|
36 + | compilations {
|
37 + | val mainPath = getByName("main").output.classesDirs
|
38 + | val testPath = getByName("test").output.classesDirs
|
39 + | tasks {
|
40 + | register<Jar>("smokeTestJar") {
|
41 + | description = "Creates smoke tests jar"
|
42 + | group = "application"
|
43 + | dependsOn(build)
|
44 + | mustRunAfter(build)
|
45 + | manifest {
|
46 + | attributes["Main-Class"] = "aws.sdk.kotlin.services.codebuild.smoketests.SmokeTestsKt"
|
47 + | }
|
48 + | val runtimePath = configurations.getByName("jvmRuntimeClasspath").map { if (it.isDirectory) it else zipTree(it) }
|
49 + | duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
50 + | from(runtimePath, mainPath, testPath)
|
51 + | archiveBaseName.set("${project.name}-smoketests")
|
52 + | }
|
53 + | }
|
54 + | }
|
55 + | }
|
56 + |
|
57 + | tasks.register<JavaExec>("smokeTest") {
|
58 + | description = "Runs smoke tests jar"
|
59 + | group = "verification"
|
60 + | dependsOn(tasks.getByName("smokeTestJar"))
|
61 + | mustRunAfter(tasks.getByName("smokeTestJar"))
|
62 + |
|
63 + | val sdkVersion: String by project
|
64 + | val jarFile = file("build/libs/${project.name}-smoketests-$sdkVersion.jar")
|
65 + | classpath = files(jarFile)
|
66 + | }
|
34 67 | }
|