Skip to content

Commit

Permalink
Try to fix launcher for compiled jar file
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Mar 20, 2024
1 parent 67a619b commit 66f234a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ tasks.register("generateBstGrammarSource", JavaExec) {
description = 'Generates BstLexer.java and BstParser.java from the Bst.g grammar file using antlr4.'
classpath = configurations.antlr4
mainClass = "org.antlr.v4.Tool"
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))

inputs.dir('src/main/antlr4/org/jabref/bst/')
outputs.dir("src-gen/main/java/org/jabref/logic/bst/")
Expand All @@ -331,6 +332,7 @@ tasks.register("generateSearchGrammarSource", JavaExec) {
description = "Generates java files for Search.g antlr4."
classpath = configurations.antlr4
mainClass = "org.antlr.v4.Tool"
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))

inputs.dir("src/main/antlr4/org/jabref/search/")
outputs.dir("src-gen/main/java/org/jabref/search/")
Expand All @@ -342,19 +344,21 @@ tasks.register("generateJournalListMV", JavaExec) {
description = "Converts the comma-separated journal abbreviation file to a H2 MVStore"
classpath = sourceSets.main.runtimeClasspath
mainClass = "org.jabref.cli.JournalListMvGenerator"
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
onlyIf {
!file("build/resources/main/journals/journal-list.mv").exists()
}
}

tasks.register("generatePredatoryJournalListMV", JavaExec) {
group = "JabRef"
description = "Load predatory journal information from online sources to a H2 MVStore"
classpath = sourceSets.main.runtimeClasspath
mainClass = "org.jabref.cli.PredatoryJournalsMvGenerator"
onlyIf {
!file("build/resources/main/journals/predatory-journals.mv").exists()
}
group = "JabRef"
description = "Load predatory journal information from online sources to a H2 MVStore"
classpath = sourceSets.main.runtimeClasspath
mainClass = "org.jabref.cli.PredatoryJournalsMvGenerator"
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
onlyIf {
!file("build/resources/main/journals/predatory-journals.mv").exists()
}
}

jar.dependsOn("generateJournalListMV", "generatePredatoryJournalListMV")
Expand Down

0 comments on commit 66f234a

Please sign in to comment.