[KPM] Implement IdeaKotlinVariant

KT-51262
KT-51220
This commit is contained in:
sebastian.sellmair
2022-02-16 08:41:46 +01:00
committed by Space
parent 851303e62a
commit 11d408f71e
6 changed files with 103 additions and 18 deletions
@@ -0,0 +1,20 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.gradle.kpm.idea
import java.io.File
import java.io.Serializable
interface IdeaKotlinCompilationOutput : Serializable {
val classesDirs: Set<File>
val resourcesDir: File?
}
@InternalKotlinGradlePluginApi
data class IdeaKotlinCompilationOutputImpl(
override val classesDirs: Set<File>,
override val resourcesDir: File?
) : IdeaKotlinCompilationOutput
@@ -9,13 +9,13 @@ import java.io.Serializable
interface IdeaKotlinModule : Serializable {
val moduleIdentifier: IdeaKotlinModuleIdentifier
val fragments: Collection<IdeaKotlinFragment>
}
val fragments: List<IdeaKotlinFragment>
}
@InternalKotlinGradlePluginApi
data class IdeaKotlinModuleImpl(
override val moduleIdentifier: IdeaKotlinModuleIdentifier,
override val fragments: Collection<IdeaKotlinFragment>
override val fragments: List<IdeaKotlinFragment>
) : IdeaKotlinModule {
@InternalKotlinGradlePluginApi
@@ -0,0 +1,20 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.gradle.kpm.idea
import java.io.Serializable
interface IdeaKotlinVariant : IdeaKotlinFragment, Serializable {
val variantAttributes: Map<String, String>
val compilationOutputs: IdeaKotlinCompilationOutput
}
@InternalKotlinGradlePluginApi
data class IdeaKotlinVariantImpl(
internal val fragment: IdeaKotlinFragment,
override val variantAttributes: Map<String, String>,
override val compilationOutputs: IdeaKotlinCompilationOutput,
) : IdeaKotlinVariant, IdeaKotlinFragment by fragment