Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
4a3c8286
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4a3c8286
编写于
9月 16, 2017
作者:
I
Ilya Gorbunov
提交者:
Ilya Chernikov
9月 20, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix developer organization in pom, make artifact manifests same as in libraries
上级
d441f7ad
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
36 deletion
+10
-36
buildSrc/src/main/kotlin/CommonUtil.kt
buildSrc/src/main/kotlin/CommonUtil.kt
+0
-22
buildSrc/src/main/kotlin/artifacts.kt
buildSrc/src/main/kotlin/artifacts.kt
+7
-9
buildSrc/src/main/kotlin/plugins/PublishedKotlinModule.kt
buildSrc/src/main/kotlin/plugins/PublishedKotlinModule.kt
+2
-4
prepare/compiler/build.gradle.kts
prepare/compiler/build.gradle.kts
+1
-1
未找到文件。
buildSrc/src/main/kotlin/CommonUtil.kt
浏览文件 @
4a3c8286
...
@@ -32,28 +32,6 @@ fun AbstractTask.dependsOnTaskIfExistsRec(task: String, project: Project? = null
...
@@ -32,28 +32,6 @@ fun AbstractTask.dependsOnTaskIfExistsRec(task: String, project: Project? = null
}
}
}
}
fun
Jar
.
setupRuntimeJar
(
implementationTitle
:
String
):
Unit
{
dependsOn
(
":prepare:build.version:prepare"
)
manifest
.
attributes
.
apply
{
put
(
"Built-By"
,
project
.
rootProject
.
extra
[
"manifest.impl.vendor"
])
put
(
"Implementation-Vendor"
,
project
.
rootProject
.
extra
[
"manifest.impl.vendor"
])
put
(
"Implementation-Title"
,
implementationTitle
)
put
(
"Implementation-Version"
,
project
.
rootProject
.
extra
[
"buildNumber"
])
}
// from(project.configurations.getByName("build-version").files, action = { into("META-INF/") })
}
fun
Jar
.
setupSourceJar
(
implementationTitle
:
String
):
Unit
{
dependsOn
(
"classes"
)
setupRuntimeJar
(
implementationTitle
+
" Sources"
)
project
.
pluginManager
.
withPlugin
(
"java-base"
)
{
from
(
project
.
the
<
JavaPluginConvention
>().
sourceSets
[
"main"
].
allSource
)
}
classifier
=
"sources"
project
.
artifacts
.
add
(
"archives"
,
this
)
}
inline
fun
<
T
:
Any
>
Project
.
withJavaPlugin
(
crossinline
body
:
()
->
T
?):
T
?
{
inline
fun
<
T
:
Any
>
Project
.
withJavaPlugin
(
crossinline
body
:
()
->
T
?):
T
?
{
var
res
:
T
?
=
null
var
res
:
T
?
=
null
pluginManager
.
withPlugin
(
"java"
)
{
pluginManager
.
withPlugin
(
"java"
)
{
...
...
buildSrc/src/main/kotlin/artifacts.kt
浏览文件 @
4a3c8286
...
@@ -84,7 +84,7 @@ fun Project.runtimeJar(taskName: String = "jar", body: Jar.() -> Unit = {}): Jar
...
@@ -84,7 +84,7 @@ fun Project.runtimeJar(taskName: String = "jar", body: Jar.() -> Unit = {}): Jar
fun
Project
.
sourcesJar
(
body
:
Jar
.()
->
Unit
=
{}):
Jar
=
fun
Project
.
sourcesJar
(
body
:
Jar
.()
->
Unit
=
{}):
Jar
=
getOrCreateTask
(
"sourcesJar"
)
{
getOrCreateTask
(
"sourcesJar"
)
{
duplicatesStrategy
=
DuplicatesStrategy
.
EXCLUDE
duplicatesStrategy
=
DuplicatesStrategy
.
EXCLUDE
setupPublicJar
(
"Sources"
)
classifier
=
"sources"
try
{
try
{
project
.
pluginManager
.
withPlugin
(
"java-base"
)
{
project
.
pluginManager
.
withPlugin
(
"java-base"
)
{
from
(
project
.
the
<
JavaPluginConvention
>().
sourceSets
[
"main"
].
allSource
)
from
(
project
.
the
<
JavaPluginConvention
>().
sourceSets
[
"main"
].
allSource
)
...
@@ -100,7 +100,7 @@ fun Project.sourcesJar(body: Jar.() -> Unit = {}): Jar =
...
@@ -100,7 +100,7 @@ fun Project.sourcesJar(body: Jar.() -> Unit = {}): Jar =
fun
Project
.
javadocJar
(
body
:
Jar
.()
->
Unit
=
{}):
Jar
=
fun
Project
.
javadocJar
(
body
:
Jar
.()
->
Unit
=
{}):
Jar
=
getOrCreateTask
(
"javadocJar"
)
{
getOrCreateTask
(
"javadocJar"
)
{
duplicatesStrategy
=
DuplicatesStrategy
.
EXCLUDE
duplicatesStrategy
=
DuplicatesStrategy
.
EXCLUDE
setupPublicJar
(
"JavaDoc"
)
classifier
=
"javadoc"
tasks
.
findByName
(
"javadoc"
)
?.
let
{
it
as
Javadoc
}
?.
takeIf
{
it
.
enabled
}
?.
let
{
tasks
.
findByName
(
"javadoc"
)
?.
let
{
it
as
Javadoc
}
?.
takeIf
{
it
.
enabled
}
?.
let
{
dependsOn
(
it
)
dependsOn
(
it
)
from
(
it
.
destinationDir
)
from
(
it
.
destinationDir
)
...
@@ -180,16 +180,14 @@ private fun Project.runtimeJarTaskIfExists(): Task? =
...
@@ -180,16 +180,14 @@ private fun Project.runtimeJarTaskIfExists(): Task? =
fun
ConfigurationContainer
.
getOrCreate
(
name
:
String
):
Configuration
=
findByName
(
name
)
?:
create
(
name
)
fun
ConfigurationContainer
.
getOrCreate
(
name
:
String
):
Configuration
=
findByName
(
name
)
?:
create
(
name
)
fun
Jar
.
setupPublicJar
(
classifier
:
String
=
""
,
classifierDescr
:
String
?
=
null
)
{
fun
Jar
.
setupPublicJar
(
classifier
:
String
=
""
)
{
this
.
classifier
=
classifier
.
toLowerCase
()
this
.
classifier
=
classifier
dependsOn
(
":prepare:build.version:prepare"
)
manifest
.
attributes
.
apply
{
manifest
.
attributes
.
apply
{
put
(
"Built-By"
,
project
.
rootProject
.
extra
[
"manifest.impl.vendor"
])
put
(
"Implementation-Vendor"
,
"JetBrains"
)
put
(
"Implementation-Vendor"
,
project
.
rootProject
.
extra
[
"manifest.impl.vendor"
])
put
(
"Implementation-Title"
,
project
.
the
<
BasePluginConvention
>().
archivesBaseName
)
put
(
"Implementation-Title"
,
"${project.description} ${classifierDescr ?: classifier}"
.
trim
())
put
(
"Implementation-Version"
,
project
.
rootProject
.
extra
[
"buildNumber"
])
put
(
"Implementation-Version"
,
project
.
rootProject
.
extra
[
"buildNumber"
])
put
(
"Build-Jdk"
,
System
.
getProperty
(
"java.version"
))
}
}
// from(project.configurations.getByName("build-version").files, action = { into("META-INF/") })
}
}
...
...
buildSrc/src/main/kotlin/plugins/PublishedKotlinModule.kt
浏览文件 @
4a3c8286
...
@@ -74,10 +74,8 @@ open class PublishedKotlinModule : Plugin<Project> {
...
@@ -74,10 +74,8 @@ open class PublishedKotlinModule : Plugin<Project> {
"developers"
{
"developers"
{
"developer"
{
"developer"
{
"name"
(
"Kotlin Team"
)
"name"
(
"Kotlin Team"
)
"organization"
{
setProperty
(
"organization"
,
"JetBrains"
)
"name"
(
"JetBrains"
)
"organizationUrl"
(
"https://www.jetbrains.com"
)
"url"
(
"https://www.jetbrains.com"
)
}
}
}
}
}
}
}
...
...
prepare/compiler/build.gradle.kts
浏览文件 @
4a3c8286
...
@@ -88,7 +88,7 @@ val packCompiler by task<ShadowJar> {
...
@@ -88,7 +88,7 @@ val packCompiler by task<ShadowJar> {
destinationDir
=
File
(
buildDir
,
"libs"
)
destinationDir
=
File
(
buildDir
,
"libs"
)
dependsOn
(
protobufFullTask
)
dependsOn
(
protobufFullTask
)
setupPublicJar
(
"before-proguard"
,
""
)
setupPublicJar
(
"before-proguard"
)
from
(
fatJarContents
)
from
(
fatJarContents
)
ideaSdkDeps
(
"jps-model.jar"
,
subdir
=
"jps"
).
forEach
{
from
(
zipTree
(
it
))
{
exclude
(
"META-INF/services/**"
)
}
}
ideaSdkDeps
(
"jps-model.jar"
,
subdir
=
"jps"
).
forEach
{
from
(
zipTree
(
it
))
{
exclude
(
"META-INF/services/**"
)
}
}
ideaSdkDeps
(
"oromatcher"
).
forEach
{
from
(
zipTree
(
it
))
{
exclude
(
"META-INF/jb/** META-INF/LICENSE"
)
}
}
ideaSdkDeps
(
"oromatcher"
).
forEach
{
from
(
zipTree
(
it
))
{
exclude
(
"META-INF/jb/** META-INF/LICENSE"
)
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录