GithubHelp home page GithubHelp logo

isabella232 / sbt-softwaremill Goto Github PK

View Code? Open in Web Editor NEW

This project forked from softwaremill/sbt-softwaremill

0.0 0.0 0.0 474 KB

A sane set of default build settings

License: Apache License 2.0

Scala 98.78% Shell 1.22%

sbt-softwaremill's Introduction

sbt-softwaremill

Build Status Maven Central

A sane set of common build settings.

Usage

For each project where you'd like to use the build settings, add some or all of the following your project/plugins.sbt file:

addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % "2.0.9")
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % "2.0.9")
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-extra" % "2.0.9")
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % "2.0.9")

Now you can add the appropriate settings in your build.sbt, e.g.:

import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings

lazy val commonSettings = commonSmlBuildSettings ++ Seq(
  // your settings, which can override some of commonSmlBuildSettings
) 

Each dependency provides a choice of settings:

// common - compiler flags
import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
commonSmlBuildSettings

// publish
import com.softwaremill.Publish.ossPublishSettings
ossPublishSettings

// extra - use all or choose
lazy val extraSmlBuildSettings =
  dependencyUpdatesSettings ++  // check dependency updates on startup (max once per 12h)
  dependencyCheckSettings

// downloads the appropriate chrome/gecko driver for testing scala.js using scalajs-env-selenium and sets the jsenv
import com.softwaremill.SbtSoftwareMillBrowserTestJS.{browserChromeTestSettings, browserGeckoTestSettings}
browserChromeTestSettings
browserGeckoTestSettings 

sbt-softwaremill-common comes with:

sbt-softwaremill-publish comes with:

sbt-softwaremill-extra comes with:

Sonatype setup

By default, the plugins use the new s01.oss.sonatype.org host for releasing to Sonatype. If your project isn't yet migrated, you'll need to add the following to your root project settings:

sonatypeCredentialHost := "oss.sonatype.org"

Releasing your library

sbt-softwaremill-publish exposes a default configuration suitable for releasing open source libraries. The release process is broken into two steps:

  1. local: sbt release. This sbt command prepares the next release: asks about the version, updates the version in the docs & readme, commits the changes and finally asks the user to push the changes. Your README.md, docs and doc directory will be parsed for "[organization]" %(%) "artifactId" % "someVersion" and that version value will be bumped.
  2. remote: sbt ci-release. This sbt command should be run on GH actions, triggered when a new tag is pushed. It publishes the artifacts to sonatype, and invokes repository release.

To setup the remote part, follow the guide on sbt-ci-release. You can also take a look at this project's .github/workflows/ci.yml.

You might need to explicitly set the sonatype profile name:

val commonSettings = ossPublishSettings ++ Seq(
  sonatypeProfileName := "com.example"
)

Releasing sbt-softwaremill

sbt-softwaremill release process is setup on GH Actions. This plugin uses itself to publish binaries to oss-sonatype.

Note for migrating from sbt-softwaremill 1.x series

You should remove version.sbt file as it's no longer used, and it may disrupt the release process. In the 2.x series the version is deduced from git tags and the current state using https://github.com/dwijnand/sbt-dynver.

Moreover, a number of bundled plugins are removed, which aren't available for Scala3 and would cause build problems

sbt-softwaremill's People

Contributors

adamw avatar amorfis avatar arixmkii avatar dsabanin avatar ghostbuster91 avatar kciesielski avatar magdzikk avatar mergify[bot] avatar note avatar scala-steward avatar xuwei-k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.