curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [16/50] [abbrv] git commit: New gradle stuff
Date Mon, 10 Jun 2013 15:01:01 GMT
New gradle stuff


Project: http://git-wip-us.apache.org/repos/asf/incubator-curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-curator/commit/2745cdaf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-curator/tree/2745cdaf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-curator/diff/2745cdaf

Branch: refs/heads/zk3.3.x
Commit: 2745cdaf91c3ac5b722322c273ca3f0bfa090929
Parents: 2a1ec77 c1fe956
Author: Jordan Zimmerman <jordan@jordanzimmerman.com>
Authored: Thu Aug 30 17:56:05 2012 -0500
Committer: Jordan Zimmerman <jordan@jordanzimmerman.com>
Committed: Thu Aug 30 17:56:05 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |   2 +
 build.gradle                                    | 151 ++++---------------
 codequality/HEADER                              |  16 ++
 codequality/checkstyle.xml                      |   4 +
 .../com/netflix/curator/ConnectionState.java    |   2 +-
 .../netflix/curator/CuratorZookeeperClient.java |   5 +-
 .../framework/CuratorFrameworkFactory.java      |   7 +-
 .../framework/imps/CuratorFrameworkImpl.java    |  11 +-
 .../framework/state/ConnectionStateManager.java |  11 +-
 .../framework/recipes/leader/LeaderLatch.java   |  20 ++-
 .../recipes/leader/TestLeaderLatch.java         |  44 ++++++
 .../curator/x/discovery/ServiceInstance.java    |   4 +
 .../x/discovery/TestJsonInstanceSerializer.java |  86 +++++++++++
 gradle.properties                               |   1 +
 gradle/buildscript.gradle                       |  12 ++
 gradle/check.gradle                             |  25 +++
 gradle/convention.gradle                        |  41 +++++
 gradle/license.gradle                           |   9 ++
 gradle/maven.gradle                             |  48 ++++++
 gradle/netflix-oss.gradle                       |   1 +
 gradle/release.gradle                           |  64 ++++++++
 gradle/wrapper/gradle-wrapper.properties        |   4 +-
 gradlew                                         |   4 +-
 23 files changed, 431 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/2745cdaf/build.gradle
----------------------------------------------------------------------
diff --cc build.gradle
index 4070d6c,7ba4971..60f8422
--- a/build.gradle
+++ b/build.gradle
@@@ -1,41 -1,46 +1,47 @@@
 -ext.releaseVersion = '1.1.17'
 +// Establish version and status
- def performingRelease = project.hasProperty('release') && Boolean.parseBoolean(project.release)
- def releaseVersion = '1.0.18'
- def versionPostfix = performingRelease?'':'-SNAPSHOT'
- version = "${releaseVersion}${versionPostfix}"
- status = performingRelease?'release':'snapshot'
++ext.releaseVersion = '1.0.18'
+ ext.githubProjectName = rootProject.name // Change if github project name is not the same
as the root project's name
  
- apply plugin: 'idea'
- 
- subprojects
- {
-     apply plugin: 'java'
-     apply plugin: 'idea'
+ buildscript {
+     repositories { mavenCentral() }
+     apply from: file('gradle/buildscript.gradle'), to: buildscript 
+ }
  
-     group = 'com.netflix.curator'
-     version = rootProject.version
+ allprojects {
+     repositories { mavenCentral() }
+ }
  
-     sourceCompatibility = 1.6
+ apply from: file('gradle/convention.gradle')
+ apply from: file('gradle/maven.gradle')
+ //apply from: file('gradle/check.gradle')
+ //apply from: file('gradle/license.gradle')
+ //apply from: file('gradle/release.gradle')
  
-     tasks.test.useTestNG()
+ apply plugin: 'idea'
  
-     // GRADLE-2087 workaround, perform after java plugin
-     status = rootProject.status
+ subprojects {
+     apply plugin: 'idea'
  
-     repositories
-     {
-         mavenCentral()
-         maven
-         {
-             url "https://repository.jboss.org/nexus/content/groups/public/"
+     // Closure to configure all the POM with extra info, common to all projects
+     pom {
+         project {
+             url "https://github.com/Netflix/${rootProject.githubProjectName}"
+             scm {
+                 connection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git"
+                 url "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git"
+                 developerConnection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git"
+             }
+             issueManagement {
+                 system 'github'
+                 url "https://github.com/Netflix/${rootProject.githubProjectName}/issues"
+             }
          }
      }
  
-     test.testLogging.showStandardStreams = project.hasProperty('log')
+     group = "com.netflix.${githubProjectName}" // TEMPLATE: Set to organization of project
  
-     dependencies
-     {
+     dependencies {
 -        compile('org.apache.zookeeper:zookeeper:3.4.3')
 +        compile('org.apache.zookeeper:zookeeper:3.3.5')
          {
              exclude group: 'com.sun.jmx', module: 'jmxri'
              exclude group: 'com.sun.jdmk', module: 'jmxtools'
@@@ -46,95 -51,8 +52,8 @@@
          }
          compile     'com.google.guava:guava:11.0.1'
          testCompile 'org.testng:testng:6.1.1'
 -        testCompile 'log4j:log4j:1.2.16'
 +        testCompile 'log4j:log4j:1.2.15'
      }
- 
-     task sourcesJar(type: Jar, dependsOn:classes) {
-         classifier = 'sources'
-         from sourceSets.main.allSource
-     }
- 
-     task javadocJar(type: Jar, dependsOn:javadoc) {
-         classifier = 'javadoc'
-         from javadoc.destinationDir
-     }
- 
-     artifacts {
-         archives jar
-         archives sourcesJar
-         archives javadocJar
-     }
- 
-     // Maven side of things
-     apply plugin: 'maven' // Java plugin has to have been already applied for the conf2scope
mappings to work
-     apply plugin: 'signing'
- 
-     if (gradle.startParameter.taskNames.contains("uploadMavenCentral")) {
-         signing {
-             required true
-             sign configurations.archives
-         }
-     } else {
-         task signArchives {
-             // do nothing
-         }
-     }
- 
-     /**
-      * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html
-      */
-     task uploadMavenCentral(type:Upload) {
-         configuration = configurations.archives
-         dependsOn 'signArchives'
-         doFirst {
-             repositories.mavenDeployer {
-                 beforeDeployment { org.gradle.api.artifacts.maven.MavenDeployment deployment
-> signing.signPom(deployment) }
- 
-                 // To test deployment locally, use the following instead of oss.sonatype.org
-                 //repository(url: "file://localhost/${rootProject.rootDir}/repo")
- 
-                 repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2')
{
-                     authentication(userName: rootProject.sonatypeUsername, password: rootProject.sonatypePassword)
-                 }
- 
-                 // Prevent datastamp from being appending to artifacts during deployment
-                 uniqueVersion = false
- 
-                 // Closure to configure all the POM with extra info, common to all projects
-                 pom.project {
-                     parent {
-                         groupId 'org.sonatype.oss'
-                         artifactId 'oss-parent'
-                         version '7'
-                     }
-                     url 'https://github.com/Netflix/curator'
-                     licenses {
-                         license {
-                             name 'The Apache Software License, Version 2.0'
-                             url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-                             distribution 'repo'
-                         }
-                     }
-                     scm {
-                         connection 'scm:git:git@github.com:Netflix/curator.git'
-                         url 'scm:git:git@github.com:Netflix/curator.git'
-                         developerConnection 'scm:git:git@github.com:Netflix/curator.git'
-                     }
-                     issueManagement {
-                         system 'github'
-                         url 'https://github.com/Netflix/curator/issues'
-                     }
-                 }
-             }
-         }
-     }
- }
- 
- task aggregateJavadoc(type: Javadoc) {
-     description = 'Aggregate all subproject docs into a single docs directory'
-     source subprojects.collect {project -> project.sourceSets.main.allJava }
-     classpath = files(subprojects.collect {project -> project.sourceSets.main.compileClasspath})
-     destinationDir = new File(projectDir, 'doc')
  }
  
  project(':curator-client')
@@@ -195,6 -112,6 +114,7 @@@ project(':curator-x-discovery-server'
          compile 'javax.ws.rs:jsr311-api:1.1.1'
          testCompile project(':curator-test')
          testCompile 'junit:junit-dep:4.10'
++        testCompile 'javax.servlet:servlet-api:2.5'
          testCompile 'com.sun.jersey:jersey-server:1.11'
          testCompile 'com.sun.jersey:jersey-servlet:1.11'
          testCompile 'com.sun.jersey:jersey-client:1.11'

http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/2745cdaf/curator-client/src/main/java/com/netflix/curator/ConnectionState.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/2745cdaf/curator-framework/src/main/java/com/netflix/curator/framework/imps/CuratorFrameworkImpl.java
----------------------------------------------------------------------


Mime
View raw message