Drop experimental stdlib sourceset
Haven't used it after pre 1.3
This commit is contained in:
@@ -26,8 +26,6 @@ def coroutinesExpJsSrcDir = "${rootDir}/libraries/stdlib/coroutines-experimental
|
|||||||
|
|
||||||
def builtinsDir = "${rootDir}/core/builtins"
|
def builtinsDir = "${rootDir}/core/builtins"
|
||||||
def unsignedCommonSrcDir = "${rootDir}/libraries/stdlib/unsigned/src"
|
def unsignedCommonSrcDir = "${rootDir}/libraries/stdlib/unsigned/src"
|
||||||
def experimentalSrcDir = "${rootDir}/libraries/stdlib/experimental"
|
|
||||||
def experimentalJsModuleName = 'kotlin-experimental'
|
|
||||||
def coroutinesJsModuleName = 'kotlin-stdlib-coroutines'
|
def coroutinesJsModuleName = 'kotlin-stdlib-coroutines'
|
||||||
|
|
||||||
def jsSrcDir = "src"
|
def jsSrcDir = "src"
|
||||||
@@ -62,13 +60,6 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
experimental {
|
|
||||||
if(!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync)
|
|
||||||
kotlin {
|
|
||||||
srcDir experimentalSrcDir
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
test {
|
||||||
kotlin {
|
kotlin {
|
||||||
srcDir jsTestSrcDir
|
srcDir jsTestSrcDir
|
||||||
@@ -163,18 +154,6 @@ compileKotlin2Js {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileExperimentalKotlin2Js {
|
|
||||||
dependsOn compileKotlin2Js
|
|
||||||
kotlinOptions {
|
|
||||||
languageVersion = "1.3"
|
|
||||||
apiVersion = "1.3"
|
|
||||||
outputFile = "${buildDir}/classes/experimental/${experimentalJsModuleName}.js"
|
|
||||||
sourceMap = true
|
|
||||||
sourceMapPrefix = "./"
|
|
||||||
freeCompilerArgs += ["-source-map-base-dirs", [experimentalSrcDir].join(File.pathSeparator)]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileCoroutinesExperimentalKotlin2Js {
|
compileCoroutinesExperimentalKotlin2Js {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
languageVersion = "1.3"
|
languageVersion = "1.3"
|
||||||
@@ -203,10 +182,9 @@ compileTestKotlin2Js {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task compileJs(type: NoDebugJavaExec) {
|
task compileJs(type: NoDebugJavaExec) {
|
||||||
dependsOn compileBuiltinsKotlin2Js, compileKotlin2Js, compileExperimentalKotlin2Js, compileCoroutinesExperimentalKotlin2Js
|
dependsOn compileBuiltinsKotlin2Js, compileKotlin2Js, compileCoroutinesExperimentalKotlin2Js
|
||||||
inputs.files(compileBuiltinsKotlin2Js.outputs.files)
|
inputs.files(compileBuiltinsKotlin2Js.outputs.files)
|
||||||
inputs.files(compileKotlin2Js.outputs.files)
|
inputs.files(compileKotlin2Js.outputs.files)
|
||||||
inputs.files(compileExperimentalKotlin2Js.outputs.files)
|
|
||||||
inputs.files(compileCoroutinesExperimentalKotlin2Js.outputs.files)
|
inputs.files(compileCoroutinesExperimentalKotlin2Js.outputs.files)
|
||||||
inputs.dir(jsSrcDir)
|
inputs.dir(jsSrcDir)
|
||||||
inputs.dir(jsCommonSrcDir)
|
inputs.dir(jsCommonSrcDir)
|
||||||
@@ -222,8 +200,7 @@ task compileJs(type: NoDebugJavaExec) {
|
|||||||
args = [jsOutputFile, rootDir, "$jsSrcDir/wrapper.js"] + inputFiles.collect { it.path }.sort() +
|
args = [jsOutputFile, rootDir, "$jsSrcDir/wrapper.js"] + inputFiles.collect { it.path }.sort() +
|
||||||
(compileBuiltinsKotlin2Js.outputs.files.collect { it.path }.sort() +
|
(compileBuiltinsKotlin2Js.outputs.files.collect { it.path }.sort() +
|
||||||
compileKotlin2Js.outputs.files.collect { it.path }.sort() +
|
compileKotlin2Js.outputs.files.collect { it.path }.sort() +
|
||||||
compileCoroutinesExperimentalKotlin2Js.outputs.files.collect { it.path }.sort() /* +
|
compileCoroutinesExperimentalKotlin2Js.outputs.files.collect { it.path }.sort()).findAll {
|
||||||
compileExperimentalKotlin2Js.outputs.files.collect { it.path }.sort() */).findAll {
|
|
||||||
it.endsWith(".js") && !it.endsWith(".meta.js")
|
it.endsWith(".js") && !it.endsWith(".meta.js")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,7 +236,7 @@ task compileJs(type: NoDebugJavaExec) {
|
|||||||
if (prefixToRemove != null) sourcePath.substring(prefixToRemove.length()) else sourcePath
|
if (prefixToRemove != null) sourcePath.substring(prefixToRemove.length()) else sourcePath
|
||||||
}
|
}
|
||||||
|
|
||||||
def sourceMapSourcesBaseDirs = [jsSrcDir, jsCommonSrcDir, jsSrcJsDir, builtinsSrcDir, commonSrcDir, commonSrcDir2, projectDir, experimentalSrcDir, unsignedCommonSrcDir]
|
def sourceMapSourcesBaseDirs = [jsSrcDir, jsCommonSrcDir, jsSrcJsDir, builtinsSrcDir, commonSrcDir, commonSrcDir2, projectDir, unsignedCommonSrcDir]
|
||||||
|
|
||||||
sourceMap.sourcesContent = sourceMap.sources.collect { sourceName ->
|
sourceMap.sourcesContent = sourceMap.sources.collect { sourceName ->
|
||||||
def text = sourceMapSourcesBaseDirs.collect { file("$it/$sourceName") }.find { it.exists() }?.text
|
def text = sourceMapSourcesBaseDirs.collect { file("$it/$sourceName") }.find { it.exists() }?.text
|
||||||
@@ -270,9 +247,7 @@ task compileJs(type: NoDebugJavaExec) {
|
|||||||
sourceMapFile.text = groovy.json.JsonOutput.toJson(sourceMap)
|
sourceMapFile.text = groovy.json.JsonOutput.toJson(sourceMap)
|
||||||
|
|
||||||
file(jsOutputMetaFile).text = file(compileKotlin2Js.outputFile.path.replaceAll('\\.js$', '.meta.js')).text +
|
file(jsOutputMetaFile).text = file(compileKotlin2Js.outputFile.path.replaceAll('\\.js$', '.meta.js')).text +
|
||||||
file(compileCoroutinesExperimentalKotlin2Js.outputFile.path.replaceAll('\\.js$', '.meta.js')).text /* +
|
file(compileCoroutinesExperimentalKotlin2Js.outputFile.path.replaceAll('\\.js$', '.meta.js')).text
|
||||||
file(compileExperimentalKotlin2Js.outputFile.path.replaceAll('\\.js$', '.meta.js')).text
|
|
||||||
.replaceFirst(experimentalJsModuleName, 'kotlin') */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,11 +276,9 @@ task libraryJarWithoutIr(type: Jar, dependsOn: compileJs) {
|
|||||||
from jsOutputMetaFile
|
from jsOutputMetaFile
|
||||||
from "${jsOutputFile}.map"
|
from "${jsOutputFile}.map"
|
||||||
from sourceSets.main.output
|
from sourceSets.main.output
|
||||||
from sourceSets.experimental.output
|
|
||||||
from("${buildDir}/classes/coroutinesExperimental/kotlin") {
|
from("${buildDir}/classes/coroutinesExperimental/kotlin") {
|
||||||
into coroutinesJsModuleName
|
into coroutinesJsModuleName
|
||||||
}
|
}
|
||||||
exclude "${experimentalJsModuleName}.*"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
||||||
@@ -341,9 +314,6 @@ task sourcesJar(type: Jar, dependsOn: compileJs) {
|
|||||||
from(sourceSets.main.allSource) {
|
from(sourceSets.main.allSource) {
|
||||||
include 'org.w3c/**'
|
include 'org.w3c/**'
|
||||||
}
|
}
|
||||||
from(sourceSets.experimental.allSource) {
|
|
||||||
into 'kotlin'
|
|
||||||
}
|
|
||||||
from(sourceSets.coroutinesExperimental.allSource) {
|
from(sourceSets.coroutinesExperimental.allSource) {
|
||||||
into 'kotlin'
|
into 'kotlin'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,11 +24,6 @@ sourceSets {
|
|||||||
srcDir 'src'
|
srcDir 'src'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
experimental {
|
|
||||||
kotlin {
|
|
||||||
srcDir "../experimental"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
coroutinesExperimental {
|
coroutinesExperimental {
|
||||||
kotlin {
|
kotlin {
|
||||||
srcDir '../coroutines-experimental/jvm/src'
|
srcDir '../coroutines-experimental/jvm/src'
|
||||||
@@ -95,7 +90,6 @@ jar {
|
|||||||
from {
|
from {
|
||||||
zipTree(configurations.builtins.singleFile)
|
zipTree(configurations.builtins.singleFile)
|
||||||
}
|
}
|
||||||
from sourceSets.experimental.output
|
|
||||||
from sourceSets.coroutinesExperimental.output
|
from sourceSets.coroutinesExperimental.output
|
||||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||||
// from sourceSets.java9.output
|
// from sourceSets.java9.output
|
||||||
@@ -166,19 +160,6 @@ compileKotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
compileExperimentalKotlin {
|
|
||||||
kotlinOptions {
|
|
||||||
languageVersion = "1.3"
|
|
||||||
apiVersion = "1.3"
|
|
||||||
freeCompilerArgs = [
|
|
||||||
"-version",
|
|
||||||
"-Xallow-kotlin-package",
|
|
||||||
"-Xmultifile-parts-inherit",
|
|
||||||
"-module-name", "kotlin-stdlib-experimental"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileJava9Sources(project, 'kotlin.stdlib', [sourceSets.main.output, sourceSets.coroutinesExperimental.output])
|
compileJava9Sources(project, 'kotlin.stdlib', [sourceSets.main.output, sourceSets.coroutinesExperimental.output])
|
||||||
|
|
||||||
compileCoroutinesExperimentalKotlin {
|
compileCoroutinesExperimentalKotlin {
|
||||||
|
|||||||
Reference in New Issue
Block a user