# HG changeset patch # User Marc Davis # Date 1693942813 14400 # Node ID ab7103f0c154cf5d432eb527464a6b8ffb89cb3a # Parent 22a86f411b3e493c86f3fa9e4dd44b7393da11ec try some more maven publishing items diff -r 22a86f411b3e -r ab7103f0c154 artifactory70-github.gradle --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifactory70-github.gradle Tue Sep 05 15:40:13 2023 -0400 @@ -0,0 +1,67 @@ + +logger.info("applying SSDT bamboo/artifactory Gradle Settings") + +buildscript { + repositories { +// maven { url 'https://docker.ssdt.io/artifactory/gradle-plugins' } + mavenCentral() + } + dependencies { + classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.28.4" + } +} + +//apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryConfigurationsPlugin + +allprojects { + apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin + apply plugin: 'ivy-publish' + apply plugin: 'maven-publish' + apply plugin: 'java' + + afterEvaluate { + publishing { + publications { + ivyJava(IvyPublication) { + from components.java + } + mavenJava(MavenPublication) { + from components.java + } + } + } + } +} + +artifactory { + contextUrl = 'https://docker.ssdt.io/artifactory' + publish { + def isFeature = gradle.branchStream == 'feature' + repository { + repoKey = isFeature ? 'libs-branches-local' : 'libs-snapshots-local' + if (gradle.branch.isRelease()) { + repoKey = "libs-releases-local/${project.gradle.branchHash}" + } + // Publisher username and password + // Sub projects must provide these values via command line or properties file + username = artifactoryUsername + password = artifactoryPassword + if (isFeature) { + ivy { + ivyLayout = "[organization]/[module]/ivy-[revision].xml" + artifactLayout = "[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" + mavenCompatible = true + } + } + } + defaults { + publications('ivyJava', 'mavenJava') + publishBuildInfo = true + publishArtifacts = true + publishPom = true + publishIvy = true + properties = [ 'ssdt-branch.branchName': gradle.branchName.replaceAll('/','-'), 'ssdt-branch.branchStream': gradle.branchStream ] + } + } +} + diff -r 22a86f411b3e -r ab7103f0c154 init70-github.gradle --- a/init70-github.gradle Tue Sep 05 14:07:22 2023 -0400 +++ b/init70-github.gradle Tue Sep 05 15:40:13 2023 -0400 @@ -139,7 +139,7 @@ file('build-number.txt').text = "build.number=${gradle.branch.buildNumber ?: -1 }\n" logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild host: $hostname)" - apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/artifactory70.gradle") + apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/artifactory70-github.gradle") } if (!rootProject.hasProperty('disableMetrics')) { @@ -438,6 +438,10 @@ ivy "[organization]/[module]/ivy-[revision].xml" } } + maven { + name = 'ssdt-branches' + url = "${ssdtArtifactory}/ssdt-branches/${gradle.branchHash}/" + } } ivy {