module2


License

License

GroupId

GroupId

com.nequissimus
ArtifactId

ArtifactId

module2_2.12
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

module2
module2
Project URL

Project URL

http://nequissimus.com/
Project Organization

Project Organization

com.nequissimus
Source Code Management

Source Code Management

https://github.com/NeQuissimus/test-and-stuff

Download module2_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.nequissimus/module2_2.12/ -->
<dependency>
    <groupId>com.nequissimus</groupId>
    <artifactId>module2_2.12</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.nequissimus/module2_2.12/
implementation 'com.nequissimus:module2_2.12:1.0.2'
// https://jarcasting.com/artifacts/com.nequissimus/module2_2.12/
implementation ("com.nequissimus:module2_2.12:1.0.2")
'com.nequissimus:module2_2.12:jar:1.0.2'
<dependency org="com.nequissimus" name="module2_2.12" rev="1.0.2">
  <artifact name="module2_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nequissimus', module='module2_2.12', version='1.0.2')
)
libraryDependencies += "com.nequissimus" % "module2_2.12" % "1.0.2"
[com.nequissimus/module2_2.12 "1.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.6
org.scalaz : scalaz-core_2.12 jar 7.2.26

test (1)

Group / Artifact Type Version
org.specs2 : specs2-core_2.12 jar 4.3.4

Project Modules

There are no modules declared in this project.

test-and-stuff

How to Travis + Sonatype + Codecov a multi-module SBT build

Helper

A short helper for gitignore.io:

$ which gi
gi () {
  curl -fL https://www.gitignore.io/api/${(j:,:)@}
}

Essentials

.gitignore

$ gi scala,emacs,java,sbt > .gitignore

project/plugin.sbt

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")

build.sbt

inThisBuild(List(
  organization := "<ORGANIZATION>",
  homepage := Some(url("https://github.com/<ORG>/<REPO>")),
  licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
  developers := List(
    Developer(
      "<ALIAS>",
      "<NAME>",
      "<EMAIL>",
      url("<WEBSITE>")
    )
  )
))

Signing key

Generate

$ gpg --gen-key

Enter your name, email, passphrase

Output should be similar to

[...]
pub   rsa2048 2018-08-24 [SC] [expires: 2020-08-24]
      <KEY_ID>
[...]

Grab the KEY_ID and store it in a variable

$ export KEY_ID=<KEY_ID>

Submit to key server

Copy the output of this:

$ gpg --armor --export "${KEY_ID}"

Paste the public key into https://pgp.mit.edu/ and submit. Also, for quicker propagation, do the same on http://keyserver.ubuntu.com/

Export private key

$ gpg --armor --export-secret-keys "${KEY_ID}" | base64 -w0 > project/secret

Enter the passphrase used when generating the key. The key is now Base64-encoded in project/secret

Travis configuration

Initialize

$ travis init scala --scala 2.12.6 --jdk openjdk8 --before-install 'git fetch --tags'
# Make sure PASSPHRASE, SONATYPE_USER and SONATYPE_PASS are escaped properly (despite the quotation)!!!
# Getting these escaped correctly is literally the hardest part :D
$ travis encrypt 'PGP_PASSPHRASE=<PASSPHRASE>' --add
$ travis encrypt 'SONATYPE_USERNAME=<SONATYPE_USER>' --add
$ travis encrypt 'SONATYPE_PASSWORD=<SONATYPE_PASS>' --add
$ travis encrypt-file ./project/secret ./project/zecret --add
$ echo "project/secret" >> .gitignore

Fix the line break in the openssl command, it's probably broken... Also, add || true to the end of it, so Pull Request builds will work

Add actual build

Add this line to your modules (or common settings)

build.sbt

[...]
settings(crossScalaVersions := List("2.12.6", "2.11.12"))
[...]

.travis.yml

stages:
- name: build
- name: release
  if: (branch = master AND type = push) OR (tag IS present)
jobs:
  include:
    - &build
      stage: build
      name: "Build"
      script: sbt ++$TRAVIS_SCALA_VERSION! coverage test coverageReport
      after_success: bash <(curl -s https://codecov.io/bash)
    - &release
      stage: release
      name: "Release artifacts"
      before_script: export PGP_SECRET="$(<./project/secret)"
      script: sbt ci-release || sbt sonatypeReleaseAll

    - <<: *build
      scala: 2.11.12
      name: "Build for 2.11"

Add Codecov config

.codecov.yml

comment: off
coverage:
  status:
    project:
      default: off
    module1:
        flags: module1
        target: auto
        threshold: 100
        base: auto
    module2:
        flags: module2
        target: auto
        threshold: 100
        base: auto
    patch:
      default: off
      module1:
        flags: module1
        threshold: 100
        base: auto
      module2:
        flags: module2
        threshold: 100
        base: auto
flags:
  module1:
    paths:
      - module1/
  module2:
    paths:
      - module2/

Versions

Version
1.0.2
1.0.1