Preheat the oven to 350℉ (180℃). Grease the sides and bottom of a 9-inch springform pan (or 9-inch round cake pan) with cooking spray, then line the bottom with parchment paper. Grease the top of the parchment paper as well.
In a small bowl, whisk together the flour, baking powder, baking soda, and salt. Set aside.
In a large bowl, use a hand-held mixer to cream together the softened butter and sugar for 2-3 minutes until pale and fluffy.
Add the sourdough discard, egg, lemon juice, lemon zest, vegetable oil, and vanilla extract. Mix on low speed until combined. Add the flour mixture and mix just until no dry spots remain.Toss the blackberries in 1-2 teaspoons of flour (to prevent them from sinking in the cake), then fold the blackberries into the batter.
Transfer the batter to the prepared pan, using a spatula to spread it evenly.
Bake for 55-60 minutes, until the cake is golden brown and a toothpick inserted in the center comes out clean.Let the cake cool for 10 minutes, then remove the outer ring of the pan. Let the cake cool fully (at least an hour) before adding the glaze.
To make the glaze, combine the confectioner's sugar, lemon juice, and milk in a small bowl. Whisk until smooth and combined. The glaze should be pourable, but still a bit thick (you don't want it to just run off the sides of the cake). If needed, add more milk to reach your desired consistency. Slowly pour the glaze over the top of the cooled cake, spreading to the edges with a spatula (it will continue to fall over the edges on its own). Slice and serve.
Video
Notes
To make this cake with active sourdough starter, replace the sourdough discard with active starter (200g). You do not need to make changes to any other ingredients.