Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ jobs:
- name: Release SBT plugin
if: github.event.inputs.publish_sbt_plugin == 'Y'
working-directory: plugins/sbt/graphql-java-codegen-sbt-plugin
run: sbt release with-defaults default-tag-exists-answer k
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to
image


#
# PUBLISH OF RELEASE VERSION COMPLETED
Expand Down
45 changes: 24 additions & 21 deletions plugins/sbt/graphql-java-codegen-sbt-plugin/build.sbt
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
import sbtrelease.ReleaseStateTransformations._
import sbt.url

name := "graphql-codegen-sbt-plugin"
// must be equals to oss Group Id
organization := "io.github.jxnu-liguobin"
val jValidationVersion = settingKey[String]("default java Validation api").withRank(KeyRanks.Invisible)
jValidationVersion := "2.0.1.Final"
val javaValidationVersion = settingKey[String]("default Java Validation API")
.withRank(KeyRanks.Invisible)
javaValidationVersion := "2.0.1.Final"

// keep version is equals with parent project `graphql-java-codegen`.
// Plugin don't need to care about the scala version, just the SBT version.
lazy val `graphql-codegen-sbt-plugin` = Project(id = "graphql-codegen-sbt-plugin", base = file("."))
.enablePlugins(SbtPlugin, BuildInfoPlugin)
.settings(Publishing.publishSettings)
.settings(
sbtPlugin := true,
scriptedBufferLog := false,
commands ++= Commands.value,
scriptedLaunchOpts += s"-Dplugin.version=${version.value}",
scalacOptions += "-target:jvm-1.8",
releaseIgnoreUntrackedFiles := true,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("^ publishSigned"),
setNextVersion,
commitNextVersion,
pushChanges
),
libraryDependencies ++= Seq(
"io.github.kobylynskyi" % "graphql-java-codegen" % (ThisBuild / version).value,
"org.freemarker" % "freemarker" % "2.3.31",
"com.graphql-java" % "graphql-java" % "20.2",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.12.1",
"com.typesafe" % "config" % "1.4.2"
),
buildInfoKeys := Seq[BuildInfoKey](name, version, sbtVersion, jValidationVersion),
buildInfoKeys := Seq[BuildInfoKey](name, version, sbtVersion, javaValidationVersion),
buildInfoPackage := "io.github.dreamylost.graphql.codegen"
)

inThisBuild(
List(
name := "graphql-codegen-sbt-plugin",
organization := "io.github.jxnu-liguobin",
sonatypeCredentialHost := "oss.sonatype.org",
sonatypeRepository := "https://oss.sonatype.org/service/local",
homepage := Some(url("https://github.com/kobylynskyi/graphql-java-codegen")),
licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT")),
developers := List(
Developer(
id = "jxnu-liguobin",
name = "梦境迷离",
email = "[email protected]",
url = url("https://github/jxnu-liguobin")
)
)
)
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.7.1
sbt.version=1.9.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.kobylynskyi.graphql.codegen.supplier._
import sbt.{ AutoPlugin, PluginTrigger, _ }
import sbt.Keys.{ sLog, sourceManaged, _ }
import sbt.internal.util.complete.DefaultParsers.spaceDelimited
import com.kobylynskyi.graphql.codegen.kotlin.KotlinGraphQLCodegen

import java.nio.file.{ Path, Paths }
import java.util.{ HashMap => JHashMap, HashSet => JHashSet, List => JList }
Expand All @@ -32,13 +31,13 @@ class GraphQLCodegenPlugin(configuration: Configuration, private[codegen] val co
with Compat {
self =>

private val jValidation = BuildInfo.jValidationVersion
private val codegen = BuildInfo.version
private val javaValidation = BuildInfo.javaValidationVersion
private val codegen = BuildInfo.version

object GlobalImport extends GraphQLCodegenKeys {

lazy val GraphQLCodegenPluginDependencies: Def.Setting[Seq[ModuleID]] = libraryDependencies ++= Seq(
"javax.validation" % "validation-api" % javaxValidationApiVersion.value.getOrElse(jValidation),
"javax.validation" % "validation-api" % javaxValidationApiVersion.value.getOrElse(javaValidation),
"io.github.kobylynskyi" % "graphql-java-codegen" % graphqlJavaCodegenVersion.value.getOrElse(codegen)
)

Expand Down Expand Up @@ -282,14 +281,6 @@ class GraphQLCodegenPlugin(configuration: Configuration, private[codegen] val co
mappingConfig,
mappingConfigSupplier.orNull
)
case KOTLIN =>
new KotlinGraphQLCodegen(
getSchemas(),
_introspectionResult,
_outputDir,
mappingConfig,
mappingConfigSupplier.orNull
)
case _ =>
throw new LanguageNotSupportedException(language)
}
Expand Down