Remove deprecated ConfigureUtil usages in KotlinNativeBinaryContainer
^KT-46019 In Progress
This commit is contained in:
+5
-6
@@ -72,15 +72,15 @@ private fun generateFactoryMethods(binaryType: BinaryType): String {
|
|||||||
fun $methodName(
|
fun $methodName(
|
||||||
namePrefix: String,
|
namePrefix: String,
|
||||||
buildTypes: Collection<$nativeBuildType> = $nativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<$nativeBuildType> = $nativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<$className>
|
||||||
) = $methodName(namePrefix, buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = $methodName(namePrefix, buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates $binaryDescription with the default name prefix for each build type and configures it. */
|
/** Creates $binaryDescription with the default name prefix for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun $methodName(
|
fun $methodName(
|
||||||
buildTypes: Collection<$nativeBuildType> = $nativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<$nativeBuildType> = $nativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<$className>
|
||||||
) = $methodName(buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = $methodName(buildTypes) { configure.execute(this) }
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,10 +138,9 @@ fun generateAbstractKotlinNativeBinaryContainer() {
|
|||||||
val superClassName = typeName("org.gradle.api.DomainObjectSet", nativeBinaryBaseClass.fqName)
|
val superClassName = typeName("org.gradle.api.DomainObjectSet", nativeBinaryBaseClass.fqName)
|
||||||
|
|
||||||
val imports = """
|
val imports = """
|
||||||
import groovy.lang.Closure
|
import org.gradle.api.Action
|
||||||
import org.gradle.api.DomainObjectSet
|
import org.gradle.api.DomainObjectSet
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.util.ConfigureUtil
|
|
||||||
import $MPP_PACKAGE.*
|
import $MPP_PACKAGE.*
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
|
|||||||
+21
-22
@@ -1,9 +1,8 @@
|
|||||||
package org.jetbrains.kotlin.gradle.dsl
|
package org.jetbrains.kotlin.gradle.dsl
|
||||||
|
|
||||||
import groovy.lang.Closure
|
import org.gradle.api.Action
|
||||||
import org.gradle.api.DomainObjectSet
|
import org.gradle.api.DomainObjectSet
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.util.ConfigureUtil
|
|
||||||
import org.jetbrains.kotlin.gradle.plugin.mpp.*
|
import org.jetbrains.kotlin.gradle.plugin.mpp.*
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY! Generated by org.jetbrains.kotlin.generators.gradle.dsl.MppNativeBinaryDSLCodegenKt
|
// DO NOT EDIT MANUALLY! Generated by org.jetbrains.kotlin.generators.gradle.dsl.MppNativeBinaryDSLCodegenKt
|
||||||
@@ -188,15 +187,15 @@ abstract class AbstractKotlinNativeBinaryContainer : DomainObjectSet<NativeBinar
|
|||||||
fun executable(
|
fun executable(
|
||||||
namePrefix: String,
|
namePrefix: String,
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<Executable>
|
||||||
) = executable(namePrefix, buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = executable(namePrefix, buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates an executable with the default name prefix for each build type and configures it. */
|
/** Creates an executable with the default name prefix for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun executable(
|
fun executable(
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<Executable>
|
||||||
) = executable(buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = executable(buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates a static library with the given [namePrefix] for each build type and configures it. */
|
/** Creates a static library with the given [namePrefix] for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
@@ -218,15 +217,15 @@ abstract class AbstractKotlinNativeBinaryContainer : DomainObjectSet<NativeBinar
|
|||||||
fun staticLib(
|
fun staticLib(
|
||||||
namePrefix: String,
|
namePrefix: String,
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<StaticLibrary>
|
||||||
) = staticLib(namePrefix, buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = staticLib(namePrefix, buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates a static library with the default name prefix for each build type and configures it. */
|
/** Creates a static library with the default name prefix for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun staticLib(
|
fun staticLib(
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<StaticLibrary>
|
||||||
) = staticLib(buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = staticLib(buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates a shared library with the given [namePrefix] for each build type and configures it. */
|
/** Creates a shared library with the given [namePrefix] for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
@@ -248,15 +247,15 @@ abstract class AbstractKotlinNativeBinaryContainer : DomainObjectSet<NativeBinar
|
|||||||
fun sharedLib(
|
fun sharedLib(
|
||||||
namePrefix: String,
|
namePrefix: String,
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<SharedLibrary>
|
||||||
) = sharedLib(namePrefix, buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = sharedLib(namePrefix, buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates a shared library with the default name prefix for each build type and configures it. */
|
/** Creates a shared library with the default name prefix for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun sharedLib(
|
fun sharedLib(
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<SharedLibrary>
|
||||||
) = sharedLib(buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = sharedLib(buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates an Objective-C framework with the given [namePrefix] for each build type and configures it. */
|
/** Creates an Objective-C framework with the given [namePrefix] for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
@@ -278,15 +277,15 @@ abstract class AbstractKotlinNativeBinaryContainer : DomainObjectSet<NativeBinar
|
|||||||
fun framework(
|
fun framework(
|
||||||
namePrefix: String,
|
namePrefix: String,
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<Framework>
|
||||||
) = framework(namePrefix, buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = framework(namePrefix, buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates an Objective-C framework with the default name prefix for each build type and configures it. */
|
/** Creates an Objective-C framework with the default name prefix for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun framework(
|
fun framework(
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<Framework>
|
||||||
) = framework(buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = framework(buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates a test executable with the given [namePrefix] for each build type and configures it. */
|
/** Creates a test executable with the given [namePrefix] for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
@@ -308,14 +307,14 @@ abstract class AbstractKotlinNativeBinaryContainer : DomainObjectSet<NativeBinar
|
|||||||
fun test(
|
fun test(
|
||||||
namePrefix: String,
|
namePrefix: String,
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<TestExecutable>
|
||||||
) = test(namePrefix, buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = test(namePrefix, buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
/** Creates a test executable with the default name prefix for each build type and configures it. */
|
/** Creates a test executable with the default name prefix for each build type and configures it. */
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun test(
|
fun test(
|
||||||
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
buildTypes: Collection<NativeBuildType> = NativeBuildType.DEFAULT_BUILD_TYPES,
|
||||||
configureClosure: Closure<*>
|
configure: Action<TestExecutable>
|
||||||
) = test(buildTypes) { ConfigureUtil.configure(configureClosure, this) }
|
) = test(buildTypes) { configure.execute(this) }
|
||||||
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -22,7 +22,7 @@ Use the following naming scheme:
|
|||||||
executable([debug]) -> debugExecutable
|
executable([debug]) -> debugExecutable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
open class KotlinNativeBinaryContainer @Inject constructor(
|
abstract class KotlinNativeBinaryContainer @Inject constructor(
|
||||||
override val target: KotlinNativeTarget,
|
override val target: KotlinNativeTarget,
|
||||||
backingContainer: DomainObjectSet<NativeBinary>
|
backingContainer: DomainObjectSet<NativeBinary>
|
||||||
) : AbstractKotlinNativeBinaryContainer(),
|
) : AbstractKotlinNativeBinaryContainer(),
|
||||||
|
|||||||
Reference in New Issue
Block a user