forked from smithy-lang/smithy-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
38 lines (30 loc) · 1.11 KB
/
build.gradle.kts
File metadata and controls
38 lines (30 loc) · 1.11 KB
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
description = "Cafe service client"
plugins {
`java-library`
application
// Executes smithy-build process to generate client code
id("software.amazon.smithy.gradle.smithy-base")
}
dependencies {
val smithyJavaVersion: String by project
// === Code generators ===
smithyBuild("software.amazon.smithy.java.codegen:plugins:$smithyJavaVersion")
// === Service model ===
implementation(project(":smithy"))
// === Client Dependencies ===
// Core client dependency required by generated client code.
implementation("software.amazon.smithy.java:client-core:$smithyJavaVersion")
// Add client implementation of `RestJson1` protocol
implementation("software.amazon.smithy.java:aws-client-restjson:$smithyJavaVersion")
}
// Add generated client source code to the main sourceSet
afterEvaluate {
val clientPath = smithy.getPluginProjectionPath(smithy.sourceProjection.get(), "java-client-codegen")
sourceSets.main.get().java.srcDir(clientPath)
}
tasks.named("compileJava") {
dependsOn("smithyBuild")
}
application {
mainClass = "io.smithy.java.client.example.Main"
}