Skip to content
Snippets Groups Projects
Commit 1bd51792 authored by René Schöne's avatar René Schöne
Browse files

Include RagConnect aspects automatically, 0.2.8

parent cc82b5da
No related branches found
No related tags found
No related merge requests found
Pipeline #9492 passed
......@@ -4,7 +4,7 @@ plugins {
}
group 'org.jastadd.preprocessor'
version '0.2.7'
version '0.2.8'
gradlePlugin {
plugins {
......
......@@ -37,6 +37,7 @@ public interface JastAddConfiguration {
return getExtraOptions() != null ? getExtraOptions() : Collections.emptyList();
}
@Optional
@InputFiles
List<File> getInputFiles();
void setInputFiles(List<File> inputFiles);
......
......@@ -18,6 +18,14 @@ public interface RagConnectConfiguration {
String getRootNode();
void setRootNode(String rootNode);
@Input
String getOutputDir();
void setOutputDir(String outputDir);
@InputFiles
List<File> getInputFiles();
void setInputFiles(List<File> inputFiles);
@Optional
@Input
boolean isLogReads();
......@@ -28,10 +36,6 @@ public interface RagConnectConfiguration {
boolean isLogWrites();
void setLogWrites(boolean logWrites);
@Input
String getOutputDir();
void setOutputDir(String outputDir);
@Optional
@Input
boolean isVerbose();
......@@ -41,8 +45,4 @@ public interface RagConnectConfiguration {
@Input
List<String> getProtocols();
void setProtocols(List<String> protocols);
@InputFiles
List<File> getInputFiles();
void setInputFiles(List<File> inputFiles);
}
......@@ -123,6 +123,16 @@ public abstract class RagConnectTest extends RelastTest {
// now run relast + jastadd
getRelast().setInputFiles(grammarFilesGeneratedByRagconnect());
if (getJastadd().getInputFiles() == null) {
getJastadd().setInputFiles(new ArrayList<>());
}
for (File file : aspectFilesGeneratedByRagconnect()) {
if (getJastadd().getInputFiles().contains(file)) {
getLogger().warn("Input file to JastAdd already known: {} - Remove from jastadd.inputFiles!", file);
} else {
getJastadd().getInputFiles().add(file);
}
}
super.runTest();
}
}
......@@ -13,6 +13,8 @@ import java.util.List;
* @author rschoene - Initial contribution
*/
public interface RelastConfiguration {
@Optional
@Input
boolean isUseJastAddNames();
void setUseJastAddNames(boolean useJastAddNames);
......@@ -21,18 +23,20 @@ public interface RelastConfiguration {
String getGrammarName();
void setGrammarName(String grammarName);
@InputFiles
@Optional
@InputFiles
List<File> getInputFiles();
void setInputFiles(List<File> inputFiles);
@Optional
@Input
boolean isWriteToFile(); // = true;
void setWriteToFile(boolean writeToFile);
boolean isNoWriteToFile();
void setNoWriteToFile(boolean noWriteToFile);
@Optional
@Input
boolean isResolverHelper(); // = true;
void setResolverHelper(boolean resolverHelper);
boolean isNoResolverHelper();
void setNoResolverHelper(boolean noResolverHelper);
@Optional
@Input
......@@ -44,7 +48,8 @@ public interface RelastConfiguration {
String getSerializer();
void setSerializer(String serializer);
@Optional
@Input
boolean isVerbose(); // = false;
boolean isVerbose();
void setVerbose(boolean verbose);
}
......@@ -108,13 +108,13 @@ public abstract class RelastTest extends DefaultTask {
args.add(file.getAbsolutePath());
}
args.add("--quiet");
if (getRelast().isWriteToFile()) {
if (!getRelast().isNoWriteToFile()) {
args.add("--file");
}
if (getRelast().isUseJastAddNames()) {
args.add("--useJastAddNames");
}
if (getRelast().isResolverHelper()) {
if (!getRelast().isNoResolverHelper()) {
args.add("--resolverHelper");
}
if (getJastadd().getJastAddList() != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment