comparison artifactory70.gradle @ 322:7ca1fbf8636a

Add new artifactory*.gradle that removes the credentials. Update the init*-git.gradle to use this new script. The script will require a parameters in bamboo but will allow us to remove the gradlekit project.
author Marc Davis <davis@ssdt-ohio.org>
date Thu, 09 Feb 2023 13:53:42 -0500
parents
children de8c350c511a
comparison
equal deleted inserted replaced
321:6c62c55b613f 322:7ca1fbf8636a
1
2 logger.info("applying SSDT bamboo/artifactory Gradle Settings")
3
4 buildscript {
5 repositories {
6 // maven { url 'https://docker.ssdt.io/artifactory/gradle-plugins' }
7 mavenCentral()
8 }
9 dependencies {
10 classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.28.4"
11 }
12 }
13
14 //apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryConfigurationsPlugin
15
16 allprojects {
17 apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
18 apply plugin: 'ivy-publish'
19 apply plugin: 'java'
20
21 afterEvaluate {
22 publishing {
23 publications {
24 ivyJava(IvyPublication) {
25 from components.java
26 }
27 }
28 }
29 }
30 }
31
32 artifactory {
33 contextUrl = 'https://docker.ssdt.io/artifactory'
34 publish {
35 def isFeature = gradle.branchStream == 'feature'
36 repository {
37 repoKey = isFeature ? 'libs-branches-local' : 'libs-snapshots-local'
38 if (gradle.branch.isRelease()) {
39 repoKey = 'libs-releases-local'
40 }
41 // Publisher username and password
42 // Sub projects must provide these values via command line or properties file
43 username = artifactoryUsername
44 password = artifactoryPassword
45 if (isFeature) {
46 ivy {
47 ivyLayout = "${project.gradle.branchHash}/[organization]/[module]/ivy-[revision].xml"
48 artifactLayout = "${project.gradle.branchHash}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
49 mavenCompatible = false
50 }
51 }
52 }
53 defaults {
54 publications('ivyJava')
55 publishBuildInfo = true
56 publishArtifacts = true
57 publishPom = false
58 publishIvy = true
59 properties = [ 'ssdt-branch.branchName': gradle.branchName.replaceAll('/','-'), 'ssdt-branch.branchStream': gradle.branchStream ]
60 }
61 }
62 }
63