Commit 032e781e authored by Saif Abdul Cassim's avatar Saif Abdul Cassim

converted a couple more files to work without kotlin-dsl important note is I...

converted a couple more files to work without kotlin-dsl important note is I replaced project.configure(()->Any) method with its intended logic
parent 4971e2d0
......@@ -135,7 +135,7 @@ fun Project.intellijUltimateRootDir() =
fun Project.runIdeTask(name: String, ideaPluginDir: File, ideaSandboxDir: File, body: JavaExec.() -> Unit): JavaExec {
return task<JavaExec>(name) {
return getTasks().create(name,JavaExec::class.java) {
val ideaSandboxConfigDir = File(ideaSandboxDir, "config")
classpath = mainSourceSet.runtimeClasspath
......
......@@ -9,7 +9,6 @@ import org.gradle.api.internal.file.copy.SingleParentCopySpec
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.tasks.Copy
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.extra
import org.jetbrains.kotlin.pill.ArtifactElement.*
import org.jetbrains.kotlin.pill.POrderRoot.*
import java.io.File
......@@ -104,7 +103,7 @@ sealed class ArtifactElement {
fun generateKotlinPluginArtifactFile(rootProject: Project): PFile {
val mainIdeaPluginTask = rootProject.tasks.getByName("ideaPlugin")
val gradleArtifactDir = File(rootProject.extra["ideaPluginDir"] as File, "lib")
val gradleArtifactDir = File(rootProject.getExtensions().getExtraProperties().get("ideaPluginDir") as File, "lib")
val ideaPluginTasks = mainIdeaPluginTask.taskDependencies
.getDependencies(mainIdeaPluginTask)
......@@ -115,7 +114,7 @@ fun generateKotlinPluginArtifactFile(rootProject: Project): PFile {
// Copy kotlinc directory
root.add(Directory("kotlinc").apply {
val kotlincDirectory = rootProject.extra["distKotlinHomeDir"].toString()
val kotlincDirectory = rootProject.getExtensions().getExtraProperties().get("distKotlinHomeDir").toString()
add(DirectoryCopy(File(kotlincDirectory)))
})
......@@ -136,7 +135,7 @@ fun generateKotlinPluginArtifactFile(rootProject: Project): PFile {
}
@Suppress("UNCHECKED_CAST")
for (projectPath in sourcePath.project.extra["projectsToShadow"] as List<String>) {
for (projectPath in sourcePath.project.getExtensions().getExtraProperties().get("projectsToShadow") as List<String>) {
val jpsModuleName = rootProject.findProject(projectPath)!!.name + ".src"
kotlinPluginJar.add(ModuleOutput(jpsModuleName))
}
......
......@@ -11,7 +11,6 @@ import org.gradle.api.artifacts.*
import org.gradle.api.tasks.*
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.plugins.JavaPluginConvention
import org.gradle.kotlin.dsl.configure
import org.gradle.plugins.ide.idea.IdeaPlugin
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.internal.HasConvention
......@@ -537,6 +536,6 @@ fun List<CollectedConfiguration>.collectDependencies(): List<DependencyInfo> {
private val Project.sourceSets: SourceSetContainer
get() {
lateinit var result: SourceSetContainer
project.configure<JavaPluginConvention> { result = sourceSets }
result = project.getConvention().getPlugin(JavaPluginConvention::class.java).getSourceSets() // could be wrong translation
return result
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment