-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a method call to fetch the available build variants from the server. Affects AdoptOpenJDK/openjdk-api#45 Fix #1
- Loading branch information
Showing
13 changed files
with
393 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
com.io7m.adoptopenjdk.spi/src/main/java/com/io7m/adoptopenjdk/spi/AOVariantType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright © 2018 Mark Raynsford <code@io7m.com> http://io7m.com | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR | ||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
package com.io7m.adoptopenjdk.spi; | ||
|
||
import org.immutables.value.Value; | ||
|
||
/** | ||
* A build variant (such as {@code "openjdk8"}). | ||
*/ | ||
|
||
@ImmutableStyleType | ||
@Value.Immutable | ||
public interface AOVariantType | ||
{ | ||
/** | ||
* @return A variant identifier such as {@code "openjdk8"}. | ||
*/ | ||
|
||
@Value.Parameter | ||
String name(); | ||
|
||
/** | ||
* @return A humanly-readable description of the variant (such as {@code "OpenJDK 8 with Hotspot"}) | ||
*/ | ||
|
||
@Value.Parameter | ||
String description(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
com.io7m.adoptopenjdk.tests/src/test/resources/com/io7m/adoptopenjdk/tests/v1/variants.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"name": "OpenJDK 8 with Hotspot", | ||
"variant": "openjdk8" | ||
}, | ||
{ | ||
"name": "OpenJDK 8 with Eclipse OpenJ9", | ||
"variant": "openjdk8-openj9" | ||
}, | ||
{ | ||
"name": "OpenJDK 9 with Hotspot", | ||
"variant": "openjdk9" | ||
}, | ||
{ | ||
"name": "OpenJDK 9 with Eclipse OpenJ9", | ||
"variant": "openjdk9-openj9" | ||
}, | ||
{ | ||
"name": "OpenJDK 10 with Hotspot", | ||
"variant": "openjdk10" | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
....adoptopenjdk.tests/src/test/resources/com/io7m/adoptopenjdk/tests/v1/variants_bad_0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
"name": "OpenJDK 8 with Hotspot" | ||
}, | ||
{ | ||
"variant": "openjdk8-openj9" | ||
} | ||
] |
1 change: 1 addition & 0 deletions
1
....adoptopenjdk.tests/src/test/resources/com/io7m/adoptopenjdk/tests/v1/variants_bad_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[ |
29 changes: 29 additions & 0 deletions
29
...optopenjdk.tests/src/test/resources/com/io7m/adoptopenjdk/tests/v1/variants_warnings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[ | ||
{ | ||
"name": "OpenJDK 8 with Hotspot", | ||
"extra": "ignore me", | ||
"variant": "openjdk8" | ||
}, | ||
{ | ||
"name": "OpenJDK 8 with Eclipse OpenJ9", | ||
"variant": "openjdk8-openj9", | ||
"extra": { | ||
|
||
} | ||
}, | ||
{ | ||
"extra": [ | ||
"123" | ||
], | ||
"name": "OpenJDK 9 with Hotspot", | ||
"variant": "openjdk9" | ||
}, | ||
{ | ||
"name": "OpenJDK 9 with Eclipse OpenJ9", | ||
"variant": "openjdk9-openj9" | ||
}, | ||
{ | ||
"name": "OpenJDK 10 with Hotspot", | ||
"variant": "openjdk10" | ||
} | ||
] |
Oops, something went wrong.