github.com/jfrog/jfrog-cli-go@v1.22.1-0.20200318093948-4826ef344ffd/testsdata/gradle/projectwithplugin/build.gradle (about) 1 buildscript { 2 repositories { 3 jcenter() 4 } 5 dependencies { 6 classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '4.+') 7 } 8 } 9 apply plugin: 'groovy' 10 apply plugin: 'idea' 11 apply plugin: 'com.jfrog.artifactory' 12 version = 1.0 13 task initProject(description: 'Initialize project directory structure.') { 14 doLast { 15 // Default package to be created in each src dir. 16 def defaultPackage = 'org/jfrog/minimal-project' 17 18 ['java', 'groovy', 'resources'].each { 19 // convention.sourceSets contains the directory structure 20 // for our Groovy project. So we use this structure 21 // and make a directory for each node. 22 sourceSets*."${it}".srcDirs*.each { dir -> 23 def newDir = new File(dir, defaultPackage) 24 logger.info "Creating directory $newDir" // gradle -i shows this message. 25 newDir.mkdirs() // Create dir. 26 } 27 } 28 } 29 } 30 31 artifactory { 32 contextUrl = "${RT_URL}" 33 publish { 34 repository { 35 repoKey = "${REPO1}" // The Artifactory repository key to publish to 36 username = "${RT_USERNAME}" // The publisher user name 37 password = "${RT_PASSWORD}" // The publisher password 38 } 39 defaults { 40 // Reference to Gradle publications defined in the build script. 41 // This is how we tell the Artifactory Plugin which artifacts should be 42 // published to Artifactory. 43 publishConfigs('archives', 'published') 44 publishArtifacts = true 45 // Properties to be attached to the published artifacts. 46 properties = ['qa.level': 'basic', 'dev.team' : 'core'] 47 // Publish generated POM files to Artifactory (true by default) 48 publishPom = true 49 } 50 } 51 }