You are correct, the plugins { } block cannot be used within a subprojects { } block. This is a known limitation. If you want to apply the plugin to all subprojects you’ll have to use the alternate syntax.
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.org.frege-lang:frege-gradle-plugin:0.6"
}
}
subprojects {
apply plugin: "org.frege-lang"
}