diff artifactory40.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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifactory40.gradle	Thu Feb 09 13:53:42 2023 -0500
@@ -0,0 +1,50 @@
+
+logger.info("applying SSDT bamboo/artifactory Gradle Settings")
+
+buildscript {
+    repositories {
+        maven { url 'https://docker.ssdt.io/artifactory/gradle-plugins' }
+    }
+    dependencies {
+        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1"
+    }
+}
+
+//apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryConfigurationsPlugin
+
+allprojects {
+
+    apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryConfigurationsPlugin
+
+}
+
+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'
+            }
+            // Publisher username and password
+            // Sub projects must provide these values via command line or properties file
+            username = artifactoryUsername
+            password = artifactoryPassword
+            if (isFeature) {
+                ivy {
+                    ivyLayout = "${project.gradle.branchHash}/[organization]/[module]/ivy-[revision].xml"
+                    artifactLayout = "${project.gradle.branchHash}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
+                    mavenCompatible = false
+                }
+            }
+        }
+        defaults {
+            publishBuildInfo = true
+            publishArtifacts = true
+            publishPom = false
+            publishIvy = true
+            properties = [ 'ssdt-branch.branchName': gradle.branchName.replaceAll('/','-'), 'ssdt-branch.branchStream': gradle.branchStream ]
+        }
+    }
+}