[gradle-plugin] Annotate commonSourceSet with @Deprecated

This commit is contained in:
Ilya Matveev
2018-02-22 13:20:46 +03:00
committed by ilmat192
parent 9c812e0c90
commit d15f55d807
4 changed files with 9 additions and 4 deletions
@@ -51,7 +51,8 @@ abstract class KonanCompileConfig<T: KonanCompileTask>(name: String,
override fun nativeLibraries(vararg libs: Any) = forEach { it.nativeLibraries(*libs) }
override fun nativeLibraries(libs: FileCollection) = forEach { it.nativeLibraries(libs) }
override fun commonSourceSet(sourceSetName: String) = forEach { it.commonSourceSet(sourceSetName) }
@Deprecated("Use commonSourceSets instead", ReplaceWith("commonSourceSets(sourceSetName)"))
override fun commonSourceSet(sourceSetName: String) = forEach { it.commonSourceSets(sourceSetName) }
override fun commonSourceSets(vararg sourceSetNames: String) = forEach { it.commonSourceSets(*sourceSetNames) }
override fun enableMultiplatform(flag: Boolean) = forEach { it.enableMultiplatform(flag) }
@@ -54,6 +54,9 @@ interface KonanCompileSpec: KonanBuildingSpec {
// DSL. Multiplatform projects
fun enableMultiplatform(flag: Boolean)
// TODO: Get rid of commonSourceSet in 0.7
@Deprecated("Use commonSourceSets instead", ReplaceWith("commonSourceSets(sourceSetName)"))
fun commonSourceSet(sourceSetName: String)
fun commonSourceSets(vararg sourceSetNames: String)
@@ -157,6 +157,7 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
enableMultiplatform = flag
}
@Deprecated("Use commonSourceSets instead", ReplaceWith("commonSourceSets(sourceSetName)"))
override fun commonSourceSet(sourceSetName: String) {
commonSourceSets = listOf(sourceSetName)
enableMultiplatform(true)
@@ -151,7 +151,7 @@ class MultiplatformSpecification extends BaseKonanSpecification {
konanArtifacts {
library('foo') {
enableMultiplatform true
commonSourceSet 'common'
commonSourceSets 'common'
}
}
@@ -305,7 +305,7 @@ class MultiplatformSpecification extends BaseKonanSpecification {
konanArtifacts {
library('foo') {
enableMultiplatform true
commonSourceSet 'common'
commonSourceSets 'common'
}
}
@@ -339,7 +339,7 @@ class MultiplatformSpecification extends BaseKonanSpecification {
it.buildFile.append("""
konanArtifacts {
library('foo') {
commonSourceSet 'common'
commonSourceSets 'common'
}
}