I just started working with grails 3, in particular version 3.2.8.
I found that placing the next entry at the end of build.gradle works where artifactory_user, artifactory_password, artifactory_snapshotUrl and artifactory_releaseUrl are defined in gradle.properties.
publishing { repositories { maven { credentials { username artifactory_user password artifactory_password } if (version.endsWith('SNAPSHOT')) { url artifactory_snapshotUrl } else { url artifactory_releaseUrl } } } }
The gradle.properties file reads:
grailsVersion=3.2.8 grailsWrapperVersion=1.0.0 gormVersion=6.0.9.RELEASE gradleWrapperVersion=3.4.1 app_version=0.0.1-SNAPSHOT artifactory_user=admin artifactory_password=password artifactory_contextUrl=http://myserver.myorg.org:8081/artifactory artifactory_snapshotUrl=http://myserver.myorg.org:8081/artifactory/libs-snapshot-local artifactory_releaseUrl=http://myserver.myorg.org:8081/artifactory/libs-release-local
Duncan
source share