K/N: Move classes and functions we don't want to expose
These classes we don't want to expose to Gradle DSL users from "kotlin-native-utils" to "kotlin-native-serializer" module. Reason: "kotlin-gradle-plugin-api" depends on "kotlin-native-utils", while "kotlin-native-serializer" is used only inside of IDEA plugin.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
a4daf9f1ff
commit
9b92d38917
@@ -21,7 +21,6 @@ import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
import org.jetbrains.kotlin.idea.caches.project.LibraryInfo
|
||||
import org.jetbrains.kotlin.idea.decompiler.textBuilder.LoggingErrorReporter
|
||||
import org.jetbrains.kotlin.konan.library.KonanLibrary
|
||||
import org.jetbrains.kotlin.konan.library.libraryResolver
|
||||
import org.jetbrains.kotlin.konan.utils.KonanFactories.DefaultResolvedDescriptorsFactory
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
@@ -30,7 +29,6 @@ import org.jetbrains.kotlin.resolve.konan.platform.KonanPlatform
|
||||
import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactoryService
|
||||
import org.jetbrains.kotlin.serialization.konan.KonanResolvedModuleDescriptors
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
import java.io.File.separatorChar
|
||||
|
||||
const val KONAN_CURRENT_ABI_VERSION = 1
|
||||
|
||||
@@ -92,6 +90,3 @@ fun ModuleInfo.createResolvedModuleDescriptors(
|
||||
// This is to preserve "capabilities" from the original IntelliJ LibraryInfo:
|
||||
) { konanLibrary -> libraryMap[konanLibrary.libraryFile.path]?.capabilities ?: emptyMap() }
|
||||
}
|
||||
|
||||
private val KonanLibrary.pureName
|
||||
get() = libraryName.substringAfterLast(separatorChar)
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.idea.caches.resolve.PlatformAnalysisSettings
|
||||
import org.jetbrains.kotlin.konan.file.File
|
||||
import org.jetbrains.kotlin.konan.library.KONAN_STDLIB_NAME
|
||||
import org.jetbrains.kotlin.konan.library.createKonanLibrary
|
||||
import org.jetbrains.kotlin.konan.utils.KonanFactories.DefaultDeserializedDescriptorFactory
|
||||
import org.jetbrains.kotlin.konan.util.KonanFactories.DefaultDeserializedDescriptorFactory
|
||||
import org.jetbrains.kotlin.resolve.konan.platform.KonanPlatform
|
||||
|
||||
class NativePlatformKindResolution : IdePlatformKindResolution {
|
||||
|
||||
@@ -22,7 +22,7 @@ dependencies {
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { none() }
|
||||
}
|
||||
|
||||
standardPublicJars()
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@ data class File constructor(internal val javaPath: Path) {
|
||||
}
|
||||
|
||||
fun deleteOnExit(): File {
|
||||
// Works only on the default file system,
|
||||
// Works only on the default file system,
|
||||
// but that's okay for now.
|
||||
javaPath.toFile().deleteOnExit()
|
||||
return this // Allow streaming.
|
||||
@@ -169,7 +169,7 @@ fun Path.recursiveCopyTo(destPath: Path) {
|
||||
|
||||
val relative = sourcePath.relativize(oldPath)
|
||||
val destFs = destPath.getFileSystem()
|
||||
// We are copying files between file systems,
|
||||
// We are copying files between file systems,
|
||||
// so pass the relative path through the String.
|
||||
val newPath = destFs.getPath(destPath.toString(), relative.toString())
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.konan.utils
|
||||
package org.jetbrains.kotlin.konan.util
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.konan.KonanModuleDescriptorFactory
|
||||
import org.jetbrains.kotlin.descriptors.konan.impl.KonanModuleDescriptorFactoryImpl
|
||||
@@ -13,7 +13,7 @@ dependencies {
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { none() }
|
||||
}
|
||||
|
||||
standardPublicJars()
|
||||
|
||||
@@ -20,11 +20,11 @@ interface KonanVersion : Serializable {
|
||||
}
|
||||
|
||||
data class KonanVersionImpl(
|
||||
override val meta: MetaVersion = MetaVersion.DEV,
|
||||
override val major: Int,
|
||||
override val minor: Int,
|
||||
override val maintenance: Int,
|
||||
override val build: Int = -1
|
||||
override val meta: MetaVersion = MetaVersion.DEV,
|
||||
override val major: Int,
|
||||
override val minor: Int,
|
||||
override val maintenance: Int,
|
||||
override val build: Int = -1
|
||||
) : KonanVersion {
|
||||
|
||||
override fun toString(showMeta: Boolean, showBuild: Boolean) = buildString {
|
||||
|
||||
Reference in New Issue
Block a user