Use project.container instead of WrapUtil
In Gradle 5.2 the 'WrapUtil.toNamedDomainObjectSet' method was removed. This patches replaces usage of this method with call of the 'Project.container' method. Issue #KT-29725 Fixed
This commit is contained in:
+10
@@ -1524,4 +1524,14 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKt29725() {
|
||||
with(Project("new-mpp-native-libraries", GradleVersionRequired.Exact("5.2"))) {
|
||||
// Assert that a project with a native target can be configured with Gradle 5.2
|
||||
build("tasks") {
|
||||
assertSuccessful()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -26,14 +26,14 @@ open class KotlinNativeBinaryContainer @Inject constructor(
|
||||
) : AbstractKotlinNativeBinaryContainer(),
|
||||
DomainObjectSet<NativeBinary> by backingContainer
|
||||
{
|
||||
override val project: Project
|
||||
final override val project: Project
|
||||
get() = target.project
|
||||
|
||||
private val defaultCompilation: KotlinNativeCompilation
|
||||
get() = target.compilations.getByName(KotlinCompilation.MAIN_COMPILATION_NAME)
|
||||
|
||||
private val nameToBinary = mutableMapOf<String, NativeBinary>()
|
||||
internal val prefixGroups: NamedDomainObjectSet<PrefixGroup> = WrapUtil.toNamedDomainObjectSet(PrefixGroup::class.java)
|
||||
internal val prefixGroups: NamedDomainObjectSet<PrefixGroup> = project.container(PrefixGroup::class.java)
|
||||
|
||||
// region DSL getters.
|
||||
private inline fun <reified T : NativeBinary> getBinary(
|
||||
|
||||
Reference in New Issue
Block a user