Files
kotlin-fork/libraries/tools/kotlin-stdlib-gen/build.gradle
T
AJ Alt ed96197d6b Always use LF line endings in generated stdlib code
The code generation uses a mixture of literal `\n` characters and `appendln`. The latter insert `\r\n` on Windows by default, causing generated files to contain a mixture of line endings.

This commit sets the `line.separator` system property for the generator to `\n` so that `appendln` will never insert `\r` characters. As an additional measure, `.gitattributes` files were added to checkout generated stdlib files always with LF line endings.
2019-06-27 03:02:10 +03:00

37 lines
786 B
Groovy

apply plugin: 'kotlin'
sourceSets {
main {
kotlin.srcDir 'src'
resources.srcDir "$buildDir/copyright"
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion"
compile "org.jetbrains.kotlin:kotlin-reflect:$bootstrapKotlinVersion"
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-version"]
}
}
task copyCopyrightProfile(type: Copy) {
from "$rootDir/.idea/copyright"
into "$buildDir/copyright"
include 'apache.xml'
}
processResources {
dependsOn(copyCopyrightProfile)
}
task run(type: JavaExec) {
group 'application'
main 'generators.GenerateStandardLibKt'
classpath sourceSets.main.runtimeClasspath
args = ["${rootDir}"]
systemProperty 'line.separator', '\n'
}