Skip to content

Commit

Permalink
chore: 🚨 rename project to PlayGround
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Bonezi <[email protected]>
  • Loading branch information
felipebonezi committed Jul 23, 2022
1 parent fc6d845 commit 7465b60
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 101 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ discussion.

Additionally, there are issues labels you can use to navigate issues that a good start to contribute:

- [`Status: Need Help!`](https://github.com/felipebonezi/playframework-core/labels/Status%3A%20Need%20Help%21)
- [`Type: Community`](https://github.com/felipebonezi/playframework-core/labels/Type%3A%20Community)
- [`Type: Good First Issue`](https://github.com/felipebonezi/playframework-core/labels/Type%3A%20Good%20First%20Issue)
- [`Status: Need Help!`](https://github.com/felipebonezi/play-ground/labels/Status%3A%20Need%20Help%21)
- [`Type: Community`](https://github.com/felipebonezi/play-ground/labels/Type%3A%20Community)
- [`Type: Good First Issue`](https://github.com/felipebonezi/play-ground/labels/Type%3A%20Good%20First%20Issue)

### Procedure

1. Make sure you have signed the [CLA](https://cla-assistant.io/felipebonezi/playframework-core); if not, sign
1. Make sure you have signed the [CLA](https://cla-assistant.io/felipebonezi/play-ground); if not, sign
it online.
2. Ensure that your contribution meets the following guidelines:
1. Live up to the current code standard:
Expand Down
82 changes: 7 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,15 @@
# playframework-core
# play-ground

[![CI](https://github.com/felipebonezi/playframework-core/actions/workflows/continouos-integration.yml/badge.svg)](https://github.com/felipebonezi/playframework-core/actions/workflows/continouos-integration.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/56ea88cd8146afd188c0/maintainability)](https://codeclimate.com/github/felipebonezi/playframework-core/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/56ea88cd8146afd188c0/test_coverage)](https://codeclimate.com/github/felipebonezi/playframework-core/test_coverage)
[![Version](https://img.shields.io/github/v/release/felipebonezi/playframework-core?logo=java)](https://github.com/felipebonezi/playframework-core/releases)
[![CLA assistant](https://cla-assistant.io/readme/badge/felipebonezi/playframework-core)](https://cla-assistant.io/felipebonezi/playframework-core)
[![Licence](https://img.shields.io/github/license/felipebonezi/playframework-core?color=blue)](https://github.com/felipebonezi/playframework-core/blob/main/LICENSE)
[![CI](https://github.com/felipebonezi/play-ground/actions/workflows/continouos-integration.yml/badge.svg)](https://github.com/felipebonezi/play-ground/actions/workflows/continouos-integration.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/56ea88cd8146afd188c0/maintainability)](https://codeclimate.com/github/felipebonezi/play-ground/maintainability)
[![Version](https://img.shields.io/github/v/release/felipebonezi/play-ground?logo=java)](https://github.com/felipebonezi/play-ground/releases)
[![CLA assistant](https://cla-assistant.io/readme/badge/felipebonezi/play-ground)](https://cla-assistant.io/felipebonezi/play-ground)
[![Licence](https://img.shields.io/github/license/felipebonezi/play-ground?color=blue)](https://github.com/felipebonezi/play-ground/blob/main/LICENSE)

Core classes &amp; models to re-use on your [Play! Framework](https://playframework.com/) project.

### Dependencies

- [jBCrypt](https://www.mindrot.org/projects/jBCrypt/)
- [Java JWT](https://github.com/auth0/java-jwt)

Check all project dependencies in our AutoPlugin
at [project/Dependencies.scala](https://github.com/felipebonezi/playframework-core/blob/main/project/Dependencies.scala)
file.

### How to use?

This project is distributed using GitHub Package Registry
using [sbt-github-packages](https://dev.to/gjuoun/publish-your-scala-library-to-github-packages-4p80) plugin, so you
need to generate or use
your [Personal Access Token](https://docs.github.com/pt/github/authenticating-to-github/creating-a-personal-access-token)
available on GitHub.

Then, you need to set an Environment Variable **OR** GitHub Config:

```sh
$ export GITHUB_TOKEN=<PERSONAL_ACCESS_TOKEN_AQUI>
```

```sh
$ git config --global github.token <PERSONAL_ACCESS_TOKEN_AQUI>
```

Now, go to your project and import in your `plugins.sbt`:

```scala
// GitHub Packages plugin.
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "X.Y.Z")
```

Then, configure your GitHub credentials, Maven resolver and Library Dependencies in `build.sbt`:

```scala
// GitHub Packages config.
// Suppress Warnings about GitHub Repository Owner that is not required (OPTIONAL).
githubSuppressPublicationWarning := true

// Set your Personal Access Token using an Environment Variable or a Git Configuration.
githubTokenSource :=
TokenSource.Environment("GITHUB_TOKEN") || TokenSource.GitConfig("github.token")

// Add another Maven Resolver using GitHub Package Registry.
resolvers += Resolver.githubPackages("felipebonezi")

// Add the playframework-core dependency.
libraryDependencies += "br.com.felipebonezi" %% "playframework-core" % "vX.Y.Z"
```

### How to run this project?

This project requires [Play! Framework](https://playframework.com/) v2.8.X and [Scala](https://www.scala-lang.org)
2.13.X to run.

Install the dependencies and devDependencies and start the server at default port (9000).

```sh
$ cd playframework-core
$ sbt compile run
```

#### Distribute

Generating pre-built zip archives for distribution:

```sh
$ cd playframework-core
$ sbt dist
libraryDependencies += "io.github.felipebonezi" %% "play-ground" % "X.Y.Z"
```
12 changes: 3 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ maintainer := conf.getString("play.app.maintainer")

lazy val root = (project in file("."))
.enablePlugins(PlayJava, PlayEbean)
.enablePlugins(PlayCore, Dependencies, Common)
.enablePlugins(PlayGround, Dependencies, Common)
.enablePlugins(DockerPlugin, AshScriptPlugin)

Compile / doc / sources := Seq.empty
Expand All @@ -21,8 +21,8 @@ routesGenerator := InjectedRoutesGenerator
scalaVersion := "2.13.8"
versionScheme := Some("semver-spec")

ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"

addCommandAlias(
"validateCode",
Expand All @@ -47,9 +47,3 @@ import java.io.File
scalastyleFailOnError := true
scalastyleTarget := new File("target/scalastyle-report/scalastyle-result.xml")
Test / scalastyleTarget := new File("target/scalastyle-report/scalastyle-test-result.xml")

// GitHub Packages config.
githubOwner := "felipebonezi"
githubRepository := "playframework-core"
githubTokenSource :=
TokenSource.Environment("GITHUB_TOKEN") || TokenSource.GitConfig("github.token")
2 changes: 1 addition & 1 deletion conf/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ play {
environment = "development"
maintainer = "Felipe Bonezi"
host = "http://localhost:9000"
name = "playframework-core"
name = "play-ground"
}
i18n {
langs = [ "en-US" ]
Expand Down
8 changes: 1 addition & 7 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object Common extends AutoPlugin {

override def requires: Plugins = JvmPlugin && HeaderPlugin

val repoName = "playframework-core"
val repoName = "play-ground"

override def globalSettings: Seq[Setting[_]] =
Seq(
Expand All @@ -32,12 +32,6 @@ object Common extends AutoPlugin {
),
// on the web
homepage := Some(url(s"https://github.com/felipebonezi/$repoName")),
scmInfo := Some(
ScmInfo(
url(s"https://github.com/felipebonezi/$repoName"),
s"scm:git:[email protected]:felipebonezi/$repoName.git"
)
),
developers += Developer(
"contributors",
"Contributors",
Expand Down
2 changes: 1 addition & 1 deletion project/PlayCore.scala → project/PlayGround.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import sbt.Def
import sbt._
import sbt.plugins.JvmPlugin

object PlayCore extends AutoPlugin {
object PlayGround extends AutoPlugin {
private lazy val conf: Config = ConfigFactory.parseFile(new File("conf/reference.conf"))

override def trigger: PluginTrigger = allRequirements
Expand Down
4 changes: 0 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,3 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0")
// See more: https://github.com/etsy/sbt-checkstyle-plugin
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1")
dependencyOverrides += "com.puppycrawl.tools" % "checkstyle" % "10.3.1"

// GitHub Packages plugin.
// See more: https://dev.to/gjuoun/publish-your-scala-library-to-github-packages-4p80
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")

0 comments on commit 7465b60

Please sign in to comment.