annotate artifactory70-github.gradle @ 358:3a33f23a26db

try some more maven publishing items
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 05 Sep 2023 16:07:29 -0400
parents ab7103f0c154
children 77ca22c4a0b3
rev   line source
357
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
1
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
2 logger.info("applying SSDT bamboo/artifactory Gradle Settings")
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
3
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
4 buildscript {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
5 repositories {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
6 // maven { url 'https://docker.ssdt.io/artifactory/gradle-plugins' }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
7 mavenCentral()
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
8 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
9 dependencies {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
10 classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.28.4"
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
11 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
12 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
13
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
14 //apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryConfigurationsPlugin
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
15
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
16 allprojects {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
17 apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
18 apply plugin: 'ivy-publish'
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
19 apply plugin: 'maven-publish'
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
20 apply plugin: 'java'
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
21
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
22 afterEvaluate {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
23 publishing {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
24 publications {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
25 ivyJava(IvyPublication) {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
26 from components.java
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
27 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
28 mavenJava(MavenPublication) {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
29 from components.java
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
30 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
31 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
32 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
33 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
34 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
35
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
36 artifactory {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
37 contextUrl = 'https://docker.ssdt.io/artifactory'
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
38 publish {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
39 def isFeature = gradle.branchStream == 'feature'
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
40 repository {
358
3a33f23a26db try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents: 357
diff changeset
41 repoKey = isFeature ? "libs-branches-local/${project.gradle.branchHash}" : 'libs-snapshots-local'
357
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
42 if (gradle.branch.isRelease()) {
358
3a33f23a26db try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents: 357
diff changeset
43 repoKey = "libs-releases-local"
357
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
44 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
45 // Publisher username and password
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
46 // Sub projects must provide these values via command line or properties file
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
47 username = artifactoryUsername
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
48 password = artifactoryPassword
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
49 if (isFeature) {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
50 ivy {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
51 ivyLayout = "[organization]/[module]/ivy-[revision].xml"
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
52 artifactLayout = "[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
53 mavenCompatible = true
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
54 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
55 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
56 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
57 defaults {
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
58 publications('ivyJava', 'mavenJava')
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
59 publishBuildInfo = true
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
60 publishArtifacts = true
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
61 publishPom = true
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
62 publishIvy = true
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
63 properties = [ 'ssdt-branch.branchName': gradle.branchName.replaceAll('/','-'), 'ssdt-branch.branchStream': gradle.branchStream ]
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
64 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
65 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
66 }
ab7103f0c154 try some more maven publishing items
Marc Davis <marc.davis@mcoecn.org>
parents:
diff changeset
67