core


License

License

GroupId

GroupId

io.7mind.izumi.sbt
ArtifactId

ArtifactId

core_2.12
Last Version

Last Version

0.0.10
Release Date

Release Date

Type

Type

jar
Description

Description

core
core
Project URL

Project URL

https://izumi.7mind.io
Project Organization

Project Organization

io.7mind.izumi.sbt
Source Code Management

Source Code Management

https://github.com/7mind/sbtgen

Download core_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/io.7mind.izumi.sbt/core_2.12/ -->
<dependency>
    <groupId>io.7mind.izumi.sbt</groupId>
    <artifactId>core_2.12</artifactId>
    <version>0.0.10</version>
</dependency>
// https://jarcasting.com/artifacts/io.7mind.izumi.sbt/core_2.12/
implementation 'io.7mind.izumi.sbt:core_2.12:0.0.10'
// https://jarcasting.com/artifacts/io.7mind.izumi.sbt/core_2.12/
implementation ("io.7mind.izumi.sbt:core_2.12:0.0.10")
'io.7mind.izumi.sbt:core_2.12:jar:0.0.10'
<dependency org="io.7mind.izumi.sbt" name="core_2.12" rev="0.0.10">
  <artifact name="core_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.7mind.izumi.sbt', module='core_2.12', version='0.0.10')
)
libraryDependencies += "io.7mind.izumi.sbt" % "core_2.12" % "0.0.10"
[io.7mind.izumi.sbt/core_2.12 "0.0.10"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.9
com.github.scopt : scopt_2.12 jar 3.7.1
org.scala-lang.modules : scala-collection-compat_2.12 jar 2.1.2

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.8

Project Modules

There are no modules declared in this project.

sbtgen

SBT build generator for role-based projects, based on Ammonite and Coursier.

Details: Monorepo or Multirepo? Role-Based Repositories.

See also: role-based projects for .NET/C# and JS

Quick Start

Create a file sbtgen.sc and paste the following code:

#!/bin/sh
coursier launch com.lihaoyi:ammonite_2.13.0:1.6.9 --fork -M ammonite.Main -- sbtgen.sc $*
exit
!#
import $ivy.`io.7mind.izumi.sbt::sbtgen:0.0.66`, izumi.sbtgen._, izumi.sbtgen.model._

val globalSettings = GlobalSettings(
  groupId = "my.org",
)

@main
def entrypoint(args: String*): Unit = {
  Entrypoint.main(MyProject.root, globalSettings, Seq("-o", ".") ++ args)
}

object Platforms {
  val jvm = PlatformEnv(
    platform = Platform.Jvm,
    language = Seq(ScalaVersion("2.13.3")),
    settings = Seq("scalacSettings" += "-Xlint:_"),
  )
}

object MyProject {
  val root = Project(
    name = ArtifactId("my-project"),
    aggregates = Seq(
      Aggregate(
        name = ArtifactId("my-lib"),
        artifacts = Seq(
          Artifact(
            name = ArtifactId("my-module-a"),
            libs = Seq.empty,
            depends = Seq.empty,
            platforms = Seq(Platforms.jvm),
            groups = Set(Group("groupA")),
          ),
          Artifact(
            name = ArtifactId("my-module-b"),
            libs = Seq.empty,
            depends = Seq.empty,
            platforms = Seq(Platforms.jvm),
            groups = Set(Group("groupB")),
          ),
        ),
      ),
    ),
  )
}

Install Coursier and launch the script:

chmod +x sbtgen.sc
./sbtgen.sc

Alternatively, you may launch it with Ammonite if it's installed:

amm sbtgen.sc

This will generate build.sbt for my-project in current directory.

Use ./sbtgen.sc -u groupA or ./sbtgen.sc -u groupB to build only my-module-a or my-module-b

Use ./sbtgen.sc --help for help:

$ ./sbtgen.sc --help
Error: Unknown option --help
sbtgen
Usage: sbtgen [options]

  --nojvm               disable jvm projects
  --js                  enable js projects
  --native              enable native projects
  --nta                 don't publish test artifacts
  -d, --debug           enable debug output
  -c, --compactify      deduplicate repetative settings
  -t, --isolate-tests   don't inherit test scopes
  -o, --output <value>  output directory
  -u, --use <value>     use only groups specified
Cannot parse commandline

IDE Support

Intellij has built-in support for Ammonite scripts, if it doesn't work go to Preferences -> Languages and Frameworks -> Scala -> Worksheet and change Treat .sc files as: to Always Ammonite

To enable syntax highlighting for the library, ensure that sbtgen.sc is opened as an Ammonite script – there should be a Run script button in the upper-left corner. Press it, after script finishes Intellij should prompt to include $ivy dependencies in the script into the project – this will enable full IntelliSense for the script.

Example projects

Complete projects that use this tool:

Contributors: how to publish

To release new version via CI:

sbt +clean +test release

To publish manually:

sbt +clean +sonatypeBundleClean +publishSigned +sonatypeBundleRelease
io.7mind.izumi.sbt

Septimal Mind

Inventing productivity

Versions

Version
0.0.10