Skip to content

Bump GE API spec version to 2023.4 #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ org.gradle.caching=true
org.gradle.kotlin.dsl.skipMetadataVersionCheck=false
version=SNAPSHOT
# Must be later than 2022.1
gradle.enterprise.version=2023.3
gradle.enterprise.version=2023.4
group=com.gabrielfeo
artifact=gradle-enterprise-api-kotlin
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.gabrielfeo.gradle.enterprise.api

import com.gabrielfeo.gradle.enterprise.api.model.*
import kotlinx.coroutines.flow.MutableStateFlow
import retrofit2.http.Query

class FakeBuildsApi(
val builds: List<Build>,
Expand All @@ -18,10 +19,11 @@ class FakeBuildsApi(
reverse: Boolean?,
maxBuilds: Int?,
maxWaitSecs: Int?,
query: String?
query: String?,
models: List<BuildModelName>?,
): List<Build> {
getBuildsCallCount.value++
check((reverse ?: maxWaitSecs) == null)
check((reverse ?: maxWaitSecs ?: query ?: models) == null) { "Not supported" }
if ((fromBuild ?: sinceBuild) != null) {
check((since ?: fromInstant) == null) { "Invalid request" }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.time.Duration.Companion.seconds

@OptIn(ExperimentalCoroutinesApi::class)
class MappingTest {

private val api = FakeBuildsApi(
Expand Down
6 changes: 6 additions & 0 deletions library/src/test/resources/gradle-attributes-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@
"taskInputsFileCapturingEnabled": true,
"testOutputCapturingEnabled": true
},
"develocitySettings": {
"backgroundPublicationEnabled": true,
"buildOutputCapturingEnabled": true,
"taskInputsFileCapturingEnabled": true,
"testOutputCapturingEnabled": true
},
"buildOptions": {
"buildCacheEnabled": true,
"configurationCacheEnabled": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import retrofit2.http.Query
*/
interface FakeBuildsApiScaffold : BuildsApi {

override suspend fun getBuild(id: String, availabilityWaitTimeoutSecs: Int?): Build {
override suspend fun getBuild(
id: String,
models: List<BuildModelName>?,
availabilityWaitTimeoutSecs: Int?,
): Build {
TODO("Not yet implemented")
}

Expand All @@ -21,11 +25,26 @@ interface FakeBuildsApiScaffold : BuildsApi {
reverse: Boolean?,
maxBuilds: Int?,
maxWaitSecs: Int?,
query: String?
query: String?,
models: List<BuildModelName>?,
): List<Build> {
TODO("Not yet implemented")
}

override suspend fun getGradleNetworkActivity(
id: String,
availabilityWaitTimeoutSecs: Int?,
): GradleNetworkActivity {
TODO("Not yet implemented")
}

override suspend fun getMavenDependencyResolution(
id: String,
availabilityWaitTimeoutSecs: Int?,
): MavenDependencyResolution {
TODO("Not yet implemented")
}

override suspend fun getGradleAttributes(
id: String,
availabilityWaitTimeoutSecs: Int?,
Expand Down