[Gradle][KT-53342] KotlinAndroidTarget: Let disambiguationClassifier be final
This commit is contained in:
committed by
Space
parent
194fff11bd
commit
38ada5c9fc
+1
-1
@@ -80,7 +80,7 @@ private fun syncKotlinAndAndroidSourceDirs(
|
|||||||
|
|
||||||
The Kotlin source set would win in this scenario.
|
The Kotlin source set would win in this scenario.
|
||||||
*/
|
*/
|
||||||
if (disambiguationClassifier == null || !androidSourceSet.name.startsWith(disambiguationClassifier)) {
|
if (!androidSourceSet.name.startsWith(disambiguationClassifier)) {
|
||||||
kotlinSourceSet.kotlin.srcDir("src/${androidSourceSet.name}/kotlin")
|
kotlinSourceSet.kotlin.srcDir("src/${androidSourceSet.name}/kotlin")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -20,12 +20,11 @@ import org.jetbrains.kotlin.gradle.utils.setProperty
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
abstract class KotlinAndroidTarget @Inject constructor(
|
abstract class KotlinAndroidTarget @Inject constructor(
|
||||||
override val targetName: String,
|
final override val targetName: String,
|
||||||
project: Project
|
project: Project
|
||||||
) : AbstractKotlinTarget(project) {
|
) : AbstractKotlinTarget(project) {
|
||||||
|
|
||||||
override var disambiguationClassifier: String? = null
|
final override val disambiguationClassifier: String = targetName
|
||||||
internal set
|
|
||||||
|
|
||||||
override val platformType: KotlinPlatformType
|
override val platformType: KotlinPlatformType
|
||||||
get() = KotlinPlatformType.androidJvm
|
get() = KotlinPlatformType.androidJvm
|
||||||
|
|||||||
-1
@@ -26,7 +26,6 @@ abstract class KotlinAndroidTargetPreset @Inject constructor(
|
|||||||
name,
|
name,
|
||||||
project
|
project
|
||||||
).apply {
|
).apply {
|
||||||
disambiguationClassifier = name
|
|
||||||
preset = this@KotlinAndroidTargetPreset
|
preset = this@KotlinAndroidTargetPreset
|
||||||
targetUnderConstruction = this
|
targetUnderConstruction = this
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user