Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9706bfa

Browse files
committed
Added support for // {NewFeature} tag for features newer than Java 8
1 parent 816c30e commit 9706bfa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

buildSrc/src/main/groovy/com/mindviewinc/plugins/TaggingPlugin.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class TaggingPlugin implements Plugin<Project> {
2626

2727
// Exclude java sources that will not compile
2828
if (tags.willNotCompile
29+
|| tags.newFeature // Uses a feature introduced after Java 8
2930
|| (tags.lowLevelAppendix && runningInAppveyor) // Exclude entire lowlevel appendix
3031
|| (tags.excludeFromAppveyorCI && runningInAppveyor)
3132
|| (tags.excludeFromTravisCI && runningInTravis)

buildSrc/src/main/groovy/com/mindviewinc/plugins/Tags.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Tags {
1010
Boolean throwsException = false
1111
Boolean errorOutputExpected = false
1212
Boolean excludeFromGradle = false
13+
Boolean newFeature = false // For language feature introduced after Java 8
1314
Boolean ignoreOutput = false // This tag isn't used in the build...
1415
String fileRoot
1516
String mainClass
@@ -45,6 +46,7 @@ class Tags {
4546
throwsException = hasTag('ThrowsException')
4647
errorOutputExpected = hasTag('ErrorOutputExpected')
4748
excludeFromGradle = hasTag('ExcludeFromGradle')
49+
newFeature = hasTag('NewFeature')
4850
ignoreOutput = hasTag('IgnoreOutput')
4951
javap = extract('javap') // Includes only arguments to command
5052
runFirst = extract('RunFirst:')
@@ -83,6 +85,7 @@ class Tags {
8385
throwsException ||
8486
errorOutputExpected ||
8587
excludeFromGradle ||
88+
newFeature ||
8689
ignoreOutput ||
8790
javaCmd ||
8891
args ||
@@ -105,6 +108,7 @@ class Tags {
105108
throwsException
106109
errorOutputExpected
107110
excludeFromGradle
111+
newFeature
108112
ignoreOutput
109113
fileRoot
110114
mainClass

0 commit comments

Comments
 (0)