Use username/password of sonatype https://s01.oss.sonatype.org/
MAVEN_USERNAME={} MAVEN_PASSWORD={} ./gradlew build publish
Generate gpg key with name and email
gpg --gen-key
Export keyring
gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
Gradle properties should looks something like
$ cat ~/.gradle/gradle.properties
signing.keyId=5DBFACD8
signing.password={passphrase}
signing.secretKeyRingFile=//Users/jsalinas/.gnupg/secring.gpg