Skip to content

Commit ae273f0

Browse files
committed
fix gradle build not being isolatable from incorrect provider usage
1 parent 9d136c4 commit ae273f0

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: gradle/actions/setup-gradle@v5
2222

2323
- name: Build with Gradle
24-
run: ./gradlew build --no-daemon --no-configuration-cache --stacktrace --info
24+
run: ./gradlew build --no-daemon
2525
checkstyle:
2626
runs-on: ubuntu-latest
2727
steps:
@@ -35,4 +35,4 @@ jobs:
3535
uses: gradle/actions/setup-gradle@v5
3636

3737
- name: Run Checkstyle
38-
run: ./gradlew checkstyleMain checkstyleTest --no-daemon --no-configuration-cache
38+
run: ./gradlew checkstyleMain checkstyleTest --no-daemon

build.gradle.kts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ plugins {
1414

1515
version = "0.1.0"
1616
group = "org.developerden"
17+
val challengesOpenApiSpec: Provider<RegularFile> = layout.buildDirectory.file("openapi/challenges-openapi.yaml")
1718

1819
repositories {
1920
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
@@ -116,15 +117,10 @@ micronaut {
116117
optimizeNetty.set(true)
117118
}
118119

119-
val provider: Provider<RegularFile> = project.provider {
120-
121-
RegularFile { downloadChallengesServiceOpenApi.get().outputFiles[0] }
122-
}
123-
124120
openapi {
125121
client(
126122
"challenges-service",
127-
provider
123+
challengesOpenApiSpec
128124
) {
129125
apiPackageName = "org.developerden.codosseum.challenges.client.api"
130126
modelPackageName = "org.developerden.codosseum.challenges.client.model"
@@ -133,9 +129,10 @@ micronaut {
133129
}
134130
}
135131

132+
136133
val downloadChallengesServiceOpenApi by tasks.registering(Download::class) {
137134
src("https://raw.githubusercontent.com/codosseum-org/challenges-service/refs/heads/openapi/openapi.yaml")
138-
dest(layout.buildDirectory.dir("openapi"))
135+
dest(challengesOpenApiSpec)
139136
overwrite(true)
140137
onlyIfModified(false)
141138
}

0 commit comments

Comments
 (0)