I have a agricultural dataset containing 3 replicates per treatment, and 4 treatments devided in 4 blocks. Non parametric post hoc tests, such as Kruskal-Wallis test for multiple comparisons, only support tests of the type (response ~ treatment). Friedman test only applies to blocks containing 1 replicate by block. What would be the best way of testing differences amongst treatments in my case? Can I use a GLM to model blocks effects and "detrend" the dataset before comparing treatments?