Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦境迷离
Graphql Java Codegen
提交
0d957910
G
Graphql Java Codegen
项目概览
梦境迷离
/
Graphql Java Codegen
11 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Graphql Java Codegen
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
0d957910
编写于
12月 25, 2020
作者:
梦境迷离
提交者:
GitHub
12月 24, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Scala DBT: refactor to add BuildInfo (#466)
* refactor to add buildinfo * refactor to add buildinfo
上级
bdc689ed
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
45 deletion
+18
-45
plugins/sbt/graphql-java-codegen-sbt-plugin/build.sbt
plugins/sbt/graphql-java-codegen-sbt-plugin/build.sbt
+13
-10
plugins/sbt/graphql-java-codegen-sbt-plugin/project/Dependencies.scala
...raphql-java-codegen-sbt-plugin/project/Dependencies.scala
+0
-27
plugins/sbt/graphql-java-codegen-sbt-plugin/project/plugins.sbt
...s/sbt/graphql-java-codegen-sbt-plugin/project/plugins.sbt
+2
-1
plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/GraphQLCodegenPlugin.scala
...hub/dreamylost/graphql/codegen/GraphQLCodegenPlugin.scala
+3
-7
未找到文件。
plugins/sbt/graphql-java-codegen-sbt-plugin/build.sbt
浏览文件 @
0d957910
import
Dependencies._
import
sbtrelease.ReleaseStateTransformations._
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"
)
jValidationVersion
:=
"2.0.1.Final"
// publish only root project
//publish / skip := true
//keep version is equals with parent project `graphql-java-codegen`
// 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
).
enablePlugins
(
SbtPlugin
,
BuildInfoPlugin
).
settings
(
Publishing
.
publishSettings
).
settings
(
sbtPlugin
:=
true
,
scalaVersion
:=
Versions
.
scala212
,
crossScalaVersions
:=
List
(
Versions
.
scala212
,
Versions
.
scala211
),
scalaVersion
:=
"2.12.12"
,
scriptedBufferLog
:=
false
,
scriptedLaunchOpts
+=
s
"-Dplugin.version=${version.value}"
,
scalacOptions
+=
"-target:jvm-1.8"
,
...
...
@@ -32,5 +30,10 @@ lazy val `graphql-codegen-sbt-plugin` = Project(id = "graphql-codegen-sbt-plugin
setNextVersion
,
commitNextVersion
,
pushChanges
)).
settings
(
Compiles
.
selfDependencies
)
\ No newline at end of file
),
libraryDependencies
++=
Seq
(
"io.github.kobylynskyi"
%
"graphql-java-codegen"
%
(
version
in
ThisBuild
).
value
),
buildInfoKeys
:=
Seq
[
BuildInfoKey
](
name
,
version
,
scalaVersion
,
sbtVersion
,
jValidationVersion
),
buildInfoPackage
:=
"io.github.dreamylost.graphql.codegen"
)
\ No newline at end of file
plugins/sbt/graphql-java-codegen-sbt-plugin/project/Dependencies.scala
已删除
100644 → 0
浏览文件 @
bdc689ed
import
sbt.Keys.libraryDependencies
import
sbt._
/**
* The dependence of the plugin itself
*
* @author 梦境迷离 dreamylost
* @since 2020-07-19
* @version v1.0
*/
object
Dependencies
{
object
Versions
{
lazy
val
scala212
=
"2.12.12"
lazy
val
scala211
=
"2.11.12"
val
codegen
=
"4.0.2-SNAPSHOT"
}
import
Versions._
object
Compiles
{
val
selfDependencies
=
libraryDependencies
++=
Seq
(
"io.github.kobylynskyi"
%
"graphql-java-codegen"
%
codegen
)
}
}
plugins/sbt/graphql-java-codegen-sbt-plugin/project/plugins.sbt
浏览文件 @
0d957910
addSbtPlugin
(
"org.scalariform"
%
"sbt-scalariform"
%
"1.8.3"
)
addSbtPlugin
(
"org.xerial.sbt"
%
"sbt-sonatype"
%
"2.3"
)
addSbtPlugin
(
"com.jsuereth"
%
"sbt-pgp"
%
"2.0.1"
)
addSbtPlugin
(
"com.github.gseitz"
%
"sbt-release"
%
"1.0.13"
)
\ No newline at end of file
addSbtPlugin
(
"com.github.gseitz"
%
"sbt-release"
%
"1.0.13"
)
addSbtPlugin
(
"com.eed3si9n"
%
"sbt-buildinfo"
%
"0.10.0"
)
\ No newline at end of file
plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/GraphQLCodegenPlugin.scala
浏览文件 @
0d957910
...
...
@@ -29,11 +29,9 @@ object GraphQLCodegenPlugin extends GraphQLCodegenPlugin(Compile, configurationP
class
GraphQLCodegenPlugin
(
configuration
:
Configuration
,
private
[
codegen
]
val
configurationPostfix
:
String
=
""
)
extends
AutoPlugin
with
Compat
{
self
=>
//TODO if impl GraphQLCodegenConfiguration, can not use settingKey in override method
//override this by graphqlJavaCodegenVersion and javaxValidationApiVersion
private
val
jValidation
=
"2.0.1.Final"
private
val
codegen
=
"4.0.2-SNAPSHOT"
private
val
jValidation
=
BuildInfo
.
jValidationVersion
private
val
codegen
=
BuildInfo
.
version
object
GlobalImport
extends
GraphQLCodegenKeys
{
...
...
@@ -121,7 +119,6 @@ class GraphQLCodegenPlugin(configuration: Configuration, private[codegen] val co
private
def
getMappingConfig
()
:
Def.Initialize
[
MappingConfig
]
=
Def
.
setting
[
MappingConfig
]
{
//TODO use builder
val
mappingConfig
=
new
MappingConfig
mappingConfig
.
setPackageName
((
generatePackageName
in
GraphQLCodegenConfig
).
value
.
orNull
)
mappingConfig
.
setCustomTypesMapping
((
customTypesMapping
in
GraphQLCodegenConfig
).
value
)
...
...
@@ -168,8 +165,7 @@ class GraphQLCodegenPlugin(configuration: Configuration, private[codegen] val co
mappingConfig
.
setResponseProjectionMaxDepth
((
responseProjectionMaxDepth
in
GraphQLCodegenConfig
).
value
)
mappingConfig
.
setRelayConfig
((
relayConfig
in
GraphQLCodegenConfig
).
value
)
mappingConfig
.
setGeneratedLanguage
((
generatedLanguage
in
GraphQLCodegenConfig
).
value
)
// sLog.value.debug(s"Current mapping config is <$mappingConfig>") // NO toString
sLog
.
value
.
info
(
s
"Version is <${BuildInfo.toString}>"
)
mappingConfig
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录