When I build project with Gradle v7 I got error:
Plugin with id 'maven' not found.
For those using gradle 7, maven plugin has been removed, now you should use maven-publish, as described in official site at this link: https://docs.gradle.org/7.0/userguide/upgrading_version_6.html?_ga=2.21245883.1883799052.1624281891-1948725710.1624281891#removal_of_the_legacy_maven_plugin
So, instead of using:
apply plugin: 'maven'
you should use
apply plugin: 'maven-publish'