[testng] 08/160: Gradle support for snapshots on jfrog.

Eugene Zhukov eugene-guest at moszumanska.debian.org
Tue Aug 18 10:22:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

eugene-guest pushed a commit to annotated tag testng-6.9.5
in repository testng.

commit 576120b7b9592579b3c9f05c568768a28586bf59
Author: Cedric Beust <cedric at beust.com>
Date:   Mon May 25 21:02:31 2015 -0700

    Gradle support for snapshots on jfrog.
---
 .gitignore               |   1 +
 build.gradle             |  15 +++++-
 gradle/publishing.gradle | 120 ++++++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 129 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0d9437d..1f75c7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@ test-output
 test-output-tests
 testng.iml
 z_build
+gradle.properties
diff --git a/build.gradle b/build.gradle
index fdd74ef..c5713d5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,12 +4,25 @@ buildscript {
         jcenter()
         maven {
             url 'http://dl.bintray.com/cbeust/maven'
-        }        
+        }
+        maven {
+            url 'http://oss.jfrog.org/artifactory/plugins-release'
+            credentials {
+                username = "${artifactory_user}"
+                password = "${artifactory_password}"
+            }
+        }
+    }
+
+    dependencies {
+        //Check for the latest version here: http://plugins.gradle.org/plugin/com.jfrog.artifactory
+        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.3"
     }
 }
 
 plugins {
     id "com.jfrog.bintray" version "1.1"
+    id "com.jfrog.artifactory" version "3.1.0"
 }
 
 version = '6.9.5-SNAPSHOT'
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
index 339487c..ee74bb2 100644
--- a/gradle/publishing.gradle
+++ b/gradle/publishing.gradle
@@ -28,14 +28,14 @@ publishing {
             from components.java
             artifact sourceJar
 
-            groupId 'com.beust'
-            artifactId 'klaxon'
+            groupId 'org.testng'
+            artifactId 'testng'
             version project.version
         }
     }
 }
 
-task install(dependsOn: publishToMavenLocal)
+//task install(dependsOn: publishToMavenLocal)
 
 Properties properties = new Properties()
 properties.load(project.rootProject.file('local.properties').newDataInputStream())
@@ -46,13 +46,121 @@ bintray {
     publications = ['mavenCustom']
     pkg {
         repo = 'maven'
-        name = 'klaxon'
-        desc = 'JSON parsing for Kotlin'
+        name = 'testng'
+        desc = 'Testing framework for Java'
         licenses = ['Apache-2.0']
-        labels = ['kotlin']
+        labels = ['testng']
 
         version {
             name = project.version //Bintray logical version name
         }
     }
 }
+
+//
+// Upload to Sonatype snapshot
+// ./gradlew upload
+//
+
+apply plugin: 'maven'
+apply plugin: 'signing'
+
+javadoc {
+    failOnError false
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+    classifier = 'javadoc'
+    from 'build/docs/javadoc'
+}
+
+task sourcesJar(type: Jar) {
+    from sourceSets.main.allSource
+    classifier = 'sources'
+}
+
+artifacts {
+    archives jar
+    archives javadocJar
+    archives sourcesJar
+}
+
+signing {
+    sign configurations.archives
+}
+
+uploadArchives {
+    repositories {
+        mavenDeployer {
+            repository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
+                authentication(userName: '3rszImfP', password: 'uAOidhWfeyQ6K/48UOuxPPL0EFj5Z99P0lU8zsL/BtgT')
+            }
+            pom.version = project.version
+            pom.artifactId = 'org.testng'
+            pom.groupId = 'testng'
+        }
+    }
+}
+
+//
+// Artifactory
+// ./gradlew artifactoryPublish // bintrayUpload
+//
+
+buildscript {
+    repositories {
+        jcenter()
+
+    }
+    dependencies {
+        //Check for the latest version here: http://plugins.gradle.org/plugin/com.jfrog.artifactory
+        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.3"
+    }
+}
+
+allprojects {
+    apply plugin: "com.jfrog.artifactory"
+}
+
+artifactory {
+    contextUrl = "${artifactory_contextUrl}"   //The base Artifactory URL if not overridden by the publisher/resolver
+    publish {
+        repository {
+            repoKey = 'oss-snapshot-local'
+            username = "${artifactory_user}"
+            password = "${artifactory_password}"
+            maven = true
+
+        }
+        defaults {
+            publications ('mavenJava')
+        }
+
+    }
+    resolve {
+        repository {
+            repoKey = 'libs-snapshot'
+            username = "${artifactory_user}"
+            password = "${artifactory_password}"
+            maven = true
+
+        }
+    }
+}
+
+//
+// Publish to maven by default
+//
+
+apply plugin: 'maven-publish'
+
+group = 'org.testng'
+
+publishing {
+    publications {
+        mavenJava(MavenPublication) {
+            from components.java
+        }
+    }
+}
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git



More information about the pkg-java-commits mailing list