Propagate min and max sdk versions to classpaths.proto configs.

These attributed define a range for dessert releases where the jars
should be active, and included in corresponding CLASSPATH varibles by
derive_classpath.

Bug: 190818041
Test: presubmit
Change-Id: Ieb9aef29657ad0694d48a63019f93faca2678252
This commit is contained in:
satayev
2021-11-30 12:33:55 +00:00
parent 0a420e771a
commit cca4ab762e
3 changed files with 53 additions and 7 deletions

View File

@@ -765,6 +765,16 @@ func (c *config) PreviewApiLevels() []ApiLevel {
return levels
}
func (c *config) LatestPreviewApiLevel() ApiLevel {
level := NoneApiLevel
for _, l := range c.PreviewApiLevels() {
if l.GreaterThan(level) {
level = l
}
}
return level
}
func (c *config) AllSupportedApiLevels() []ApiLevel {
var levels []ApiLevel
levels = append(levels, c.FinalApiLevels()...)