plugins { id 'groovy-gradle-plugin' } Properties constants = new Properties() file("$rootDir/../constants.properties").withInputStream { constants.load(it) } def internalPublishVersion = constants.getProperty('internalPublishVersion') def artifactoryContextUrl = constants.getProperty('artifactoryContextUrl') repositories { def cordaUseCache = System.getenv("CORDA_USE_CACHE") if (cordaUseCache != null) { maven { url = "${artifactoryContextUrl}/${cordaUseCache}" name = "R3 Maven remote repositories" authentication { basic(BasicAuthentication) } credentials { username = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') password = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') } metadataSources { mavenPom() artifact() ignoreGradleMetadataRedirection() } } } else { maven { url "${artifactoryContextUrl}/engineering-tools-maven" authentication { basic(BasicAuthentication) } credentials { username = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') password = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') } content { includeGroupByRegex 'com\\.r3\\.internal(\\..*)?' } } gradlePluginPortal() } } dependencies { implementation group: 'com.github.docker-java', name: 'docker-java', version: constants.dockerJavaVersion implementation group: 'com.github.docker-java', name: 'docker-java-transport-httpclient5', version: constants.dockerJavaVersion if (System.getenv('CORDA_ARTIFACTORY_USERNAME') != null || project.hasProperty('cordaArtifactoryUsername')) { implementation "com.r3.internal.gradle.plugins:publish:$internalPublishVersion" } }