[Gradle] kgp-idea: Implement isIdeaProjectLevel and KlibExtra
KT-55189
This commit is contained in:
committed by
Space Team
parent
bb039ae535
commit
0f533a8a2f
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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.idea.tcs.extras
|
||||
|
||||
import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinBinaryDependency
|
||||
import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinExtra
|
||||
import org.jetbrains.kotlin.tooling.core.extrasKeyOf
|
||||
import org.jetbrains.kotlin.tooling.core.getValue
|
||||
import org.jetbrains.kotlin.tooling.core.setValue
|
||||
import java.io.Serializable
|
||||
|
||||
var IdeaKotlinBinaryDependency.klibExtra by KlibExtra.key
|
||||
|
||||
@IdeaKotlinExtra
|
||||
data class KlibExtra(
|
||||
val builtInsPlatform: String?,
|
||||
val uniqueName: String?,
|
||||
val shortName: String?,
|
||||
val packageFqName: String?,
|
||||
val nativeTargets: List<String>?,
|
||||
val commonizerTarget: String?,
|
||||
val isInterop: Boolean?
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID = 0L
|
||||
val key = extrasKeyOf<KlibExtra>()
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* 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.idea.tcs.extras
|
||||
|
||||
import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinBinaryDependency
|
||||
import org.jetbrains.kotlin.tooling.core.extrasKeyOf
|
||||
import org.jetbrains.kotlin.tooling.core.getValue
|
||||
import org.jetbrains.kotlin.tooling.core.setValue
|
||||
|
||||
val isIdeaProjectLevelKey = extrasKeyOf<Boolean>("IdeaKotlinBinaryDependency.isIdeaProjectLevel")
|
||||
|
||||
/**
|
||||
* Marks any binary dependency as Global in the sense of "this library is considered
|
||||
* the same, no matter in which Gradle project / IntelliJ module it will be used
|
||||
*/
|
||||
var IdeaKotlinBinaryDependency.isIdeaProjectLevel by isIdeaProjectLevelKey
|
||||
Reference in New Issue
Block a user