Can' warp my head around Gradle structure; pls help T-T

Hello everyone, i recently decided to use Gradle and start reading user guide. I watched some tutorials on Groovy and so on. So, when i finally thought that i begin to understand how gradle works, docs threw at me this kind of thing:
Example 7.7. Publishing the JAR file

uploadArchives {
    repositories {
       flatDir {
           dirs 'repos'

so my thinking was:

  • Gradle has 3 scripts that he works with (Project, Gradle and Settings)

  • Gradle comes with some predefined methods (on base of Groovy) that we can use to manipulate objects associated with each file.

  • Each of this objects have a particular set of properties, which we can (or at least should be able to) find on DSL tab

So, i looked again at this uploadArchive thing, what could it be? it can be a task inside project object, it could be a property or some kind of script block… and, apparently, it’s non of those!

I searched DSL docks for about an hour and didn’t find any mentioning of this uploadArchive()!

So pls, help me, what is this uploadArchive, and where does it came from?

English is not my native language, so forgive me my spelling :smiley: