[Gradle] Don't expose sourcesElements when withSourcesJar(publish = false)
^KT-57652 Verification Pending
This commit is contained in:
committed by
Space Team
parent
1833347a7d
commit
0b07a20a70
+10
-6
@@ -201,12 +201,16 @@ abstract class AbstractKotlinTargetConfigurator<KotlinTargetType : KotlinTarget>
|
||||
}
|
||||
}
|
||||
|
||||
configurations.maybeCreate(target.sourcesElementsConfigurationName).apply {
|
||||
description = "Source files of main compilation of ${target.name}."
|
||||
isVisible = false
|
||||
isCanBeResolved = false
|
||||
isCanBeConsumed = true
|
||||
configureSourcesPublicationAttributes(target)
|
||||
project.whenEvaluated {
|
||||
if (target.internal.isSourcesPublishable) {
|
||||
configurations.maybeCreate(target.sourcesElementsConfigurationName).apply {
|
||||
description = "Source files of main compilation of ${target.name}."
|
||||
isVisible = false
|
||||
isCanBeResolved = false
|
||||
isCanBeConsumed = true
|
||||
configureSourcesPublicationAttributes(target)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (createTestCompilation) {
|
||||
|
||||
Reference in New Issue
Block a user