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