Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
38fd9c3d
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,发现更多精彩内容 >>
未验证
提交
38fd9c3d
编写于
5月 20, 2020
作者:
S
Sergey Igushkin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix KT-39063 by not adding extendsFrom with metadata configurations
Issue #KT-39063 Fixed
上级
6fcdab23
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
100 addition
and
2 deletion
+100
-2
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/HierarchicalMppIT.kt
...t/kotlin/org/jetbrains/kotlin/gradle/HierarchicalMppIT.kt
+12
-0
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/build.gradle.kts
...ces/testProject/hierarchical-mpp-js-test/build.gradle.kts
+60
-0
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/gradle.properties
...es/testProject/hierarchical-mpp-js-test/gradle.properties
+1
-0
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/settings.gradle.kts
.../testProject/hierarchical-mpp-js-test/settings.gradle.kts
+12
-0
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/src/jsTest/kotlin/TestUseThirdPartyLib.kt
...cal-mpp-js-test/src/jsTest/kotlin/TestUseThirdPartyLib.kt
+11
-0
libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/resolver/KotlinCompilationNpmResolver.kt
...e/targets/js/npm/resolver/KotlinCompilationNpmResolver.kt
+4
-2
未找到文件。
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/HierarchicalMppIT.kt
浏览文件 @
38fd9c3d
...
...
@@ -422,6 +422,18 @@ class HierarchicalMppIT : BaseGradleIT() {
}
}
@Test
fun
testHmppDependenciesInJsTests
()
{
val
thirdPartyRepo
=
publishThirdPartyLib
(
withGranularMetadata
=
true
).
projectDir
.
parentFile
.
resolve
(
"repo"
)
with
(
Project
(
"hierarchical-mpp-js-test"
))
{
val
taskToExecute
=
":jsNodeTest"
build
(
taskToExecute
,
"-PthirdPartyRepo=$thirdPartyRepo"
)
{
assertSuccessful
()
assertTasksExecuted
(
taskToExecute
)
}
}
}
@Test
fun
testProcessingDependencyDeclaredInNonRootSourceSet
()
{
publishThirdPartyLib
(
withGranularMetadata
=
true
)
...
...
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/build.gradle.kts
0 → 100644
浏览文件 @
38fd9c3d
group
=
"com.h0tk3y.mpp.demo"
version
=
"1.0"
plugins
{
kotlin
(
"multiplatform"
)
}
repositories
{
val
thirdPartyRepo
:
String
by
project
maven
(
thirdPartyRepo
)
mavenLocal
()
jcenter
()
}
kotlin
{
sourceSets
{
val
commonMain
by
getting
{
dependencies
{
implementation
(
"com.example.thirdparty:third-party-lib:1.0"
)
implementation
(
kotlin
(
"stdlib-common"
))
}
}
val
commonTest
by
getting
{
dependencies
{
implementation
(
kotlin
(
"test-common"
))
implementation
(
kotlin
(
"test-annotations-common"
))
}
}
}
jvm
{
compilations
[
"main"
].
defaultSourceSet
{
dependencies
{
implementation
(
kotlin
(
"stdlib"
))
}
}
compilations
[
"test"
].
defaultSourceSet
{
dependencies
{
implementation
(
kotlin
(
"test-junit"
))
}
}
}
js
{
nodejs
()
browser
()
compilations
[
"main"
].
defaultSourceSet
{
dependencies
{
implementation
(
kotlin
(
"stdlib-js"
))
}
}
compilations
[
"test"
].
defaultSourceSet
{
dependencies
{
implementation
(
kotlin
(
"test-js"
))
}
}
}
}
\ No newline at end of file
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/gradle.properties
0 → 100644
浏览文件 @
38fd9c3d
kotlin.mpp.enableGranularSourceSetsMetadata
=
true
\ No newline at end of file
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/settings.gradle.kts
0 → 100644
浏览文件 @
38fd9c3d
pluginManagement
{
repositories
{
mavenLocal
()
gradlePluginPortal
()
}
val
kotlin_version
:
String
by
settings
plugins
{
kotlin
(
"multiplatform"
).
version
(
kotlin_version
)
}
}
rootProject
.
name
=
"my-lib-foo"
\ No newline at end of file
libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-js-test/src/jsTest/kotlin/TestUseThirdPartyLib.kt
0 → 100644
浏览文件 @
38fd9c3d
package
com.example
import
com.example.thirdparty.thirdPartyFun
import
kotlin.test.*
class
TestUseCoroutines
{
@Test
fun
testThirdPartyLibAvailable
()
{
assertEquals
(
"thirdPartyFun @ js"
,
thirdPartyFun
())
}
}
\ No newline at end of file
libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/resolver/KotlinCompilationNpmResolver.kt
浏览文件 @
38fd9c3d
...
...
@@ -20,6 +20,8 @@ import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
import
org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJsCompilation
import
org.jetbrains.kotlin.gradle.plugin.mpp.KotlinUsages
import
org.jetbrains.kotlin.gradle.plugin.mpp.disambiguateName
import
org.jetbrains.kotlin.gradle.plugin.sources.KotlinDependencyScope
import
org.jetbrains.kotlin.gradle.plugin.sources.sourceSetDependencyConfigurationByScope
import
org.jetbrains.kotlin.gradle.plugin.usesPlatformOf
import
org.jetbrains.kotlin.gradle.targets.js.ir.KotlinJsIrTarget
import
org.jetbrains.kotlin.gradle.targets.js.npm.*
...
...
@@ -123,8 +125,8 @@ internal class KotlinCompilationNpmResolver(
all
.
description
=
"NPM configuration for $compilation."
compilation
.
allKotlinSourceSets
.
forEach
{
sourceSet
->
sourceSet
.
relatedConfigurationNames
.
forEach
{
configurationNam
e
->
val
configuration
=
project
.
configurations
.
getByName
(
configurationNam
e
)
KotlinDependencyScope
.
values
().
forEach
{
scop
e
->
val
configuration
=
project
.
sourceSetDependencyConfigurationByScope
(
sourceSet
,
scop
e
)
all
.
extendsFrom
(
configuration
)
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录