Better approach to handle 'moduleName' in project level DSL
Now project level DSL only configures base part of module name, which latter is enhanced by Kotlin compilation suffix. In this case 'KotlinCompilation.moduleName' is not used. Additionally, 'KotlinJvmTask.moduleName' usage was deprecated in favor of 'compilerOptions.moduleName'. Though warning is only produced in case project is using 'org.jetbrains.kotlin.jvm' or 'org.jetbrains.kotlin.android' plugins. - 'moduleName' is always required to be non-null. ^KT-57688 Fixed
This commit is contained in:
committed by
Space Team
parent
08ba63df90
commit
f7522ec796
@@ -1540,6 +1540,7 @@ public abstract interface class org/jetbrains/kotlin/gradle/tasks/Kapt : org/jet
|
||||
|
||||
public abstract interface class org/jetbrains/kotlin/gradle/tasks/KaptGenerateStubs : org/jetbrains/kotlin/gradle/tasks/KotlinJvmCompile {
|
||||
public abstract fun getKaptClasspath ()Lorg/gradle/api/file/ConfigurableFileCollection;
|
||||
public abstract fun getModuleName ()Lorg/gradle/api/provider/Property;
|
||||
public abstract fun getStubsDir ()Lorg/gradle/api/file/DirectoryProperty;
|
||||
}
|
||||
|
||||
@@ -1606,6 +1607,7 @@ public final class org/jetbrains/kotlin/gradle/tasks/KotlinJavaToolchain$JdkSett
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/kotlin/gradle/tasks/KotlinJvmCompile : org/jetbrains/kotlin/gradle/dsl/KotlinCompile, org/jetbrains/kotlin/gradle/tasks/BaseKotlinCompile, org/jetbrains/kotlin/gradle/tasks/KotlinCompilationTask {
|
||||
public abstract fun getModuleName ()Lorg/gradle/api/provider/Property;
|
||||
public abstract fun getParentKotlinOptions ()Lorg/gradle/api/provider/Property;
|
||||
}
|
||||
|
||||
|
||||
+16
@@ -81,6 +81,14 @@ interface KotlinJvmCompile : BaseKotlinCompile,
|
||||
KotlinCompileDeprecated<KotlinJvmOptionsDeprecated>,
|
||||
KotlinCompilationTask<KotlinJvmCompilerOptions> {
|
||||
|
||||
@get:Deprecated(
|
||||
message = "Please migrate to compilerOptions.moduleName",
|
||||
replaceWith = ReplaceWith("compilerOptions.moduleName")
|
||||
)
|
||||
@get:Optional
|
||||
@get:Input
|
||||
override val moduleName: Property<String>
|
||||
|
||||
// JVM specific
|
||||
@get:Internal("Takes part in compiler args.")
|
||||
@Deprecated(
|
||||
@@ -96,6 +104,14 @@ interface KaptGenerateStubs : KotlinJvmCompile {
|
||||
|
||||
@get:Internal("Not an input, just passed as kapt args. ")
|
||||
val kaptClasspath: ConfigurableFileCollection
|
||||
|
||||
@get:Deprecated(
|
||||
message = "Please migrate to compilerOptions.moduleName",
|
||||
replaceWith = ReplaceWith("compilerOptions.moduleName")
|
||||
)
|
||||
@get:Optional
|
||||
@get:Input
|
||||
override val moduleName: Property<String>
|
||||
}
|
||||
|
||||
interface BaseKapt : Task {
|
||||
|
||||
Reference in New Issue
Block a user