If you need this this, you could do something like this:
apply from: "config/specifications/${project.spec}.gradle"
which would then allow users to do e.g.
./gradlew -P spec=example
See https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_properties_and_system_properties for more details on setting project properties from the command line.