From d6c966dccd3b51aa55bc92d0c7905a6ac02093c2 Mon Sep 17 00:00:00 2001 From: Alexandr Evstigneev Date: Tue, 13 Apr 2021 13:31:12 +0300 Subject: [PATCH] Use compileClasspath instead of compileOnly configuration Fixes #35 --- .../org/jetbrains/grammarkit/tasks/GenerateLexer.groovy | 2 +- .../org/jetbrains/grammarkit/tasks/GenerateParser.groovy | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateLexer.groovy b/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateLexer.groovy index c64fb35..87badf4 100644 --- a/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateLexer.groovy +++ b/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateLexer.groovy @@ -35,7 +35,7 @@ class GenerateLexer extends BaseTask { newArgs.add(flexFile) args(newArgs) - classpath project.configurations.compileOnly.files.findAll({ it.name.startsWith("jflex")}) + classpath project.configurations.compileClasspath.files.findAll({ it.name.startsWith("jflex") }) purgeFiles(targetFile) }) diff --git a/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateParser.groovy b/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateParser.groovy index 88709e1..942d670 100644 --- a/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateParser.groovy +++ b/src/main/groovy/org/jetbrains/grammarkit/tasks/GenerateParser.groovy @@ -35,9 +35,9 @@ class GenerateParser extends BaseTask { "testFramework" ] - classpath project.configurations.compileOnly.files.findAll({ - for(lib in requiredLibs){ - if(it.name.equalsIgnoreCase("${lib}.jar") || it.name.startsWith("${lib}-")){ + classpath project.configurations.compileClasspath.files.findAll({ + for (lib in requiredLibs) { + if (it.name.equalsIgnoreCase("${lib}.jar") || it.name.startsWith("${lib}-")) { return true; } }