I have recently been working on something similar, and while I know that this is an old post I thought I should post the solution that I came to. I have found that geom_pwc()
does this and just works.
As an example using the ToothGrowth dataset:
ggboxplot(ToothGrowth,
x = "dose",
y = "len",
color = "dose",
palette = "jco",
add = "jitter",
facet.by = "supp",
short.panel.labs = FALSE)+
geom_pwc(method = "wilcox.test",
label = "p.signif",
hide.ns = TRUE)