From 8610089bda140942ebd80394fc254cb55a2a1ff3 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Thu, 18 Apr 2024 10:30:59 +0100 Subject: [PATCH] scalafmt --- .../main/scala/SemanticdbGradlePlugin.scala | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/semanticdb-gradle-plugin/src/main/scala/SemanticdbGradlePlugin.scala b/semanticdb-gradle-plugin/src/main/scala/SemanticdbGradlePlugin.scala index 5d50d20b..5bbf53c8 100644 --- a/semanticdb-gradle-plugin/src/main/scala/SemanticdbGradlePlugin.scala +++ b/semanticdb-gradle-plugin/src/main/scala/SemanticdbGradlePlugin.scala @@ -11,6 +11,7 @@ import com.sourcegraph.scip_java.BuildInfo import org.gradle.api.DefaultTask import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration import org.gradle.api.artifacts.component.ModuleComponentIdentifier import org.gradle.api.provider.Property import org.gradle.api.publish.PublishingExtension @@ -19,8 +20,6 @@ import org.gradle.api.tasks.SourceSetContainer import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.compile.JavaCompile import org.gradle.api.tasks.scala.ScalaCompile -import org.gradle.api.artifacts.Configuration -import org.gradle.api.artifacts.dsl.DependencyHandler class SemanticdbGradlePlugin extends Plugin[Project] { import Logging._ @@ -80,17 +79,17 @@ class SemanticdbGradlePlugin extends Plugin[Project] { val compilerPluginAdded = try { - project.getDependencies().add("compileOnly", javacPluginDep) + project.getDependencies().add("compileOnly", javacPluginDep) - if (hasAnnotationPath) { - project - .getDependencies() - .add("annotationProcessor", javacPluginDep) - } + if (hasAnnotationPath) { + project + .getDependencies() + .add("annotationProcessor", javacPluginDep) + } - project.getDependencies().add("testCompileOnly", javacPluginDep) + project.getDependencies().add("testCompileOnly", javacPluginDep) - true + true } catch { case exc: Exception => // If the `compileOnly` configuration has already been evaluated