aboutsummaryrefslogtreecommitdiff
path: root/symbols/src
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-18 00:27:49 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-18 00:27:49 +0200
commit830f3db26a72ec48314c8938fdedf9c58e2c240d (patch)
tree09955c2621600dcb722adf5414b58c6fa58184dc /symbols/src
parente96bef23200e4767269271388a5c88f6d4e6457e (diff)
downloadfirmament-830f3db26a72ec48314c8938fdedf9c58e2c240d.tar.gz
firmament-830f3db26a72ec48314c8938fdedf9c58e2c240d.tar.bz2
firmament-830f3db26a72ec48314c8938fdedf9c58e2c240d.zip
Add tracked dependencies to subscriptions
[no changelog]
Diffstat (limited to 'symbols/src')
-rw-r--r--symbols/src/main/kotlin/process/SubscribeAnnotationProcessor.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/symbols/src/main/kotlin/process/SubscribeAnnotationProcessor.kt b/symbols/src/main/kotlin/process/SubscribeAnnotationProcessor.kt
index 70491ab..0999878 100644
--- a/symbols/src/main/kotlin/process/SubscribeAnnotationProcessor.kt
+++ b/symbols/src/main/kotlin/process/SubscribeAnnotationProcessor.kt
@@ -30,9 +30,10 @@ class SubscribeAnnotationProcessor(
val codeGenerator: CodeGenerator,
) : SymbolProcessor {
override fun finish() {
+ val subscriptionSet = subscriptions.mapTo(mutableSetOf()) { it.parent.containingFile!! }
val dependencies = Dependencies(
aggregating = true,
- *subscriptions.mapTo(mutableSetOf()) { it.parent.containingFile!! }.toTypedArray())
+ *subscriptionSet.toTypedArray())
val subscriptionsFile =
codeGenerator
.createNewFile(dependencies, "moe.nea.firmament.annotations.generated", "AllSubscriptions")
@@ -41,6 +42,9 @@ class SubscribeAnnotationProcessor(
appendLine("// This file is @generated by SubscribeAnnotationProcessor at ${SimpleDateFormat("yyyy-MM-dd HH:mm:ss z").format(
Date())}")
appendLine("// Do not edit")
+ for (file in subscriptionSet) {
+ appendLine("// Dependency: ${file.filePath}")
+ }
appendLine("package moe.nea.firmament.annotations.generated")
appendLine()
appendLine("import moe.nea.firmament.events.subscription.*")