From e7d37b5827fa804b6b28e8cb577d913119cdf319 Mon Sep 17 00:00:00 2001 From: Brian Schlining Date: Tue, 19 Jan 2016 09:55:24 -0800 Subject: [PATCH] Updated to more current plugins. It now works correctly with projects that use sbt-scalariform > 1.4.0 --- .../org/netbeans/nbsbt/core/NetBeans.scala | 245 ++++++++++-------- .../netbeans/nbsbt/core/NetBeansPlugin.scala | 57 ++-- .../nbsbt/core/NetBeansSDTConfig.scala | 3 +- .../org/netbeans/nbsbt/core/package.scala | 2 +- .../nbsbt/plugin/NetBeansPlugin.scala | 4 +- project/Build.scala | 2 +- project/build.properties | 2 +- project/maven.sbt | 1 + project/plugins.sbt | 8 +- version.sbt | 2 +- 10 files changed, 196 insertions(+), 130 deletions(-) create mode 100644 project/maven.sbt diff --git a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeans.scala b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeans.scala index b08eb5a..870c655 100644 --- a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeans.scala +++ b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeans.scala @@ -28,7 +28,7 @@ import NetBeansPlugin.{ NetBeansExecutionEnvironment, NetBeansKeys } -import java.io.{ FileWriter, Writer } +import java.io.{FileWriter, Writer} import java.util.Properties import sbt.{ Attributed, @@ -54,9 +54,9 @@ import sbt.{ richFile } import sbt.complete.Parser -import scala.xml.{ Node, PrettyPrinter } -import scala.xml.transform.{ RewriteRule, RuleTransformer } -import scalaz.{ Failure, NonEmptyList, Success } +import scala.xml.{Node, PrettyPrinter} +import scala.xml.transform.{RewriteRule, RuleTransformer} +import scalaz.{Failure, NonEmptyList, Success} import scalariform.formatter.preferences.PreferenceDescriptor import scalaz.Scalaz._ import scalaz.effect._ @@ -108,15 +108,17 @@ private object NetBeans extends NetBeansSDTConfig { (args get SkipParents).asInstanceOf[Option[Boolean]] getOrElse skipParents(ThisBuild, state), (args get WithSource).asInstanceOf[Option[Boolean]], (args get GenNetBeans).asInstanceOf[Option[Boolean]] getOrElse true, - state).fold(onFailure(state), onSuccess(state)) + state + ).fold(onFailure(state), onSuccess(state)) } def handleProjects( executionEnvironmentArg: Option[NetBeansExecutionEnvironment.Value], - skipParents: Boolean, - withSourceArg: Option[Boolean], - genNetBeans: Boolean, - state: State): Validation[IO[Seq[String]]] = { + skipParents: Boolean, + withSourceArg: Option[Boolean], + genNetBeans: Boolean, + state: State + ): Validation[IO[Seq[String]]] = { val effects = for { ref <- structure(state).allProjectRefs project <- Project.getProject(ref, structure(state)) if !skip(ref, project, skipParents, state) @@ -144,7 +146,8 @@ private object NetBeans extends NetBeansSDTConfig { relativizeLibs(ref, state), builderAndNatures(projectFlavor(ref, state)), genNetBeans, - state)( + state + )( classpathEntryTransformer, classpathTransformers, projectTransformers, @@ -157,7 +160,8 @@ private object NetBeans extends NetBeansSDTConfig { scalariformPreferences, externalDependencies, projectDependencies, - projectAggregate) + projectAggregate + ) } } effects.toList.sequence[Validation, IO[String]].map((list: List[IO[String]]) => list.toStream.sequence.map(_.toList)) @@ -179,7 +183,8 @@ private object NetBeans extends NetBeansSDTConfig { def onFailure(state: State)(errors: NonEmptyList[String]): State = { state.log.error( - "Could not create NetBeans project files:%s%s".format(NewLine, errors.list mkString NewLine)) + "Could not create NetBeans project files:%s%s".format(NewLine, errors.list mkString NewLine) + ) state } @@ -191,7 +196,9 @@ private object NetBeans extends NetBeansSDTConfig { state.log.info( "Successfully created NetBeans project files for project(s):%s%s".format( NewLine, - names mkString NewLine)) + names mkString NewLine + ) + ) state } @@ -200,31 +207,34 @@ private object NetBeans extends NetBeansSDTConfig { def mapConfigurations[A]( configurations: Seq[Configuration], - f: Configuration => Validation[Seq[A]]): Validation[List[(Configuration, Seq[A])]] = { + f: Configuration => Validation[Seq[A]] + ): Validation[List[(Configuration, Seq[A])]] = { def scoped(c: Configuration): Validation[(Configuration, Seq[A])] = f(c) fold (e => Failure(e), s => Success((c, s.distinct))) (configurations map scoped).toList.sequence } def handleProject( - jreContainer: String, - preTasks: Seq[(TaskKey[_], ProjectRef)], - relativizeLibs: Boolean, + jreContainer: String, + preTasks: Seq[(TaskKey[_], ProjectRef)], + relativizeLibs: Boolean, builderAndNatures: (String, Seq[String]), - genNetBeans: Boolean, - state: State)( - classpathEntryTransformer: Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry], - classpathTransformers: Seq[RewriteRule], - projectTransformers: Seq[RewriteRule], - name: String, - projectId: String, - buildDirectory: File, - baseDirectory: File, - srcDirectories: Seq[(Configuration, Seq[(File, File, Boolean)])], - scalacOptions: Seq[(String, String)], - scalariformPreferences: Seq[(Configuration, Seq[(PreferenceDescriptor[_], Any)])], - externalDependencies: Seq[(Configuration, Seq[Lib])], - projectDependencies: Seq[(Configuration, Seq[Prj])], - projectAggregate: Seq[Prj]): IO[String] = { + genNetBeans: Boolean, + state: State + )( + classpathEntryTransformer: Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry], + classpathTransformers: Seq[RewriteRule], + projectTransformers: Seq[RewriteRule], + name: String, + projectId: String, + buildDirectory: File, + baseDirectory: File, + srcDirectories: Seq[(Configuration, Seq[(File, File, Boolean)])], + scalacOptions: Seq[(String, String)], + scalariformPreferences: Seq[(Configuration, Seq[(PreferenceDescriptor[_], Any)])], + externalDependencies: Seq[(Configuration, Seq[Lib])], + projectDependencies: Seq[(Configuration, Seq[Prj])], + projectAggregate: Seq[Prj] + ): IO[String] = { for { _ <- executePreTasks(preTasks, state) n <- io(name) @@ -244,7 +254,8 @@ private object NetBeans extends NetBeansSDTConfig { jreContainer, scalariformPreferences, genNetBeans, - state) + state + ) _ <- if (genNetBeans) saveXml(baseDirectory / ".classpath_nb", cp) else saveXml(baseDirectory / ".classpath", new RuleTransformer(classpathTransformers: _*)(cp)) _ <- if (genNetBeans) io(()) else saveProperties(baseDirectory / ".settings" / "org.scala-ide.sdt.core.prefs", scalacOptions) } yield n @@ -295,19 +306,20 @@ private object NetBeans extends NetBeansSDTConfig { def classpath( classpathEntryTransformer: Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry], - name: String, - projectId: String, - buildDirectory: File, - baseDirectory: File, - relativizeLibs: Boolean, - srcDirectories: Seq[(Configuration, Seq[(File, File, Boolean)], Seq[(File, String, File, Boolean)])], - externalDependencies: Seq[(Configuration, Seq[Lib])], - projectDependencies: Seq[(Configuration, Seq[Prj])], - projectAggregate: Seq[Prj], - jreContainer: String, - scalariformPreferences: Seq[(Configuration, Seq[(PreferenceDescriptor[_], Any)])], - genNetBeans: Boolean, - state: State): IO[Node] = { + name: String, + projectId: String, + buildDirectory: File, + baseDirectory: File, + relativizeLibs: Boolean, + srcDirectories: Seq[(Configuration, Seq[(File, File, Boolean)], Seq[(File, String, File, Boolean)])], + externalDependencies: Seq[(Configuration, Seq[Lib])], + projectDependencies: Seq[(Configuration, Seq[Prj])], + projectAggregate: Seq[Prj], + jreContainer: String, + scalariformPreferences: Seq[(Configuration, Seq[(PreferenceDescriptor[_], Any)])], + genNetBeans: Boolean, + state: State + ): IO[Node] = { val srcEntriesIoSeq = for ((config, dirs, links) <- srcDirectories; (dir, output, managed) <- dirs) yield srcEntry(config, baseDirectory, dir, output, managed, genNetBeans, state) val srcLinkEntriesIoSeq = @@ -329,47 +341,53 @@ private object NetBeans extends NetBeansSDTConfig { } def srcLink( - config: Configuration, - baseDirectory: File, - linkedDir: File, - linkName: String, + config: Configuration, + baseDirectory: File, + linkedDir: File, + linkName: String, classDirectory: File, - managed: Boolean, - genNetBeans: Boolean, - state: State): IO[NetBeansClasspathEntry.Link] = + managed: Boolean, + genNetBeans: Boolean, + state: State + ): IO[NetBeansClasspathEntry.Link] = io { if (!linkedDir.exists && !genNetBeans) linkedDir.mkdirs() NetBeansClasspathEntry.Link( config.name, linkName, relativize(baseDirectory, classDirectory), - managed) + managed + ) } def srcEntry( - config: Configuration, - baseDirectory: File, - srcDirectory: File, + config: Configuration, + baseDirectory: File, + srcDirectory: File, classDirectory: File, - managed: Boolean, - genNetBeans: Boolean, - state: State): IO[NetBeansClasspathEntry.Src] = + managed: Boolean, + genNetBeans: Boolean, + state: State + ): IO[NetBeansClasspathEntry.Src] = io { if (!srcDirectory.exists() && !genNetBeans) srcDirectory.mkdirs() NetBeansClasspathEntry.Src( config.name, relativize(baseDirectory, srcDirectory), relativize(baseDirectory, classDirectory), - managed) + managed + ) } def libEntry( - config: Configuration, + config: Configuration, buildDirectory: File, - baseDirectory: File, + baseDirectory: File, relativizeLibs: Boolean, - state: State)( - lib: Lib): NetBeansClasspathEntry.Lib = { + state: State + )( + lib: Lib + ): NetBeansClasspathEntry.Lib = { def path(file: File) = { val relativizedBase = if (buildDirectory === baseDirectory) Some(".") else IO.relativize(buildDirectory, baseDirectory) @@ -378,31 +396,38 @@ private object NetBeans extends NetBeansSDTConfig { "%s%s%s".format( base split FileSepPattern map (part => if (part != ".") ".." else part) mkString FileSep, FileSep, - file)) + file + )) if (relativizeLibs) relativized getOrElse file.getAbsolutePath else file.getAbsolutePath } NetBeansClasspathEntry.Lib(config.name, path(lib.binary), lib.source map path) } def projectEntry( - config: Configuration, + config: Configuration, baseDirectory: File, - state: State)( - prj: Prj): NetBeansClasspathEntry.Project = { + state: State + )( + prj: Prj + ): NetBeansClasspathEntry.Project = { NetBeansClasspathEntry.Project( config.name, prj.name, prj.baseDirectory.getAbsolutePath, - prj.classDirectory map (_.getAbsolutePath) getOrElse "") + prj.classDirectory map (_.getAbsolutePath) getOrElse "" + ) } def aggProjectEntry( baseDirectory: File, - state: State)( - prj: Prj): NetBeansClasspathEntry.AggProject = { + state: State + )( + prj: Prj + ): NetBeansClasspathEntry.AggProject = { NetBeansClasspathEntry.AggProject( prj.name, - prj.baseDirectory.getAbsolutePath) + prj.baseDirectory.getAbsolutePath + ) } def jreContainer(executionEnvironment: Option[NetBeansExecutionEnvironment.Value]): String = @@ -435,11 +460,13 @@ private object NetBeans extends NetBeansSDTConfig { setting(Keys.target in ref, state) def srcDirectories( - ref: Reference, - createSrc: NetBeansCreateSrc.ValueSet, + ref: Reference, + createSrc: NetBeansCreateSrc.ValueSet, netbeansOutput: Option[String], - state: State)( - configuration: Configuration): Validation[Seq[(File, File, Boolean)]] = { + state: State + )( + configuration: Configuration + ): Validation[Seq[(File, File, Boolean)]] = { import NetBeansCreateSrc._ val classDirectory = netbeansOutput match { case Some(name) => baseDirectory(ref, state) map (new File(_, name)) @@ -454,7 +481,8 @@ private object NetBeans extends NetBeansSDTConfig { dirs(ValueSet(Unmanaged, Source), Keys.unmanagedSourceDirectories, false), dirs(ValueSet(Managed, Source), Keys.managedSourceDirectories, true), dirs(ValueSet(Unmanaged, Resource), Keys.unmanagedResourceDirectories, false), - dirs(ValueSet(Managed, Resource), Keys.managedResourceDirectories, true)) reduceLeft (_ +++ _) + dirs(ValueSet(Managed, Resource), Keys.managedResourceDirectories, true) + ) reduceLeft (_ +++ _) } def scalacOptions(ref: ProjectRef, state: State): Validation[Seq[(String, String)]] = @@ -473,7 +501,8 @@ private object NetBeans extends NetBeansSDTConfig { * > show compile:scalariformPreferences */ def scalariformPreferences(ref: ProjectRef, state: State)( - configuration: Configuration): Validation[Seq[(PreferenceDescriptor[_], Any)]] = { + configuration: Configuration + ): Validation[Seq[(PreferenceDescriptor[_], Any)]] = { (ScalariformKeys.preferences in (ref, configuration)) get structure(state).data match { case Some(a) => a.preferencesMap.toList.success case None => FormattingPreferences.preferencesMap.toList.success @@ -481,10 +510,12 @@ private object NetBeans extends NetBeansSDTConfig { } def externalDependencies( - ref: ProjectRef, + ref: ProjectRef, withSource: Boolean, - state: State)( - configuration: Configuration): Validation[Seq[Lib]] = { + state: State + )( + configuration: Configuration + ): Validation[Seq[Lib]] = { def moduleToFile(key: TaskKey[UpdateReport], p: (Artifact, File) => Boolean = (_, _) => true) = evaluateTask(key in configuration, ref, state) map { updateReport => val moduleToFile = @@ -517,15 +548,19 @@ private object NetBeans extends NetBeansSDTConfig { "External dependencies for configuration '%s' and withSource '%s': %s".format( configuration, withSource, - externalDependencies)) + externalDependencies + ) + ) externalDependencies } def projectDependencies( - ref: ProjectRef, + ref: ProjectRef, project: ResolvedProject, - state: State)( - configuration: Configuration): Validation[Seq[Prj]] = { + state: State + )( + configuration: Configuration + ): Validation[Seq[Prj]] = { val projectDependencies: Seq[Validation[Prj]] = project.dependencies collect { case dependency if isInConfiguration(configuration, ref, dependency, state) => val dependencyRef = dependency.project @@ -540,9 +575,10 @@ private object NetBeans extends NetBeansSDTConfig { } def projectAggregate( - ref: ProjectRef, + ref: ProjectRef, project: ResolvedProject, - state: State): Validation[Seq[Prj]] = { + state: State + ): Validation[Seq[Prj]] = { val projects: Seq[Validation[Prj]] = project.aggregate collect { case prjRef if isUnderLocal(prjRef, state) => val name = setting(Keys.name in prjRef, state) @@ -561,14 +597,16 @@ private object NetBeans extends NetBeansSDTConfig { def isInConfiguration( configuration: Configuration, - ref: ProjectRef, - dependency: ClasspathDep[ProjectRef], - state: State): Boolean = { + ref: ProjectRef, + dependency: ClasspathDep[ProjectRef], + state: State + ): Boolean = { val map = Classpaths.mapped( dependency.configuration, Configurations.names(Classpaths.getConfigurations(ref, structure(state).data)), Configurations.names(Classpaths.getConfigurations(dependency.project, structure(state).data)), - "compile", "*->compile") + "compile", "*->compile" + ) !map(configuration.name).isEmpty } @@ -586,22 +624,26 @@ private object NetBeans extends NetBeansSDTConfig { def classpathEntryTransformerFactory(ref: Reference, state: State): NetBeansTransformerFactory[Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry]] = setting(NetBeansKeys.classpathEntryTransformerFactory in ref, state).fold( _ => NetBeansClasspathEntryTransformerFactory.Identity, - id) + id + ) def classpathTransformerFactories(ref: Reference, state: State): Seq[NetBeansTransformerFactory[RewriteRule]] = setting(NetBeansKeys.classpathTransformerFactories in ref, state).fold( _ => Seq(NetBeansRewriteRuleTransformerFactory.ClasspathDefault), - NetBeansRewriteRuleTransformerFactory.ClasspathDefault +: _) + NetBeansRewriteRuleTransformerFactory.ClasspathDefault +: _ + ) def projectTransformerFactories(ref: Reference, state: State): Seq[NetBeansTransformerFactory[RewriteRule]] = setting(NetBeansKeys.projectTransformerFactories in ref, state).fold( _ => Seq(NetBeansRewriteRuleTransformerFactory.Identity), - id) + id + ) def configurations(ref: Reference, state: State): Seq[Configuration] = setting(NetBeansKeys.configurations in ref, state).fold( _ => Seq(Configurations.Compile, Configurations.Test), - _.toSeq) + _.toSeq + ) def createSrc(ref: Reference, state: State)(configuration: Configuration): NetBeansCreateSrc.ValueSet = setting(NetBeansKeys.createSrc in (ref, configuration), state).fold(_ => NetBeansCreateSrc.All, id) @@ -677,11 +719,12 @@ private object NetBeans extends NetBeansSDTConfig { } private case class Content( - name: String, - dir: File, - project: Node, - classpath: Node, - scalacOptions: Seq[(String, String)]) + name: String, + dir: File, + project: Node, + classpath: Node, + scalacOptions: Seq[(String, String)] +) private case class Lib(binary: File)(val source: Option[File]) private case class Prj(name: String, baseDirectory: File, classDirectory: Option[File]) diff --git a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansPlugin.scala b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansPlugin.scala index e96b66e..8375de3 100644 --- a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansPlugin.scala +++ b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansPlugin.scala @@ -30,9 +30,9 @@ import sbt.{ State, TaskKey } -import sbt.Keys.{ baseDirectory, commands } +import sbt.Keys.{baseDirectory, commands} import scala.util.control.Exception -import scala.xml.{ Attribute, Elem, MetaData, Node, Null, Text } +import scala.xml.{Attribute, Elem, MetaData, Node, Null, Text} import scala.xml.transform.RewriteRule import scalariform.formatter.preferences.IFormattingPreferences @@ -44,7 +44,8 @@ trait NetBeansPlugin { import NetBeansKeys._ Seq( commandName := "netbeans", - commands <+= (commandName)(NetBeans.netbeansCommand)) + commands <+= (commandName)(NetBeans.netbeansCommand) + ) } object NetBeansKeys { @@ -52,64 +53,79 @@ trait NetBeansPlugin { val executionEnvironment: SettingKey[Option[NetBeansExecutionEnvironment.Value]] = SettingKey( prefix(ExecutionEnvironment), - "The optional NetBeans execution environment.") + "The optional NetBeans execution environment." + ) val skipParents: SettingKey[Boolean] = SettingKey( prefix(SkipParents), - "Skip creating NetBeans files for parent project?") + "Skip creating NetBeans files for parent project?" + ) val withSource: SettingKey[Boolean] = SettingKey( prefix(WithSource), - "Download and link sources for library dependencies?") + "Download and link sources for library dependencies?" + ) val useProjectId: SettingKey[Boolean] = SettingKey( prefix(UseProjectId), - "Use the sbt project id as the NetBeans project name?") + "Use the sbt project id as the NetBeans project name?" + ) @deprecated("Use classpathTransformerFactories instead!", "2.1.0") val classpathEntryTransformerFactory: SettingKey[NetBeansTransformerFactory[Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry]]] = SettingKey( prefix("classpathEntryTransformerFactory"), - "Creates a transformer for classpath entries.") + "Creates a transformer for classpath entries." + ) val classpathTransformerFactories: SettingKey[Seq[NetBeansTransformerFactory[RewriteRule]]] = SettingKey( prefix("classpathTransformerFactory"), - "Factories for a rewrite rule for the .classpath file.") + "Factories for a rewrite rule for the .classpath file." + ) val projectTransformerFactories: SettingKey[Seq[NetBeansTransformerFactory[RewriteRule]]] = SettingKey( prefix("projectTransformerFactory"), - "Factories for a rewrite rule for the .project file.") + "Factories for a rewrite rule for the .project file." + ) val commandName: SettingKey[String] = SettingKey( prefix("command-name"), - "The name of the command.") + "The name of the command." + ) val configurations: SettingKey[Set[Configuration]] = SettingKey( prefix("configurations"), - "The configurations to take into account.") + "The configurations to take into account." + ) val createSrc: SettingKey[NetBeansCreateSrc.ValueSet] = SettingKey( prefix("create-src"), - "The source kinds to be included.") + "The source kinds to be included." + ) val projectFlavor: SettingKey[NetBeansProjectFlavor.Value] = SettingKey( prefix("project-flavor"), - "The flavor of project (Scala or Java) to build.") + "The flavor of project (Scala or Java) to build." + ) val netbeansOutput: SettingKey[Option[String]] = SettingKey( prefix("netbeans-output"), - "The optional output for NetBeans.") + "The optional output for NetBeans." + ) val preTasks: SettingKey[Seq[TaskKey[_]]] = SettingKey( prefix("pre-tasks"), - "The tasks to be evaluated prior to creating the NetBeans project definition.") + "The tasks to be evaluated prior to creating the NetBeans project definition." + ) val relativizeLibs: SettingKey[Boolean] = SettingKey( prefix("relativize-libs"), - "Relativize the paths to the libraries?") + "Relativize the paths to the libraries?" + ) val skipProject: SettingKey[Boolean] = SettingKey( prefix("skipProject"), - "Skip creating NetBeans files for a given project?") + "Skip creating NetBeans files for a given project?" + ) private def prefix(key: String) = "netbeans-" + key } @@ -232,8 +248,9 @@ trait NetBeansPlugin { object Identity extends NetBeansTransformerFactory[Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry]] { import scalaz.Scalaz._ override def createTransformer( - ref: ProjectRef, - state: State): Validation[Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry]] = { + ref: ProjectRef, + state: State + ): Validation[Seq[NetBeansClasspathEntry] => Seq[NetBeansClasspathEntry]] = { val transformer = (entries: Seq[NetBeansClasspathEntry]) => entries transformer.success } diff --git a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansSDTConfig.scala b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansSDTConfig.scala index 333565c..4abe53e 100644 --- a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansSDTConfig.scala +++ b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/NetBeansSDTConfig.scala @@ -52,7 +52,8 @@ private trait NetBeansSDTConfig { TakesArg("Yrecursion"), Flag("Yself-in-annots"), ColonSeparated("Ystruct-dispatch"), - Flag("Ywarn-dead-code")) + Flag("Ywarn-dead-code") + ) private sealed trait SDTOption { def name: String diff --git a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/package.scala b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/package.scala index 56fe1f4..219bda1 100644 --- a/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/package.scala +++ b/nbsbt-core/src/main/scala/org/netbeans/nbsbt/core/package.scala @@ -40,7 +40,7 @@ import sbt.{ } import sbt.Load.BuildStructure import sbt.complete.Parser -import scalaz.{ Equal, NonEmptyList, Validation => ScalazValidation } +import scalaz.{Equal, NonEmptyList, Validation => ScalazValidation} import scalaz.Scalaz._ package object core { diff --git a/nbsbt-plugin/src/main/scala/org/netbeans/nbsbt/plugin/NetBeansPlugin.scala b/nbsbt-plugin/src/main/scala/org/netbeans/nbsbt/plugin/NetBeansPlugin.scala index 4190406..19c5430 100644 --- a/nbsbt-plugin/src/main/scala/org/netbeans/nbsbt/plugin/NetBeansPlugin.scala +++ b/nbsbt-plugin/src/main/scala/org/netbeans/nbsbt/plugin/NetBeansPlugin.scala @@ -18,8 +18,8 @@ package org.netbeans.nbsbt.plugin -import org.netbeans.nbsbt.core.{ NetBeansPlugin => CoreNetBeansPlugin } -import sbt.{ Plugin, Setting } +import org.netbeans.nbsbt.core.{NetBeansPlugin => CoreNetBeansPlugin} +import sbt.{Plugin, Setting} object NetBeansPlugin extends Plugin with CoreNetBeansPlugin { override def settings: Seq[Setting[_]] = CoreNetBeansPlugin.netbeansSettings diff --git a/project/Build.scala b/project/Build.scala index a63a28c..dd8fd1e 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -21,7 +21,7 @@ object Build extends Build { libraryDependencies ++= Seq( "org.scalaz" %% "scalaz-core" % "7.0.2", "org.scalaz" %% "scalaz-effect" % "7.0.2"), - addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.0"))) + addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0"))) lazy val nbsbtPlugin = Project( "nbsbt-plugin", diff --git a/project/build.properties b/project/build.properties index 8ac605a..817bc38 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.2 +sbt.version=0.13.9 diff --git a/project/maven.sbt b/project/maven.sbt new file mode 100644 index 0000000..65dc06f --- /dev/null +++ b/project/maven.sbt @@ -0,0 +1 @@ +addMavenResolverPlugin \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index c7ce7a9..485c617 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,10 @@ libraryDependencies <+= (sbtVersion)("org.scala-sbt" % "scripted-plugin" % _) -addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.7.1") +addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8") -addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.0") +// https://github.com/sbt/sbt-scalariform +addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0") + + +resolvers ++= Seq(Resolver.mavenLocal, Resolver.sonatypeRepo("releases")) diff --git a/version.sbt b/version.sbt index ec57480..60bdb3e 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "1.1.4" +version in ThisBuild := "1.1.5"