<commit_before>plugins {
	kotlin("js")
	id("kotlinx-serialization") version "1.3.0" apply true
}

repositories {
    mavenCentral()
	jcenter()
	maven("https://kotlin.bintray.com/kotlinx")
}

kotlin {
	target {
		browser {
		}
	}

	sourceSets["main"].dependencies {
		implementation(project(":loritta-api"))
		implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.6.11")
		implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.0.1")
		implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:0.9.1")
		implementation("io.ktor:ktor-client-js:1.3.0")
	}


	tasks {
		compileKotlinJs {
			kotlinOptions {
				// outputFile = "${sourceSets["main"].resources.outputDir}/SpicyMorenitta.js"
				sourceMap = true
			}
		}
		val unpackKotlinJsStdlib by registering {
			group = "build"
			description = "Unpack the Kotlin JavaScript standard library"
			val outputDir = file("$buildDir/$name")
			inputs.property("compileClasspath", configurations.compileClasspath.get())
			outputs.dir(outputDir)

			doLast {
				configurations.compileClasspath.get().all {
					copy {
						includeEmptyDirs = false
						from(zipTree(it))
						into(outputDir)
						include("**/*.js")
						exclude("META-INF/**")
					}
					true
				}
			}
		}
		val assembleWeb by registering(Copy::class) {
			group = "build"
			description = "Assemble the web application"
			includeEmptyDirs = false
			from(unpackKotlinJsStdlib)
			from(compileKotlinJs.get().destinationDir) {
				include("**/*.js")
				include("**/*.map")
				exclude("**/*.kjsm")
			}
			// from(runDceKotlinJs)
			into("$buildDir/web")
		}
		assemble {
			dependsOn(assembleWeb)
		}
	}
}<commit_msg>Apenas fazer o assemble da spicy-morenitta após compilar<commit_after>plugins {
	kotlin("js")
	id("kotlinx-serialization") version "1.3.0" apply true
}

repositories {
    mavenCentral()
	jcenter()
	maven("https://kotlin.bintray.com/kotlinx")
}

kotlin {
	target {
		browser {
		}
	}

	sourceSets["main"].dependencies {
		implementation(project(":loritta-api"))
		implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.6.11")
		implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.0.1")
		implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:0.9.1")
		implementation("io.ktor:ktor-client-js:1.3.0")
	}

	tasks {
		compileKotlinJs {
			kotlinOptions {
				// outputFile = "${sourceSets["main"].resources.outputDir}/SpicyMorenitta.js"
				sourceMap = true
			}
		}
		val unpackKotlinJsStdlib by registering {
			group = "build"
			description = "Unpack the Kotlin JavaScript standard library"
			val outputDir = file("$buildDir/$name")
			inputs.property("compileClasspath", configurations.compileClasspath.get())
			outputs.dir(outputDir)

			doLast {
				configurations.compileClasspath.get().all {
					copy {
						includeEmptyDirs = false
						from(zipTree(it))
						into(outputDir)
						include("**/*.js")
						exclude("META-INF/**")
					}
					true
				}
			}
		}
		val assembleWeb by registering(Copy::class) {
			group = "build"
			description = "Assemble the web application"
			includeEmptyDirs = false
			from(unpackKotlinJsStdlib)
			from(compileKotlinJs.get().destinationDir) {
				include("**/*.js")
				include("**/*.map")
				exclude("**/*.kjsm")
			}
			// from(runDceKotlinJs)
			into("$buildDir/web")
		}

		build.get().finalizedBy(assembleWeb)

		/* assemble {
			dependsOn(compileKotlinJs)
			// dependsOn(assembleWeb)
		} */
	}
}
{'fraction_non_alphanumeric': 0.1519976838448176, 'fraction_numerical': 0.009264620729588882, 'mean_word_length': 3.6189839572192515, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3010972', 'n_tokens_mistral': 1515, 'n_tokens_neox': 1215, 'n_words': 165}