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>
|
||||
<sourceMapsGenerated>true</sourceMapsGenerated>
|
||||
<sourceFilesCopied>true</sourceFilesCopied>
|
||||
<excludeWildcards>
|
||||
<wildcard>**.GC*Test</wildcard>
|
||||
</excludeWildcards>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -83,6 +83,9 @@ public class BuildJavascriptTestMojo extends AbstractMojo {
|
|||
@Parameter
|
||||
private String[] wildcards = { "**.*Test", "**.*UnitTest" };
|
||||
|
||||
@Parameter
|
||||
private String[] excludeWildcards = new String[0];
|
||||
|
||||
@Parameter
|
||||
private boolean minifying = true;
|
||||
|
||||
|
@ -150,6 +153,10 @@ public class BuildJavascriptTestMojo extends AbstractMojo {
|
|||
this.wildcards = wildcards;
|
||||
}
|
||||
|
||||
public void setExcludeWildcards(String[] excludeWildcards) {
|
||||
this.excludeWildcards = excludeWildcards;
|
||||
}
|
||||
|
||||
public String[] getTransformers() {
|
||||
return transformers;
|
||||
}
|
||||
|
@ -359,6 +366,13 @@ public class BuildJavascriptTestMojo extends AbstractMojo {
|
|||
if (!matches) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (String wildcard : excludeWildcards) {
|
||||
if (FilenameUtils.wildcardMatch(simpleName, wildcard.replace('.', '/'))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Class<?> candidate = Class.forName(className, true, classLoader);
|
||||
if (tool.getAdapter().acceptClass(candidate)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user