Looking for better explanations for maven publish on Bitbucket

I still looking for better explanations for maven publish on Bitbucket

currently i am using gradle 5

apply plugin: 'maven'

repositories {
    maven { url "https://raw.github.com/synergian/wagon-git/releases" }
}

configurations {
    deployLibrary
}

dependencies {
    deployLibrary "ar.com.synergian:wagon-git:0.2.5"
}


uploadArchives {

    repositories.mavenDeployer {
        configuration = configurations.deployLibrary
        repository(url: 'git:releases://git@bitbucket.org:' + COMPANY + '/' + REPOSITORY_NAME + '.git')

        pom.project {
            groupId = ARTIFACT_PACKAGE
            version = "${major}.${minor}.${patch}"
            artifactId = ARTIFACT_NAME
            packaging ARTIFACT_PACKAGING
        }
    }
}