Replace "CompileTimeError" with "Will Not Compile"
This commit is contained in:
parent
69e3fca324
commit
fe1aac1c73
@ -9,9 +9,9 @@ import org.apache.tools.ant.util.TeeOutputStream
|
||||
|
||||
class TaggingPlugin implements Plugin<Project> {
|
||||
private final static String DEBUG_PROJECT_PROPERTY_KEY = 'debug'
|
||||
|
||||
|
||||
void apply(Project project) {
|
||||
boolean debug = project.hasProperty(DEBUG_PROJECT_PROPERTY_KEY) ? Boolean.valueOf(project.getProperty(DEBUG_PROJECT_PROPERTY_KEY)) : false
|
||||
boolean debug = project.hasProperty(DEBUG_PROJECT_PROPERTY_KEY) ? Boolean.valueOf(project.getProperty(DEBUG_PROJECT_PROPERTY_KEY)) : false
|
||||
List createdTasks = []
|
||||
|
||||
project.projectDir.eachFileRecurse { file ->
|
||||
@ -21,7 +21,7 @@ class TaggingPlugin implements Plugin<Project> {
|
||||
if(debug && tags.hasTags()) println tags
|
||||
|
||||
// Exclude java sources that will not compile
|
||||
if (tags.compileTimeError) {
|
||||
if (tags.willNotCompile) {
|
||||
project.sourceSets.main.java.excludes.add(file.name)
|
||||
} else {
|
||||
JavaExec javaTask = null
|
||||
@ -76,9 +76,9 @@ class TaggingPlugin implements Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
project.tasks.create('run') {
|
||||
dependsOn createdTasks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package com.mindviewinc.plugins
|
||||
|
||||
class Tags {
|
||||
Boolean hasMainMethod = false
|
||||
Boolean compileTimeError = false
|
||||
Boolean willNotCompile = false
|
||||
Boolean throwsException = false
|
||||
Boolean errorOutputExpected = false
|
||||
Boolean validateByHand = false
|
||||
@ -33,7 +33,7 @@ class Tags {
|
||||
else
|
||||
args << p
|
||||
}
|
||||
compileTimeError = hasTag('CompileTimeError')
|
||||
willNotCompile = hasTag('WillNotCompile')
|
||||
throwsException = hasTag('ThrowsException')
|
||||
errorOutputExpected = hasTag('ErrorOutputExpected')
|
||||
validateByHand = hasTag('ValidateByHand')
|
||||
@ -68,7 +68,7 @@ class Tags {
|
||||
}
|
||||
}
|
||||
public boolean hasTags() {
|
||||
return compileTimeError ||
|
||||
return willNotCompile ||
|
||||
throwsException ||
|
||||
errorOutputExpected ||
|
||||
validateByHand ||
|
||||
@ -87,7 +87,7 @@ class Tags {
|
||||
}
|
||||
"""
|
||||
hasMainMethod
|
||||
compileTimeError
|
||||
willNotCompile
|
||||
throwsException
|
||||
errorOutputExpected
|
||||
validateByHand
|
||||
@ -105,4 +105,4 @@ class Tags {
|
||||
}
|
||||
result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user