Skip to content

Commit 04fb1d8

Browse files
committed
tidy logging/docs
1 parent 878bfb8 commit 04fb1d8

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

modules/bcv-gradle-plugin/src/main/kotlin/BCVProjectPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ constructor(
165165
project.tasks.withType<BCVDefaultTask>().configureEach {
166166
bcvEnabled.convention(extension.enabled)
167167

168-
onlyIf("BCV is disabled") { bcvEnabled.get() }
168+
onlyIf("BCV is enabled") { bcvEnabled.get() }
169169
}
170170

171171
project.tasks.withType<BCVApiGeneratePreparationTask>().configureEach {

modules/bcv-gradle-plugin/src/main/kotlin/tasks/BCVApiCheckTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ constructor(
124124
|
125125
|$diffText
126126
|
127-
|You can run '$apiDumpTaskPath' task to overwrite API declarations
127+
|You can run '$apiDumpTaskPath' task to overwrite API declarations.
128128
""".trimMargin()
129129
)
130130
}

modules/bcv-gradle-plugin/src/main/kotlin/workers/KLibInferSignaturesWorker.kt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ import org.gradle.api.provider.Property
1717
import org.gradle.workers.WorkAction
1818
import org.gradle.workers.WorkParameters
1919

20+
/**
21+
* Infers a possible KLib ABI dump for an unsupported target.
22+
*
23+
* To infer a dump, walk up the default targets hierarchy tree starting from the unsupported
24+
* target until it finds a node corresponding to a group containing least one supported target.
25+
*
26+
* After that, dumps generated for such supported targets are merged and declarations that are
27+
* common to all of them are considered as a common ABI that most likely will be shared by the
28+
* unsupported target.
29+
*
30+
* At the next step, if a project contains an old dump, declarations specific to the unsupported
31+
* target are copied from it and merged into the common ABI extracted previously.
32+
*
33+
* The resulting dump is then used as an inferred dump for the unsupported target.
34+
*/
2035
@BCVInternalApi
2136
@BCVExperimentalApi
2237
@OptIn(ExperimentalBCVApi::class)
@@ -38,6 +53,8 @@ abstract class KLibInferSignaturesWorker : WorkAction<KLibInferSignaturesWorker.
3853
val taskPath: Property<String>
3954
}
4055

56+
private val taskPath: String = parameters.taskPath.get()
57+
4158
override fun execute() {
4259
// Find a set of supported targets that are closer to unsupported target in the hierarchy.
4360
// Note that dumps are stored using configurable name, but grouped by the canonical target name.
@@ -60,7 +77,7 @@ abstract class KLibInferSignaturesWorker : WorkAction<KLibInferSignaturesWorker.
6077
}
6178
if (extantImage == null) {
6279
logger.warn(
63-
"Project's ABI file exists, but empty: ${extantApiDumpFile}. " +
80+
"[$taskPath] Project's ABI file exists, but empty: ${extantApiDumpFile}. " +
6481
"The file will be ignored during ABI dump inference for the unsupported target "
6582
// + target.get()
6683
)

0 commit comments

Comments
 (0)