diff --git a/src/main/kotlin/tech/stonks/kvizard/KVisionModuleBuilder.kt b/src/main/kotlin/tech/stonks/kvizard/KVisionModuleBuilder.kt index 93aed9c..9d5f718 100644 --- a/src/main/kotlin/tech/stonks/kvizard/KVisionModuleBuilder.kt +++ b/src/main/kotlin/tech/stonks/kvizard/KVisionModuleBuilder.kt @@ -20,6 +20,7 @@ import tech.stonks.kvizard.generator.KtorTreeGenerator import tech.stonks.kvizard.generator.TreeGenerator import tech.stonks.kvizard.step.library_choice.LibraryChoiceStep import tech.stonks.kvizard.utils.backgroundTask +import tech.stonks.kvizard.utils.runGradle import java.io.File class KVisionModuleBuilder : ModuleBuilder() { @@ -64,7 +65,7 @@ class KVisionModuleBuilder : ModuleBuilder() { } private fun runGradleTasks(project: Project) { - GradleExecuteTaskAction.runGradle(project, DefaultRunExecutor.getRunExecutorInstance(), project.basePath!!, "compileKotlinMetadata") + project.runGradle("compileKotlinMetadata") } private fun createGenerator(): TreeGenerator { diff --git a/src/main/kotlin/tech/stonks/kvizard/utils/file.kt b/src/main/kotlin/tech/stonks/kvizard/utils/file.kt index 2131a3d..ae2bddb 100644 --- a/src/main/kotlin/tech/stonks/kvizard/utils/file.kt +++ b/src/main/kotlin/tech/stonks/kvizard/utils/file.kt @@ -1,8 +1,10 @@ package tech.stonks.kvizard.utils +import com.intellij.execution.executors.DefaultRunExecutor import com.intellij.ide.fileTemplates.FileTemplateManager import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile +import org.jetbrains.plugins.gradle.action.GradleExecuteTaskAction import java.io.File fun File.dir(name: String, body: File.() -> Unit = {}) { @@ -45,6 +47,10 @@ private fun getTemplateData(templateName: String, attributes: Map