Skip to content

Commit

Permalink
Improve ScalaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
reidspencer committed Aug 29, 2024
1 parent 60bcb6c commit 4f2d40b
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/com/ossuminc/sbt/CrossModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ object CrossModule {
case object JSTarget extends Target { def platform: Platform = JSPlatform }
case object NativeTarget extends Target { def platform: Platform = NativePlatform }

/** Define a sub-project or module of the root project. Make sure to use the [[Root]] function before this Module is
* defined. No configuration is applied but you can do that by using the various With.* functions in this plugin.
/** Define a subproject or module of the root project. Make sure to use the [[Root]] function before this Module is
* defined. No configuration is applied, but you can do that by using the various With.* functions in this plugin.
* `With.typical` is typical for Scala3 development
* @param dirName
* The name of the sub-directory in which the module is located.
* The name of the subdirectory in which the module is located.
* @param modName
* The name of the artifact to be published. If blank, it will default to the dirName
* @return
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/com/ossuminc/sbt/DocSite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import sbt.{File, Project, ProjectReference, file}
*/
object DocSite {

/** Apply the DocSite */
def apply(
dirName: String,
apiOutput: File,
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/com/ossuminc/sbt/Module.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import com.typesafe.sbt.packager.archetypes.JavaAppPackaging
import sbt.Keys.{moduleName, name}
import sbt.{Project, file}

/** A regular software library module. */
object Module {

/** Define a sub-project or module of the root project. Make sure to use the [[Root]] function before this Module is
/** Define a subproject or module of the root project. Make sure to use the [[Root]] function before this Module is
* defined. No configuration is applied but you can do that by using the various With.* functions in this plugin.
* `With.typical` is typical for Scala3 development
* @param dirName
* The name of the sub-directory in which the module is located.
* The name of the subdirectory in which the module is located.
* @param modName
* The name of the artifact to be published. If blank, it will default to the dirName
* @return
Expand Down
3 changes: 3 additions & 0 deletions src/main/scala/com/ossuminc/sbt/OssumIncPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import sbt.*
import sbt.Keys.*
import sbt.librarymanagement.Resolver

/** And sbt plugin for many different kind of projects and used for every project at Ossum Inc.
* */
object OssumIncPlugin extends AutoPlugin {

object autoImport {
Expand All @@ -16,6 +18,7 @@ object OssumIncPlugin extends AutoPlugin {
val Plugin: com.ossuminc.sbt.Plugin.type = com.ossuminc.sbt.Plugin
val Program: com.ossuminc.sbt.Program.type = com.ossuminc.sbt.Program
val CrossModule: com.ossuminc.sbt.CrossModule.type = com.ossuminc.sbt.CrossModule
val DocSite: com.ossuminc.sbt.DocSite.type = com.ossuminc.sbt.DocSite
val JVM: CrossModule.Target = CrossModule.JVMTarget
val JS: CrossModule.Target = CrossModule.JSTarget
val Native: CrossModule.Target = CrossModule.NativeTarget
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/com/ossuminc/sbt/Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.ossuminc.sbt
import sbt.*
import sbt.Keys.*

/** The object for configuration a sbt autoplugin */
object Plugin {

/** Define a sub-project that produces an sbt plugin. It is necessary to also have used the [[Root]] function because
Expand Down
7 changes: 4 additions & 3 deletions src/main/scala/com/ossuminc/sbt/Program.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.ossuminc.sbt
import com.typesafe.sbt.packager.archetypes.JavaAppPackaging
import com.typesafe.sbt.packager.graalvmnativeimage.GraalVMNativeImagePlugin
import com.typesafe.sbt.packager.universal.UniversalDeployPlugin
import sbt.Keys.{moduleName, name}
import sbt.Keys.{mainClass, moduleName, name}
import sbt.{Project, file}

object Program {
Expand All @@ -17,13 +17,14 @@ object Program {
* @return
* The configured sbt project that is ready to build an sbt plugin
*/
def apply(dirName: String, appName: String): Project = {
def apply(dirName: String, appName: String, mainClazz: Option[String] = None): Project = {
Project
.apply(dirName, file(dirName))
.enablePlugins(OssumIncPlugin, JavaAppPackaging, UniversalDeployPlugin, GraalVMNativeImagePlugin)
.settings(
name := dirName,
moduleName := { if (appName.isEmpty) dirName else appName }
moduleName := { if (appName.isEmpty) dirName else appName },
mainClass := mainClazz
)
}
}
1 change: 1 addition & 0 deletions src/main/scala/com/ossuminc/sbt/Root.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.ossuminc.sbt

import sbt.{Developer, Project, URL, file, url}

/** A configuration object for a root project of a monorepo composed of subordinate sbt projects */
object Root {

/** Define a Root level project whether it is for a single-project repo or a unirepo with many sub-projects. This
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/com/ossuminc/sbt/helpers/Akka.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.ossuminc.sbt.helpers
import sbt.*
import sbt.Keys.*

/** A helper that can be used to configure the complex dependencies in the Akka Platform */
object Akka extends AutoPluginHelper {

sealed trait AkkaVersion {
Expand All @@ -24,6 +25,7 @@ object Akka extends AutoPluginHelper {
// Akka Diagnostics 2.1.1
// Akka Insights 2.20.0

/** An object to define the components of the Akka 2024.05 release of Akka Platform */
case object akka_2024_05 extends AkkaVersion {
object V {
val akka_core = "2.9.3"
Expand Down

0 comments on commit 4f2d40b

Please sign in to comment.