score:2
how do i do that?
in the way you just described, having multiple sbt modules.
i have to publish these modules separately?
you usually have a single root
module that aggregates all the other modules like core
and extras
(which would depend on core
) and you publish root
which will transitively publish the others.
can they have different versions?
afaik there is nothing preventing you to have different versions... but, i have never seen a library doing this, when the versions must not be the same they are in separate github repos (which makes sense, since at the end you will probably have an automated process that publishes all of them at once)
also, it's not clear to me if library user should only include "feature module" which would transitively include core module.
if you follow the previous schema, the pom of extras
will mention core
thus users of your library can only import extras
and their build tools will transitively fetch core
however, whenever or not they want to do that (or that they consider that a best / bad practice) rather than also including core
explicitly is up to them. this topic is somewhat controversial, although most people agree that if you explicitly use something from a library then you must explicitly depend on it; see: https://github.com/cb372/sbt-explicit-dependencies
Source: stackoverflow.com
Related Query
- Publishing Scala library with modules
- Using a Java library with Scala reserved words
- Getting autoincrement values with Slick library in Scala
- is there any scala network library with actor model
- Setting User-Agent Header in Scala with Databinders Dispatch Library
- Is the Akka Actors library installed with the Scala IDE for Scala 2.10?
- Simple file read with Scala ARM library
- Disable SSL with Scala Dispatch Library
- Java / Scala math library with elliptic integrals and bessel functions?
- Publishing an sbt scala project to Artifactory with the env vars
- How to write generic function with Scala Quill.io library
- Making Scala code interoperable with a Java library
- CPS library for nice dataflow with Scala 2.10 futures
- Can't deserialize object with custom Decoder of LocalDateTime in Scala circle json library
- Inconsistency with scala reflection library
- sbt disagreeing with library about scala version
- Add method to library with scala implicit
- Problems with Scala Swing library
- Is there a library for editing MP4 Metadata with Scala or Java?
- Android library project with Scala works but not scalable
- Does the Scala 3 library have a Show typeclass that works with `derives`?
- problem with resolving apache math4 library in scala
- Scala deserialization of custom scala object with play-json library
- Any performance impact with Java modules used in Scala programs?
- Adding a third-party library to Scala project (Idea 12 with SBT plugin)
- Exception while trying to explain model with MMLSpark's scala LIME library
- How to use google pubsub library with scala
- split scala code into modules with one module for imports only
- how to use a different version of scala library with scala ide 3.0.2?
- Can I use an R library embedded in Scala with rscala?
More Query from same tag
- Merge matrices/2d-Arrays of arbitrary size into one big 2d array
- Scala weird map function behaviour
- Handling dead actors in Akka Typed
- Type inheritance misunderstanding in Request Response messaging design with Scala
- scala jackson dealing with any type, possible custom interceptor required
- How to sort uppercase and lowercase Strings in Scala
- How to (properly) enrich the standard library?
- How to best transform a SparkSQL Dataframe Array[String] column to a new [String] column
- Is there a PriorityQueue implementation with fixed capacity and custom comparator?
- ScalaMock with scalatest
- convert scientific notation in string format to numeric in spark dataframe
- How to de duplicate rows in spark dataframe based on custom logic?
- In Java or Scala, how to define conditional control flow based on whether type bound is satisfied?
- Fixed length parsing in spark scala
- How does filter works for Struct property in spark dataframe?
- Convert scala.math.BigDecimal to java.math.BigDecimal?
- Class of current static scope in scala
- Combining the elements of 2 lists
- why adding a multi-line comment in the code makes it uncompilable
- rename column name of spark data frame based on csv
- Spark scala: How to factorize code with Column?
- extract specific parts of an alpha numeric string through regex in scala
- Why do I get a "will always yield true" warning when translating the following from Java to Scala?
- Scala Monad - without for statement(elegant way to check null attribute)
- Type-safe Builder Library for Scala and Java
- Exception in cleaner thread when reading files from S3 in local Spark
- Creating an actorpublisher and actorsubscriber with same actor
- Find difference of column value in spark using scala
- Finding cliques or strongly connected components in Apache Spark using Graphx
- XGBoost on databricks - outdated scala version