Skip to content

Commit

Permalink
Merge pull request #676 from ihostage/change-group-id
Browse files Browse the repository at this point in the history
Change groupId to `org.playframework.twirl`
  • Loading branch information
mkurz authored Oct 6, 2023
2 parents 00181b0 + 1315c48 commit e214554
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 19 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![OpenCollective](https://img.shields.io/opencollective/all/playframework?label=financial%20contributors&logo=open-collective)](https://opencollective.com/playframework)

[![Build Status](https://github.com/playframework/twirl/actions/workflows/build-test.yml/badge.svg)](https://github.com/playframework/twirl/actions/workflows/build-test.yml)
[![Maven](https://img.shields.io/maven-central/v/com.typesafe.play/twirl-api_2.13.svg?logo=apache-maven)](https://mvnrepository.com/artifact/com.typesafe.play/twirl-api_2.13)
[![Maven](https://img.shields.io/maven-central/v/org.playframework.twirl/twirl-api_2.13.svg?logo=apache-maven)](https://mvnrepository.com/artifact/org.playframework.twirl/twirl-api_2.13)
[![Repository size](https://img.shields.io/github/repo-size/playframework/twirl.svg?logo=git)](https://github.com/playframework/twirl)
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)
[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/playframework/twirl&style=flat)](https://mergify.com)
Expand All @@ -35,9 +35,11 @@ To add the sbt plugin to your project add the sbt plugin dependency in
`project/plugins.sbt`:

```scala
// twirl 1.6 and newer:
addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "LATEST_VERSION")
// twirl 1.5 and before:
// twirl 2.0 and newer:
addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % "LATEST_VERSION")
// twirl 1.6:
addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.1")
// twirl 1.5.1 and before:
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
```

Expand Down
10 changes: 3 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

import Dependencies._

import com.typesafe.tools.mima.core.DirectMissingMethodProblem
import com.typesafe.tools.mima.core.IncompatibleMethTypeProblem
import com.typesafe.tools.mima.core.MissingClassProblem
import com.typesafe.tools.mima.core.Problem
import com.typesafe.tools.mima.core.ProblemFilters
import sbtcrossproject.CrossPlugin.autoImport.crossProject
import org.scalajs.jsenv.nodejs.NodeJSEnv

Expand All @@ -21,7 +16,8 @@ def parserCombinators(scalaVersion: String) = "org.scala-lang.modules" %% "scala

val mimaSettings = Seq(
mimaPreviousArtifacts := Set(
organization.value %% name.value % previousStableVersion.value
// TODO: change back to `organization.value` after first release with new groupId
"com.typesafe.play" %% name.value % previousStableVersion.value
.getOrElse(throw new Error("Unable to determine previous version"))
),
mimaBinaryIssueFilters ++= Seq(
Expand Down Expand Up @@ -128,7 +124,7 @@ lazy val plugin = project
.dependsOn(compiler)
.settings(
name := "sbt-twirl",
organization := "com.typesafe.play",
organization := "org.playframework.twirl",
scalaVersion := Scala212,
libraryDependencies += "org.scalatest" %%% "scalatest" % ScalaTestVersion % Test,
Compile / resourceGenerators += generateVersionFile.taskValue,
Expand Down
1 change: 0 additions & 1 deletion docs/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ lazy val docs = project
scalaVersion := "2.13.12",
// use special snapshot play version for now
resolvers ++= DefaultOptions.resolvers(snapshot = true),
resolvers += Resolver.typesafeRepo("releases"),
libraryDependencies += component("play-test") % "test",
libraryDependencies += component("play-specs2") % "test",
PlayDocsKeys.javaManualSourceDirectories := (baseDirectory.value / "manual" / "working" / "javaGuide" ** "code").get,
Expand Down
2 changes: 1 addition & 1 deletion docs/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ lazy val sbtTwirl = ProjectRef(Path.fileProperty("user.dir").getParentFile, "plu

resolvers ++= DefaultOptions.resolvers(snapshot = true)

addSbtPlugin("com.typesafe.play" % "play-docs-sbt-plugin" % sys.props.getOrElse("play.version", "2.9.0-RC2"))
addSbtPlugin("org.playframework" % "play-docs-sbt-plugin" % sys.props.getOrElse("play.version", "3.0.0-M2"))
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
2 changes: 1 addition & 1 deletion project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ object Common extends AutoPlugin {

override def globalSettings =
Seq(
organization := "com.typesafe.play",
organization := "org.playframework.twirl",
organizationName := "The Play Framework Project",
organizationHomepage := Some(url("https://playframework.com/")),
homepage := Some(url(s"https://github.com/playframework/${repoName}")),
Expand Down
7 changes: 6 additions & 1 deletion sbt-twirl/src/main/scala/play/twirl/sbt/SbtTwirl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ object SbtTwirl extends AutoPlugin {
case None => false
}
// TODO: can we use %%% from sbt-crossproject now that we're on Scala.js 1.x?
val baseModuleID = "com.typesafe.play" %% "twirl-api" % twirlVersion.value
val groupId = {
// TODO: change to >=2.0.0 before first release
if (VersionNumber(twirlVersion.value).matchesSemVer(SemanticSelector(">=1.6.1"))) "org.playframework.twirl"
else "com.typesafe.play"
}
val baseModuleID = groupId %% "twirl-api" % twirlVersion.value
if (isScalaJS) baseModuleID.cross(crossVer) else baseModuleID
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

addSbtPlugin("com.typesafe.play" % "sbt-twirl" % sys.props("project.version"))
addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % sys.props("project.version"))
2 changes: 1 addition & 1 deletion sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

addSbtPlugin("com.typesafe.play" % "sbt-twirl" % sys.props("project.version"))
addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % sys.props("project.version"))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

addSbtPlugin("com.typesafe.play" % "sbt-twirl" % sys.props("project.version"))
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2")
addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % sys.props("project.version"))
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2")

0 comments on commit e214554

Please sign in to comment.