Skip to content

Commit

Permalink
UPDATE_KOTLIN_VERSION: 1.9.0-dev-2695
Browse files Browse the repository at this point in the history
  • Loading branch information
neetopia committed Mar 2, 2023
1 parent f304391 commit 3b020dc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.K2MetadataCompilerArguments
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompilerOptionsDefault
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptionsDefault
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformCommonCompilerOptionsDefault
import org.jetbrains.kotlin.gradle.dsl.*
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilationInfo
import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
Expand Down Expand Up @@ -263,11 +260,14 @@ abstract class KspTaskNative @Inject internal constructor(
objectFactory: ObjectFactory,
providerFactory: ProviderFactory,
execOperations: ExecOperations
) : KotlinNativeCompile(compilation, objectFactory, providerFactory, execOperations), KspTask {

override val compilerOptions: KotlinCommonCompilerOptions =
objectFactory.newInstance(KotlinMultiplatformCommonCompilerOptionsDefault::class.java)
}
) : KotlinNativeCompile(
compilation,
objectFactory.newInstance(KotlinNativeCompilerOptionsDefault::class.java),
objectFactory,
providerFactory,
execOperations
),
KspTask

internal fun SubpluginOption.toArg() = "plugin:${KspGradleSubplugin.KSP_PLUGIN_ID}:$key=$value"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ class KspGradleSubplugin @Inject internal constructor(private val registry: Tool
classpathCfg + kotlinCompileTask.compilerPluginClasspath!!
kspTask.compilerPluginOptions.addPluginArgument(kotlinCompileTask.compilerPluginOptions)
}
kspTask.compilerOptions.moduleName
.convention(kotlinCompileTask.compilerOptions.moduleName.map { "$it-ksp" })
kspTask.commonSources.from(kotlinCompileTask.commonSources)
kspTask.options.add(FilesSubpluginOption("apclasspath", processorClasspath.files.toList()))
val kspOptions = kspTask.options.get().flatMap { listOf("-P", it.toArg()) }
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copied from kotlinc
org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx2200m -Dfile.encoding=UTF-8

kotlinBaseVersion=1.9.0-dev-1777
kotlinBaseVersion=1.9.0-dev-2695
agpBaseVersion=7.0.0
intellijVersion=203.8084.24
junitVersion=4.12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class KSPAATest : AbstractKSPAATest() {
runTest("../test-utils/testData/api/annotationInDependencies.kt")
}

@Disabled
@TestMetadata("annotationOnConstructorParameter.kt")
@Test
fun testAnnotationOnConstructorParameter() {
Expand Down

0 comments on commit 3b020dc

Please sign in to comment.