mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-03 05:44:10 -08:00
Add wildcard-based class exclusion from JUnit mojo
This commit is contained in:
parent
e3017828d8
commit
49e6050871
|
@ -101,6 +101,9 @@
|
||||||
<debugInformationGenerated>true</debugInformationGenerated>
|
<debugInformationGenerated>true</debugInformationGenerated>
|
||||||
<sourceMapsGenerated>true</sourceMapsGenerated>
|
<sourceMapsGenerated>true</sourceMapsGenerated>
|
||||||
<sourceFilesCopied>true</sourceFilesCopied>
|
<sourceFilesCopied>true</sourceFilesCopied>
|
||||||
|
<excludeWildcards>
|
||||||
|
<wildcard>**.GC*Test</wildcard>
|
||||||
|
</excludeWildcards>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -83,6 +83,9 @@ public class BuildJavascriptTestMojo extends AbstractMojo {
|
||||||
@Parameter
|
@Parameter
|
||||||
private String[] wildcards = { "**.*Test", "**.*UnitTest" };
|
private String[] wildcards = { "**.*Test", "**.*UnitTest" };
|
||||||
|
|
||||||
|
@Parameter
|
||||||
|
private String[] excludeWildcards = new String[0];
|
||||||
|
|
||||||
@Parameter
|
@Parameter
|
||||||
private boolean minifying = true;
|
private boolean minifying = true;
|
||||||
|
|
||||||
|
@ -150,6 +153,10 @@ public class BuildJavascriptTestMojo extends AbstractMojo {
|
||||||
this.wildcards = wildcards;
|
this.wildcards = wildcards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setExcludeWildcards(String[] excludeWildcards) {
|
||||||
|
this.excludeWildcards = excludeWildcards;
|
||||||
|
}
|
||||||
|
|
||||||
public String[] getTransformers() {
|
public String[] getTransformers() {
|
||||||
return transformers;
|
return transformers;
|
||||||
}
|
}
|
||||||
|
@ -359,6 +366,13 @@ public class BuildJavascriptTestMojo extends AbstractMojo {
|
||||||
if (!matches) {
|
if (!matches) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String wildcard : excludeWildcards) {
|
||||||
|
if (FilenameUtils.wildcardMatch(simpleName, wildcard.replace('.', '/'))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Class<?> candidate = Class.forName(className, true, classLoader);
|
Class<?> candidate = Class.forName(className, true, classLoader);
|
||||||
if (tool.getAdapter().acceptClass(candidate)) {
|
if (tool.getAdapter().acceptClass(candidate)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user