Skip to content

Commit

Permalink
build 1.1.0 for kotlin 1.7.21
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeshustoff committed Apr 29, 2023
1 parent ecfaa97 commit 0b278ca
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class DiktStorageComponentContainerContributor : StorageComponentContainerContri
platform: TargetPlatform,
moduleDescriptor: ModuleDescriptor
) {
super.registerModuleComponents(container, platform, moduleDescriptor)
container.useInstance(DiktPlatformDiagnosticSuppressor())
container.useClashResolver(PlatformDiagnosticSuppressorClashesResolver())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ package dev.shustoff.dikt.compiler
import dev.shustoff.dikt.incremental.incrementalHelper
import dev.shustoff.dikt.message_collector.errorCollector
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.jetbrains.kotlin.com.intellij.mock.MockProject
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.extensions.StorageComponentContainerContributor

@OptIn(ExperimentalCompilerApi::class)
class DiktComponentRegistrar : CompilerPluginRegistrar() {
override val supportsK2: Boolean get() = true
class DiktComponentRegistrar : ComponentRegistrar {

override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) {
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
val errorCollector = errorCollector(configuration)
val incrementalCache = incrementalHelper(configuration)
StorageComponentContainerContributor.registerExtension(DiktStorageComponentContainerContributor())
IrGenerationExtension.registerExtension(DiktIrGenerationExtension(errorCollector, incrementalCache))
StorageComponentContainerContributor.registerExtension(project, DiktStorageComponentContainerContributor())
IrGenerationExtension.registerExtension(project, DiktIrGenerationExtension(errorCollector, incrementalCache))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ fun compile(root: File, vararg sourceFiles: SourceFile): KotlinCompilation.Resul
workingDir = root
//TODO: uncomment when fixed
// compilerPluginRegistrars = listOf(DiktComponentRegistrar())
componentRegistrars = listOf(DiktComponentRegistrarLegacy())
componentRegistrars = listOf(DiktComponentRegistrar())
inheritClassPath = true
sources = sourceFiles.asList()
verbose = false
useIR = true
// jvmTarget = JvmTarget.JVM_1_8.description
jvmTarget = JvmTarget.JVM_1_8.description
}.compile()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DiktGradlePlugin : KotlinCompilerPluginSupportPlugin {
}

companion object {
private const val version = "1.1.0-kotlin-1.8.10"
private const val version = "1.1.0-kotlin-1.7.21"
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ kotlin.js.webpack.major.version=5
kotlin.compiler.execution.strategy=in-process
org.gradle.jvmargs=-Xmx3g

kotlin_version=1.8.10
kotlin_version=1.7.21

# don't forget to update DiktGradlePlugin
VERSION_NAME=1.1.0-kotlin-1.8.10
VERSION_NAME=1.1.0-kotlin-1.7.21
dikt_sample_version=1.1.0-alpha6

GROUP=io.github.sergeshustoff.dikt
Expand Down

0 comments on commit 0b278ca

Please sign in to comment.