Skip to content

Commit

Permalink
refactor(bazel): Nest an internal data class for better grouping
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Aug 10, 2024
1 parent c2ff612 commit 2274638
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/package-managers/bazel/src/main/kotlin/BazelModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ internal data class Lockfile(
}
}

@Serializable
data class Flags(
val cmdRegistries: List<String>
)

/**
* Return a collection with the URLs of the service registries defined for this project in case the model for
* Bazel < 7.2.0 is used.
*/
fun registryUrls(): Collection<String> = flags?.cmdRegistries.orEmpty()
}

@Serializable
internal data class Flags(
val cmdRegistries: List<String>
)

internal fun parseLockfile(lockfile: File) = json.decodeFromString<Lockfile>(lockfile.readText())

/**
Expand Down

0 comments on commit 2274638

Please sign in to comment.