aboutsummaryrefslogtreecommitdiff
path: root/gradle
diff options
context:
space:
mode:
authorCedric Beust <cedric@beust.com>2015-05-25 21:02:31 -0700
committerCedric Beust <cedric@beust.com>2015-05-25 21:04:00 -0700
commit576120b7b9592579b3c9f05c568768a28586bf59 (patch)
treebf9c29fc8f352d2ab864de574f96c0cb487fa89b /gradle
parent6583ca9cbacee5b49542ea7fc56763821ade93d8 (diff)
downloadtestng-576120b7b9592579b3c9f05c568768a28586bf59.tar.gz
Gradle support for snapshots on jfrog.
Diffstat (limited to 'gradle')
-rw-r--r--gradle/publishing.gradle120
1 files changed, 114 insertions, 6 deletions
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
index 339487ca..ee74bb25 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
+ }
+ }
+}
+