[Gradle] Remove necessary @Input's in K/Native tasks
^KT-43293
This commit is contained in:
-3
@@ -19,13 +19,10 @@ internal class KotlinNativeCommonizerToolRunner(
|
|||||||
) : KotlinToolRunner(context) {
|
) : KotlinToolRunner(context) {
|
||||||
|
|
||||||
class Settings(
|
class Settings(
|
||||||
@get:Input
|
|
||||||
val kotlinPluginVersion: String,
|
val kotlinPluginVersion: String,
|
||||||
classpathProvider: () -> Set<File>,
|
classpathProvider: () -> Set<File>,
|
||||||
@get:Input
|
|
||||||
val customJvmArgs: List<String>
|
val customJvmArgs: List<String>
|
||||||
) {
|
) {
|
||||||
@get:Classpath
|
|
||||||
val classpath by lazy(classpathProvider)
|
val classpath by lazy(classpathProvider)
|
||||||
|
|
||||||
constructor(project: Project) : this(
|
constructor(project: Project) : this(
|
||||||
|
|||||||
-9
@@ -61,16 +61,10 @@ internal abstract class KotlinNativeToolRunner(
|
|||||||
) : KotlinToolRunner(executionContext) {
|
) : KotlinToolRunner(executionContext) {
|
||||||
|
|
||||||
class Settings(
|
class Settings(
|
||||||
@get:Input
|
|
||||||
val konanVersion: CompilerVersion,
|
val konanVersion: CompilerVersion,
|
||||||
@get:Input
|
|
||||||
val konanHome: String,
|
val konanHome: String,
|
||||||
@get:InputFile
|
|
||||||
@get:PathSensitive(PathSensitivity.ABSOLUTE)
|
|
||||||
val konanPropertiesFile: File,
|
val konanPropertiesFile: File,
|
||||||
@get:Input
|
|
||||||
val jvmArgs: List<String>,
|
val jvmArgs: List<String>,
|
||||||
@get:Classpath
|
|
||||||
val classpath: FileCollection
|
val classpath: FileCollection
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -194,10 +188,7 @@ internal class KotlinNativeCompilerRunner(
|
|||||||
executionContext: GradleExecutionContext
|
executionContext: GradleExecutionContext
|
||||||
) : KotlinNativeToolRunner("konanc", settings.parent, executionContext) {
|
) : KotlinNativeToolRunner("konanc", settings.parent, executionContext) {
|
||||||
class Settings(
|
class Settings(
|
||||||
@get:Nested
|
|
||||||
val parent: KotlinNativeToolRunner.Settings,
|
val parent: KotlinNativeToolRunner.Settings,
|
||||||
|
|
||||||
@get:Input
|
|
||||||
val disableKonanDaemon: Boolean,
|
val disableKonanDaemon: Boolean,
|
||||||
) {
|
) {
|
||||||
constructor(project: Project) : this(
|
constructor(project: Project) : this(
|
||||||
|
|||||||
+1
-2
@@ -76,8 +76,7 @@ internal open class CInteropCommonizerTask
|
|||||||
|
|
||||||
override val outputDirectory: File = project.buildDir.resolve("classes/kotlin/commonizer")
|
override val outputDirectory: File = project.buildDir.resolve("classes/kotlin/commonizer")
|
||||||
|
|
||||||
@get:Nested
|
private val runnerSettings = KotlinNativeCommonizerToolRunner.Settings(project)
|
||||||
internal val runnerSettings = KotlinNativeCommonizerToolRunner.Settings(project)
|
|
||||||
|
|
||||||
private val konanHome = project.file(project.konanHome)
|
private val konanHome = project.file(project.konanHome)
|
||||||
private val commonizerLogLevel = project.commonizerLogLevel
|
private val commonizerLogLevel = project.commonizerLogLevel
|
||||||
|
|||||||
+3
-6
@@ -389,8 +389,7 @@ constructor(
|
|||||||
kotlinOptions.freeCompilerArgs + ((languageSettings as? DefaultLanguageSettingsBuilder)?.freeCompilerArgs ?: emptyList())
|
kotlinOptions.freeCompilerArgs + ((languageSettings as? DefaultLanguageSettingsBuilder)?.freeCompilerArgs ?: emptyList())
|
||||||
}
|
}
|
||||||
|
|
||||||
@get:Nested
|
private val runnerSettings = KotlinNativeCompilerRunner.Settings(project)
|
||||||
internal val runnerSettings = KotlinNativeCompilerRunner.Settings(project)
|
|
||||||
private val isAllowCommonizer: Boolean by lazy { project.isAllowCommonizer() }
|
private val isAllowCommonizer: Boolean by lazy { project.isAllowCommonizer() }
|
||||||
|
|
||||||
override fun kotlinOptions(fn: KotlinCommonOptions.() -> Unit) {
|
override fun kotlinOptions(fn: KotlinCommonOptions.() -> Unit) {
|
||||||
@@ -483,8 +482,7 @@ constructor(
|
|||||||
final override val compilation: KotlinNativeCompilation
|
final override val compilation: KotlinNativeCompilation
|
||||||
get() = binary.compilation
|
get() = binary.compilation
|
||||||
|
|
||||||
@get:Nested
|
private val runnerSettings = KotlinNativeCompilerRunner.Settings(project)
|
||||||
internal val runnerSettings = KotlinNativeCompilerRunner.Settings(project)
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
dependsOn(project.provider { compilation.compileKotlinTaskProvider })
|
dependsOn(project.provider { compilation.compileKotlinTaskProvider })
|
||||||
@@ -1183,8 +1181,7 @@ open class CInteropProcess
|
|||||||
val outputFile: File
|
val outputFile: File
|
||||||
get() = outputFileProvider.get()
|
get() = outputFileProvider.get()
|
||||||
|
|
||||||
@get:Nested
|
private val runnerSettings = KotlinNativeToolRunner.Settings(project)
|
||||||
internal val runnerSettings = KotlinNativeToolRunner.Settings(project)
|
|
||||||
|
|
||||||
// Inputs and outputs.
|
// Inputs and outputs.
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -151,8 +151,7 @@ open class KotlinNativeLinkArtifactTask @Inject constructor(
|
|||||||
return destinationDir.resolve(outFileName)
|
return destinationDir.resolve(outFileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
@get:Nested
|
private val runnerSettings = KotlinNativeCompilerRunner.Settings(project)
|
||||||
internal val runnerSettings = KotlinNativeCompilerRunner.Settings(project)
|
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun link() {
|
fun link() {
|
||||||
|
|||||||
Reference in New Issue
Block a user