comparison artifactory70-github.gradle @ 352:49e02e6dcce6

attempt to publish maven artifacts
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 05 Sep 2023 10:41:53 -0400
parents
children c203c2024c0d
comparison
equal deleted inserted replaced
351:c57a1da032ec 352:49e02e6dcce6
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'
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 = "${project.gradle.branchHash}/[organization]/[module]/ivy-[revision].xml"
52 artifactLayout = "${project.gradle.branchHash}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
53 mavenCompatible = false
54 }
55 }
56 }
57 defaults {
58 publications('ivyJava')
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