[Build] Setup useFirForLibraries flag

This commit is contained in:
Dmitriy Novozhilov
2021-09-17 16:25:09 +03:00
committed by teamcityserver
parent 0bfc88fad0
commit 0923d39215
12 changed files with 33 additions and 0 deletions
+3
View File
@@ -46,6 +46,9 @@ org.gradle.vfs.watch=true
# Enable compilation of project using FIR compiler
#kotlin.build.useFir=true
# Enable FIR compiler for kotlin-stdlib, kotlin-reflect, kotlin-test.
#kotlin.build.useFirForLibraries=true
# Enable overriding JDK 6 and JDK 7 with JDK 8 in java toolchains
# This flag is required if you don't have JDK 6 or JDK 7 manually installed
#kotlin.build.isObsoleteJdkOverrideEnabled=true
+10
View File
@@ -64,6 +64,16 @@ ext.configurePluginMarkers = { Project project, withEmptyJars = true ->
PluginMarkersKt.publishPluginMarkers(project, withEmptyJars)
}
ext.configureFrontendIr = { Project project ->
project.tasks.withType(KotlinCompile.class) { task ->
task.kotlinOptions {
if (project.kotlinBuildProperties.useFirForLibraries) {
freeCompilerArgs += "-Xuse-fir"
}
}
}
}
allprojects { project ->
project.ext.configureSourcesJar = { lambda = {} ->
ArtifactsKt.sourcesJar(project) { task ->
+2
View File
@@ -44,6 +44,8 @@ compileTestKotlin {
]
}
configureFrontendIr(project)
if (includeJava9) {
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.junit')
}
@@ -43,6 +43,8 @@ compileTestKotlin {
]
}
configureFrontendIr(project)
if (includeJava9) {
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.junit5')
}
+2
View File
@@ -57,6 +57,8 @@ compileTestKotlin {
]
}
configureFrontendIr(project)
if (includeJava9) {
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test')
}
@@ -47,6 +47,8 @@ compileTestKotlin {
]
}
configureFrontendIr(project)
if (includeJava9) {
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.testng')
}
+2
View File
@@ -54,6 +54,8 @@ compileKotlin {
}
}
configureFrontendIr(project)
jar {
manifestAttributes(manifest, project, "internal")
}
+2
View File
@@ -90,6 +90,8 @@ compileTestKotlin {
]
}
configureFrontendIr(project)
LibrariesCommon.configureJava9Compilation(project, 'kotlin.stdlib.jdk7')
task testJdk6Tests(type: Test) {
+2
View File
@@ -75,6 +75,8 @@ compileTestKotlin {
]
}
configureFrontendIr(project)
LibrariesCommon.configureJava9Compilation(project, 'kotlin.stdlib.jdk8')
task testJdk6Tests(type: Test) { thisTask ->
+2
View File
@@ -143,6 +143,8 @@ compileLongRunningTestKotlin {
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.ExperimentalStdlibApi"
}
configureFrontendIr(project)
task longRunningTest(type: Test, dependsOn: longRunningTestClasses) {
group = "verification"
testClassesDirs = sourceSets.longRunningTest.output.classesDirs
@@ -27,3 +27,5 @@ compileKotlin {
]
kotlinOptions.moduleName = project.name
}
configureFrontendIr(project)
@@ -40,3 +40,5 @@ compileKotlin {
]
kotlinOptions.moduleName = project.name
}
configureFrontendIr(project)