<commit_before>package org.jetbrains.kotlin.gradle.frontend.webpack

import org.gradle.api.*
import org.jetbrains.kotlin.gradle.frontend.*
import org.jetbrains.kotlin.gradle.frontend.util.*

object WebPackLauncher : Launcher {
    override fun apply(packageManager: PackageManager, project: Project, startTask: Task, stopTask: Task) {
        project.afterEvaluate {
            if (project.frontendExtension.bundles().any { it is WebPackExtension }) {
                val run = project.tasks.create("webpack-run", WebPackRunTask::class.java) { t ->
                    t.start = true
                    t.description = "Start webpack dev server (if not yet running)"
                    t.group = WebPackBundler.WebPackGroup
                }
                val stop = project.tasks.create("webpack-stop", WebPackRunTask::class.java) { t ->
                    t.start = false
                    t.description = "Stop webpack dev server (if running)"
                    t.group = WebPackBundler.WebPackGroup
                }

                project.withTask(GenerateWebPackConfigTask::class) { task ->
                    run.dependsOn(task)
                }
                project.withTask(RelativizeSourceMapTask::class) { task ->
                    run.dependsOn(task)
                }

                startTask.dependsOn(run)
                stopTask.dependsOn(stop)
            }
        }
    }
}<commit_msg>Introduce Kotlin DCE support<commit_after>package org.jetbrains.kotlin.gradle.frontend.webpack

import org.gradle.api.*
import org.gradle.language.jvm.tasks.*
import org.jetbrains.kotlin.gradle.frontend.*
import org.jetbrains.kotlin.gradle.frontend.util.*
import org.jetbrains.kotlin.gradle.tasks.*

object WebPackLauncher : Launcher {
    override fun apply(packageManager: PackageManager, project: Project, startTask: Task, stopTask: Task) {
        project.afterEvaluate {
            if (project.frontendExtension.bundles().any { it is WebPackExtension }) {
                val run = project.tasks.create("webpack-run", WebPackRunTask::class.java) { t ->
                    t.start = true
                    t.description = "Start webpack dev server (if not yet running)"
                    t.group = WebPackBundler.WebPackGroup
                }
                val stop = project.tasks.create("webpack-stop", WebPackRunTask::class.java) { t ->
                    t.start = false
                    t.description = "Stop webpack dev server (if running)"
                    t.group = WebPackBundler.WebPackGroup
                }

                project.withTask(GenerateWebPackConfigTask::class) { task ->
                    run.dependsOn(task)
                }
                project.withTask(RelativizeSourceMapTask::class) { task ->
                    run.dependsOn(task)
                }

                project.withTask<KotlinJsDce> { task ->
                    run.dependsOn(task)
                }
                project.withTask<ProcessResources> { task ->
                    run.dependsOn(task)
                }

                startTask.dependsOn(run)
                stopTask.dependsOn(stop)
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09613572101790764, 'fraction_numerical': 0.0, 'mean_word_length': 1.6960203217612193, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4560545', 'n_tokens_mistral': 896, 'n_tokens_neox': 819, 'n_words': 151}