Do not use code preprocessing anymore
This commit is contained in:
@@ -5,8 +5,8 @@ apply plugin: 'kotlin-platform-common'
|
||||
configureDist(project)
|
||||
configurePublishing(project)
|
||||
|
||||
def commonSrcDir = "${buildDir}/common-sources"
|
||||
def commonTestSrcDir = "${buildDir}/common-test-sources"
|
||||
def commonSrcDir = "../src"
|
||||
def commonTestSrcDir = "../test"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@@ -28,11 +28,8 @@ dependencies {
|
||||
testCompile project(":kotlin-test:kotlin-test-annotations-common")
|
||||
}
|
||||
|
||||
createPreprocessorTask(project, "Main", "${projectDir}/../src/kotlin", commonSrcDir)
|
||||
createPreprocessorTask(project, "Test", "${projectDir}/../test", commonTestSrcDir)
|
||||
|
||||
compileKotlinCommon {
|
||||
dependsOn preprocessSourcesMain
|
||||
dependsOn(":prepare:build.version:writeStdlibVersion")
|
||||
// dependsOn ":prepare:compiler:prepare-compiler-with-bootstrap-runtime"
|
||||
// compilerJarFile = compilerJarWithBootstrapRuntime
|
||||
}
|
||||
@@ -48,9 +45,6 @@ compileKotlinCommon {
|
||||
}
|
||||
*/
|
||||
|
||||
compileTestKotlinCommon {
|
||||
dependsOn preprocessSourcesTest
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ sourceSets {
|
||||
if(!System.properties.'idea.active') {
|
||||
srcDir '../jvm/test'
|
||||
srcDir '../common/test'
|
||||
srcDir '../common/build/common-test-sources'
|
||||
srcDir '../test'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,6 @@ compileKotlin {
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesTest")
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform"]
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ sourceSets {
|
||||
if(!System.properties.'idea.active') {
|
||||
srcDir '../jvm/test'
|
||||
srcDir '../common/test'
|
||||
srcDir '../common/build/common-test-sources'
|
||||
srcDir '../test'
|
||||
srcDir '../jdk7/test'
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,6 @@ compileKotlin {
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesTest")
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform"]
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ sourceSets {
|
||||
if(!System.properties.'idea.active') {
|
||||
srcDir '../jvm/test'
|
||||
srcDir '../common/test'
|
||||
srcDir '../common/build/common-test-sources'
|
||||
srcDir '../test'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,6 @@ compileKotlin {
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesTest")
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform"]
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ sourceSets {
|
||||
if(!System.properties.'idea.active') {
|
||||
srcDir '../jvm/test'
|
||||
srcDir '../common/test'
|
||||
srcDir '../common/build/common-test-sources'
|
||||
srcDir '../test'
|
||||
srcDir '../jre7/test'
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,6 @@ compileKotlin {
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesTest")
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable", "-Xmulti-platform"]
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ configurePublishing(project)
|
||||
|
||||
def builtinsSrcDir = "${buildDir}/builtin-sources"
|
||||
def builtinsSrcDir2 = "${buildDir}/builtin-sources-for-builtins"
|
||||
def commonSrcDir = "${projectDir}/../common/src/build/common-sources"
|
||||
def commonSrcDir = "${projectDir}/../src/kotlin"
|
||||
def commonSrcDir2 = "${projectDir}/../common/src"
|
||||
|
||||
def builtinsDir = "${rootDir}/core/builtins"
|
||||
def experimentalSrcDir = "${rootDir}/libraries/stdlib/experimental"
|
||||
@@ -43,7 +44,6 @@ sourceSets {
|
||||
kotlin {
|
||||
srcDir builtinsSrcDir
|
||||
srcDir jsSrcDir
|
||||
srcDir commonSrcDir
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,13 +130,12 @@ compileBuiltinsKotlin2Js {
|
||||
}
|
||||
|
||||
compileKotlin2Js {
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesMain")
|
||||
dependsOn prepareBuiltinsSources
|
||||
kotlinOptions {
|
||||
outputFile = "${buildDir}/classes/main/kotlin.js"
|
||||
sourceMap = true
|
||||
sourceMapPrefix = "./"
|
||||
freeCompilerArgs += ["-source-map-base-dirs", [builtinsSrcDir, jsSrcDir, commonSrcDir].collect { file(it).absoluteFile }.join(File.pathSeparator)]
|
||||
freeCompilerArgs += ["-source-map-base-dirs", [builtinsSrcDir, jsSrcDir, commonSrcDir, commonSrcDir2].collect { file(it).absoluteFile }.join(File.pathSeparator)]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +152,6 @@ compileExperimentalKotlin2Js {
|
||||
}
|
||||
|
||||
compileTestKotlin2Js {
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesTest")
|
||||
kotlinOptions {
|
||||
moduleKind = "umd"
|
||||
}
|
||||
@@ -213,7 +211,7 @@ task compileJs(type: JavaExec) {
|
||||
if (prefixToRemove != null) sourcePath.substring(prefixToRemove.length()) else sourcePath
|
||||
}
|
||||
|
||||
def sourceMapSourcesBaseDirs = [jsSrcDir, jsSrcJsDir, builtinsSrcDir, commonSrcDir, projectDir, experimentalSrcDir]
|
||||
def sourceMapSourcesBaseDirs = [jsSrcDir, jsSrcJsDir, builtinsSrcDir, commonSrcDir, commonSrcDir2, projectDir, experimentalSrcDir]
|
||||
|
||||
sourceMap.sourcesContent = sourceMap.sources.collect { sourceName ->
|
||||
def text = sourceMapSourcesBaseDirs.collect { file("$it/$sourceName") }.find { it.exists() }?.text
|
||||
|
||||
@@ -108,8 +108,6 @@ check.dependsOn(dexMethodCount)
|
||||
|
||||
compileKotlin {
|
||||
dependsOn(":core:builtins:serialize")
|
||||
dependsOn(":prepare:build.version:writeStdlibVersion")
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesMain")
|
||||
classpath += files("${rootDir}/dist/builtins")
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = [
|
||||
@@ -123,10 +121,6 @@ compileKotlin {
|
||||
}
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
dependsOn(":kotlin-stdlib-common:preprocessSourcesTest")
|
||||
}
|
||||
|
||||
|
||||
compileExperimentalKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
Reference in New Issue
Block a user