Skip to content

Commit 243a275

Browse files
Fix: Make metalavaSemver depend on copyApiTxtFile
Explicitly wire the output of the copyApiTxtFile task (new_api.txt) to the input of the metalavaSemver task, ensuring the file is present before metalavaSemver runs.
1 parent be2b6ed commit 243a275

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

plugins/src/main/java/com/google/firebase/gradle/plugins/FirebaseAndroidLibraryPlugin.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ class FirebaseAndroidLibraryPlugin : BaseFirebaseLibraryPlugin() {
161161
)
162162
}
163163

164-
project.tasks.register<CopyApiTask>("copyApiTxtFile") {
165-
apiTxtFile.set(project.file("api.txt"))
166-
output.set(project.file("new_api.txt"))
167-
}
164+
val copyApiTxtFileTask =
165+
project.tasks.register<CopyApiTask>("copyApiTxtFile") {
166+
apiTxtFile.set(project.file("api.txt"))
167+
output.set(project.file("new_api.txt"))
168+
}
168169

169170
project.tasks.register<SemVerTask>("metalavaSemver") {
170-
apiTxtFile.set(project.file("new_api.txt"))
171+
apiTxtFile.set(copyApiTxtFileTask.flatMap { it.output })
171172
otherApiFile.set(project.file("api.txt"))
172173
currentVersionString.value(firebaseLibrary.version)
173174
previousVersionString.value(firebaseLibrary.previousVersion)

0 commit comments

Comments
 (0)