Skip to content

Commit cfab41d

Browse files
authored
chore: fix gradle build and update ci (#281)
1 parent a9175be commit cfab41d

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
paths-ignore:
9+
- 'docs/**'
10+
- '*.md'
811
workflow_dispatch:
912

1013
env:
11-
BUILDER_VERSION: v0.8.0
14+
BUILDER_VERSION: v0.8.22
1215
BUILDER_SOURCE: releases
1316
# host owned by CRT team to host aws-crt-builder releases. Contact their on-call with any issues
1417
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Generated sources are not checked into the repository, you first have to generat
3333

3434

3535
```sh
36-
./gradlew :codegen:sdk:bootstrap
36+
./gradlew --no-daemon :codegen:sdk:bootstrap
3737
```
3838

3939
NOTE: This task will respect the AWS services specified by project properties. See options below.
@@ -56,7 +56,7 @@ To see list of all projects run `./gradlew projects`
5656
See the [Build Properties](#build-properties) below to specify this in a config file.
5757

5858
```sh
59-
./gradlew -Paws.services=+lambda :codegen:sdk:bootstrap
59+
./gradlew --no-daemon -Paws.services=+lambda :codegen:sdk:bootstrap
6060
```
6161

6262
##### Testing Locally

builder.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"gradlew": "{source_dir}/gradlew -p {source_dir}"
77
},
88
"build_steps": [
9-
"{gradlew} -x test -x jvmTest -x allTests build"
9+
"{gradlew} assemble"
1010
],
1111
"test_steps": [
1212
"{gradlew} publishToMavenLocal",

codegen/protocol-tests/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ tasks["clean"].doFirst {
6262
delete("smithy-build.json")
6363
}
6464

65-
tasks.create<SmithyBuild>("buildSdk") {
65+
tasks.create<SmithyBuild>("generateSdk") {
66+
group = "codegen"
6667
// ensure the generated clients use the same version of the runtime as the aws aws-runtime
6768
val smithyKotlinVersion: String by project
6869
doFirst {
@@ -71,13 +72,12 @@ tasks.create<SmithyBuild>("buildSdk") {
7172
addRuntimeClasspath = true
7273
dependsOn(tasks["generateSmithyBuild"])
7374
inputs.file(projectDir.resolve("smithy-build.json"))
75+
// ensure smithy-aws-kotlin-codegen is up to date
76+
inputs.files(configurations.compileClasspath)
7477
}
7578

76-
// Run the `buildSdk` automatically.
77-
tasks["build"].finalizedBy(tasks["buildSdk"])
78-
7979
// force rebuild every time while developing
80-
tasks["buildSdk"].outputs.upToDateWhen { false }
80+
tasks["generateSdk"].outputs.upToDateWhen { false }
8181

8282
data class ProtocolTest(val projectionName: String, val serviceShapeId: String) {
8383
val packageName: String
@@ -173,7 +173,7 @@ open class ProtocolTestTask : DefaultTask() {
173173

174174
enabledProtocols.forEach {
175175
tasks.register<ProtocolTestTask>("testProtocol-${it.projectionName}") {
176-
dependsOn(tasks.build)
176+
dependsOn(tasks["generateSdk"])
177177
group = "Verification"
178178
protocol = it.projectionName
179179
plugin = "kotlin-codegen"

codegen/sdk/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ tasks.create<SmithyBuild>("generateSdk") {
276276
addRuntimeClasspath = true
277277
dependsOn(tasks["generateSmithyBuild"])
278278
inputs.file(projectDir.resolve("smithy-build.json"))
279+
// ensure smithy-aws-kotlin-codegen is up to date
280+
inputs.files(configurations.compileClasspath)
279281
}
280282

281283
// Remove generated model file for clean

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kotlin.native.ignoreDisabledTargets=true
44

55
# gradle
66
# FIXME - see https://github.com/Kotlin/dokka/issues/1405
7-
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1G
7+
org.gradle.jvmargs=-Xmx6g -XX:MaxPermSize=6g -XX:MaxMetaspaceSize=1G
88

99
# sdk
1010
sdkVersion=0.4.0-SNAPSHOT

0 commit comments

Comments
 (0)