comparison artifactory70-github.gradle @ 357:ab7103f0c154

try some more maven publishing items
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 05 Sep 2023 15:40:13 -0400
parents
children 3a33f23a26db
comparison
equal deleted inserted replaced
356:22a86f411b3e 357:ab7103f0c154
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: 'maven-publish'
20 apply plugin: 'java'
21
22 afterEvaluate {
23 publishing {
24 publications {
25 ivyJava(IvyPublication) {
26 from components.java
27 }
28 mavenJava(MavenPublication) {
29 from components.java
30 }
31 }
32 }
33 }
34 }
35
36 artifactory {
37 contextUrl = 'https://docker.ssdt.io/artifactory'
38 publish {
39 def isFeature = gradle.branchStream == 'feature'
40 repository {
41 repoKey = isFeature ? 'libs-branches-local' : 'libs-snapshots-local'
42 if (gradle.branch.isRelease()) {
43 repoKey = "libs-releases-local/${project.gradle.branchHash}"
44 }
45 // Publisher username and password
46 // Sub projects must provide these values via command line or properties file
47 username = artifactoryUsername
48 password = artifactoryPassword
49 if (isFeature) {
50 ivy {
51 ivyLayout = "[organization]/[module]/ivy-[revision].xml"
52 artifactLayout = "[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
53 mavenCompatible = true
54 }
55 }
56 }
57 defaults {
58 publications('ivyJava', 'mavenJava')
59 publishBuildInfo = true
60 publishArtifacts = true
61 publishPom = true
62 publishIvy = true
63 properties = [ 'ssdt-branch.branchName': gradle.branchName.replaceAll('/','-'), 'ssdt-branch.branchStream': gradle.branchStream ]
64 }
65 }
66 }
67