[build] split configuration for compiler and stdlib

This commit is contained in:
Vasily Levchenko
2019-05-17 16:17:16 +03:00
parent 9b8b94717f
commit 97b345c88d
3 changed files with 32 additions and 17 deletions
+23 -13
View File
@@ -38,6 +38,7 @@ apply plugin: 'konan'
configurations {
cli_bc
update_tests
update_stdlib_tests
}
repositories {
@@ -49,17 +50,22 @@ repositories {
dependencies {
cli_bc project(path: ':backend.native', configuration: 'cli_bc')
update_tests (group: 'org', name: 'Kotlin_dev_Compiler', version: testKotlinVersion) {
update_tests (group: 'org', name: 'Kotlin_dev_Compiler', version: testKotlinCompilerVersion) {
artifact {
name = 'internal/kotlin-test-data'
type = 'zip'
}
}
update_stdlib_tests (group: 'org', name: 'Kotlin_dev_Compiler', version: kotlinStdlibVersion) {
artifact {
name = 'internal/kotlin-stdlib-tests'
type = 'zip'
}
}
}
ext.testOutputRoot = rootProject.file("test.output").absolutePath
ext.externalTestsDir = project.file("build/external")
ext.externalStdlibTestsDir = project.file("build/stdlib_external")
ext.externalStdlibTestsDir = project.file("build/stdlib_external/stdlib")
externalTestsDir.mkdirs()
externalStdlibTestsDir.mkdirs()
@@ -114,7 +120,7 @@ def update_external_tests() {
delete(externalTestsDir)
externalTestsDir.mkdirs()
def files = configurations.update_tests.asFileTree
def compilerTestsFiles = configurations.update_tests.asFileTree
if (project.hasProperty("kotlinProjectPath")) {
def f = Paths.get(project.property("kotlinProjectPath").toString(), "dist", "kotlin-test-data.zip").toFile()
if (f.exists()) {
@@ -122,29 +128,31 @@ def update_external_tests() {
|Using $f as a source of codegen/box* and stdlib tests
|Update test data zip with :kotlin:zipTestData task
""".stripMargin())
files = project.files(f)
compilerTestsFiles = project.files(f)
}
}
copy {
files.each {
compilerTestsFiles.each {
from(zipTree(it))
into(externalTestsDir)
include 'compiler/codegen/box/**'
include 'compiler/codegen/boxInline/**'
include 'compiler/compileKotlinAgainstKotlin/**'
exclude 'stdlib/**'
}
}
delete(externalStdlibTestsDir)
externalStdlibTestsDir.mkdirs()
def stdlibTestsFiles = configurations.update_stdlib_tests.asFileTree
copy {
files.each {
stdlibTestsFiles.each {
from(zipTree(it))
into(externalStdlibTestsDir)
include 'stdlib/common/**'
include 'stdlib/test/**'
exclude 'stdlib/test/js/**'
include 'common/**'
include 'test/**'
exclude 'test/js/**'
}
}
}
@@ -170,8 +178,10 @@ run {
}
task sanity {
if (!project.hasProperty("test.disable_update")) {
update_external_tests()
doFirst {
if (!project.hasProperty("test.disable_update")) {
update_external_tests()
}
}
dependsOn(tasksOf { it instanceof KonanTest && it.inDevelopersRun &&
!it.getDependsOn().contains(':distPlatformLibs') })
@@ -3474,7 +3484,7 @@ task buildKonanStdlibTests(type: BuildKonanTest) {
outputSourceSetName = "testOutputStdlib"
flags = [ "-Xmulti-platform", '-Xuse-experimental=kotlin.ExperimentalStdlibApi', "-friend-modules", project.rootProject.file("${project.properties['konan.home']}/klib/common/stdlib") ]
def testSources = externalStdlibTestsDir.absolutePath
compileList = [ "$testSources/stdlib/test", "$testSources/stdlib/common",
compileList = [ "$testSources/test", "$testSources/common",
"stdlib_external/utils.kt", "stdlib_external/text/StringEncodingTestNative.kt", "stdlib_external/jsCollectionFactoriesActuals.kt" ]
excludeList = [ "$testSources/stdlib/test/internalAnnotations.kt" ]
}
+6 -3
View File
@@ -42,11 +42,11 @@ ext {
platformManager = new PlatformManager(DistributionKt.buildDistribution(projectDir.absolutePath),
ext.experimentalEnabled)
kotlinCommonStdlibModule="org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion}:sources"
kotlinCompilerModule="org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}"
kotlinStdLibModule="org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
kotlinTestCommonModule="org.jetbrains.kotlin:kotlin-test-common:${kotlinVersion}:sources"
kotlinTestAnnotationsCommonModule="org.jetbrains.kotlin:kotlin-test-annotations-common:${kotlinVersion}:sources"
kotlinCommonStdlibModule="org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinStdlibVersion}:sources"
kotlinTestCommonModule="org.jetbrains.kotlin:kotlin-test-common:${kotlinStdlibVersion}:sources"
kotlinTestAnnotationsCommonModule="org.jetbrains.kotlin:kotlin-test-annotations-common:${kotlinStdlibVersion}:sources"
kotlinReflectModule="org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
kotlinScriptRuntimeModule="org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}"
kotlinNativeSharedModule="org.jetbrains.kotlin:kotlin-native-shared:$sharedVersion"
@@ -69,6 +69,9 @@ allprojects {
maven {
url 'https://cache-redirector.jetbrains.com/maven-central'
}
maven {
url kotlinStdlibRepo
}
maven {
url kotlinCompilerRepo
}
+3 -1
View File
@@ -20,7 +20,9 @@ buildKotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds
remoteRoot=konan_tests
kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_Compiler),number:1.3.50-dev-328,branch:default:true,pinned:true/artifacts/content/maven
kotlinVersion=1.3.50-dev-328
testKotlinVersion=1.3.50-dev-328
kotlinStdlibRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_Compiler),number:1.3.50-dev-328,branch:default:true,pinned:true/artifacts/content/maven
kotlinStdlibVersion=1.3.50-dev-328
testKotlinCompilerVersion=1.3.50-dev-328
# See https://teamcity.jetbrains.com/project.html?projectId=Kotlin_KotlinNativeShared&tab=projectOverview
sharedRepo=https://dl.bintray.com/jetbrains/kotlin-native-dependencies
sharedVersion=1.0-dev-73