Skip to content

Commit bb0d0db

Browse files
committed
Add logging of the extra compiler flags
1 parent de1bdf6 commit bb0d0db

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

build.gradle.kts

+4-3
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ configure(subprojects.filter {
155155
AuxBuildConfiguration.configure(rootProject)
156156
rootProject.registerTopLevelDeployTask()
157157

158-
// Report Kotlin compiler version when building project
159-
println("Using Kotlin compiler version: ${KotlinCompilerVersion.VERSION}")
160-
158+
if (isSnapshotTrainEnabled(rootProject)) {
159+
// Report Kotlin compiler version when building project
160+
println("Using Kotlin compiler version: ${KotlinCompilerVersion.VERSION}")
161+
}

buildSrc/src/main/kotlin/CommunityProjectsBuild.kt

+8-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fun Project.configureCommunityBuildTweaks() {
103103
}
104104
}
105105

106-
println("Manifest of kotlin-compiler-embeddable.jar for coroutines")
106+
LOGGER.info("Manifest of kotlin-compiler-embeddable.jar for coroutines")
107107
val coreProject = subprojects.single { it.name == coreModule }
108108
configure(listOf(coreProject)) {
109109
configurations.matching { it.name == "kotlinCompilerClasspath" }.configureEach {
@@ -187,7 +187,11 @@ fun KotlinCommonCompilerOptions.configureKotlinUserProject() {
187187
* See <https://github.com/Kotlin/kotlinx.coroutines/pull/4392#issuecomment-2775630200>
188188
*/
189189
fun KotlinCommonCompilerOptions.addExtraCompilerFlags(project: Project) {
190-
(project.rootProject.properties["kotlin_additional_cli_options"] as? String)?.split(" ")?.forEach {
191-
if (it.isNotEmpty()) freeCompilerArgs.add(it)
190+
val extraOptions = project.rootProject.properties["kotlin_additional_cli_options"] as? String
191+
if (extraOptions != null) {
192+
LOGGER.info("""Adding extra compiler flags '$extraOptions' for a compilation in the project $${project.name}""")
193+
extraOptions.split(" ")?.forEach {
194+
if (it.isNotEmpty()) freeCompilerArgs.add(it)
195+
}
192196
}
193-
}
197+
}

0 commit comments

Comments
 (0)