Skip to content

Commit b8b3aa0

Browse files
author
Xoan C. Pardo
committed
Updated to publish to Maven Central
1 parent 6838ac9 commit b8b3aa0

File tree

4 files changed

+39
-26
lines changed

4 files changed

+39
-26
lines changed

README.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,12 @@ In order to use the **scala-lsgo-benchmark** in your Scala project add the follo
2323

2424
```scala
2525
libraryDependencies += "org.apache.commons" % "commons-math3" % "3.3" // this is optional
26-
27-
externalResolvers += "Scala LSGO2013 packages" at "https://maven.pkg.github.com/xoanpardo/scala-lsgo-benchmarks"
28-
libraryDependencies += "xoanpardo" %% "scala-lsgo-benchmarks" % "0.1.0"
26+
libraryDependencies += "io.github.xoanpardo" %% "scala-lsgo-benchmarks" % "0.1.1"
2927
```
3028
The Apache Commons Math dependency is only necessary to generate random samples. If you do not plan to use random samples in your code or they are generated by other means it can be skipped.
3129

3230
> **Note**: the original `cdatafiles` from the C++ implementation are included in the distribution package for convenience.
3331
34-
### Configuring credentials
35-
36-
The distribution package is stored in the [Github Packages Registry](https://help.github.com/en/articles/about-github-package-registry). To install the package and use it as a dependency in your projects is necessary to first configure the credentials to access the Github API. The steps are the following:
37-
38-
1. In your Github account [create a PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token) (Personal Access Token) with the `read:packages` [permissions](https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries).
39-
2. Store the PAT somewhere safe (e.g. NOT in the repository of your project) and make it accessible to `sbt`. There are different ways of doing this, a common approach is to have a global `$HOME/.sbt/1.0/github.sbt` file with the following contents:
40-
41-
```scala
42-
credentials += Credentials("GitHub Package Registry", "maven.pkg.github.com", "<GITHUB USERNAME>", "<GITHUB TOKEN>")
43-
```
44-
4532
Usage
4633
-----
4734

@@ -270,11 +257,12 @@ Contact
270257
-------
271258

272259
**Xoán C. Pardo** <[xoan.pardo@udc.gal](mailto:xoan.pardo@udc.gal)> \
273-
Computer Architecture Group / CITIC\
274-
Universidade da Coruña (UDC)\
260+
[Computer Architecture Group](https://gac.udc.es/english/) / [CITIC]( https://citic.udc.es/en/home-english-2/ )\
261+
Universidade da Coruña ([UDC]( https://www.udc.gal/en/ ))\
275262
Spain
276263

277-
[![ORCID](http://img.shields.io/:ORCID-0000--0001--8577--6980-yellow.svg)](https://orcid.org/0000-0001-8577-6980)
278-
[![ResearchID](http://img.shields.io/:ResearchID-D--8250--2015-green.svg)](https://publons.com/researcher/2420618/xoan-c-pardo/)
264+
[![ORCID](http://img.shields.io/:ORCID-0000--0001--8577--6980-green.svg)](https://orcid.org/0000-0001-8577-6980)
265+
[![ResearchID](http://img.shields.io/:ResearchID-D--8250--2015-yellow.svg)](https://publons.com/researcher/2420618/xoan-c-pardo/)
266+
[![Scopus](http://img.shields.io/:Scopus-14625465500-blue.svg)](http://www.scopus.com/authid/detail.uri?authorId=14625465500)
279267

280268
[mailto:xoan.pardo@udc.gal]: xoan.pardo@udc.gal

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
organization := "xoanpardo"
1+
organization := "io.github.xoanpardo"
22
name := "scala-lsgo-benchmarks"
3-
version := "0.1.0"
3+
version := "0.1.1"
44
scalaVersion := "2.13.7"
55

66
// IntelliJ IDEA flags
77
idePackagePrefix := Some("gal.udc.gac.lsgo2013")
88

99
// sbt-header settings
10-
organizationName := "Xoán C. Pardo"
10+
organizationName := "Xoan C. Pardo"
1111
startYear := Some(2022)
1212
licenses += ("GPL-3.0-only", new URL("https://www.gnu.org/licenses/gpl-3.0.html"))
1313

project/plugins.sbt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "1.1.0")
22
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
3-
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
3+
//addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
4+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
5+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")

publish.sbt

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
// Github packages settings
2-
githubOwner := "xoanpardo"
3-
githubRepository := "scala-lsgo-benchmarks"
4-
githubTokenSource := TokenSource.GitConfig("github.token") // token to publish to github in ~/.gitconfig
1+
// publishTo target: Sonatype or GitHub Packages
2+
3+
/** sbt-github-packages settings ----------------------------------------------------------------*/
4+
//publishTo := githubPublishTo.value
5+
//githubOwner := "xoanpardo"
6+
//githubRepository := "scala-lsgo-benchmarks"
7+
//githubTokenSource := TokenSource.GitConfig("github.token") // token to publish to github in ~/.gitconfig
8+
9+
10+
/** sbt-sonatype settings -----------------------------------------------------------------------*/
11+
publishTo := sonatypePublishToBundle.value // by default release to Sonatype
12+
13+
sonatypeCredentialHost := "s01.oss.sonatype.org" // For Sonatype accounts created after February 2021
14+
15+
// To sync with Maven central, you need to supply the following information:
16+
publishMavenStyle := true
17+
18+
// Open-source license (already defined in build.sbt)
19+
//licenses := Seq("GPL-3.0-only" -> url("https://www.gnu.org/licenses/gpl-3.0.html"))
20+
21+
// source code hosted in GitHub
22+
import xerial.sbt.Sonatype._
23+
sonatypeProjectHosting := Some(GitHubHosting("xoanpardo", "scala-lsgo-benchmarks", "xoan.pardo@udc.gal"))
24+
25+
developers := List(
26+
Developer(id="xoanpardo", name="Xoan C. Pardo", email="xoan.pardo@udc.gal", url=url("https://pdi.udc.es/en/File/Pdi/MF5AF"))
27+
)

0 commit comments

Comments
 (0)