diff --git a/CHANGES.txt b/CHANGELOG.md similarity index 100% rename from CHANGES.txt rename to CHANGELOG.md diff --git a/astyanax-cassandra/build.gradle b/astyanax-cassandra/build.gradle new file mode 100644 index 000000000..7303add61 --- /dev/null +++ b/astyanax-cassandra/build.gradle @@ -0,0 +1,21 @@ +apply plugin: 'osgi' + +dependencies { + compile "org.apache.cassandra:cassandra-all:$cassandraVersion" + compile "org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-csv:$commonsCsvVersion" + compile "io.netty:netty:$nettyVersion" + compile project(':astyanax-core') + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-cassandra/conf/cassandra-template.yaml b/astyanax-cassandra/conf/cassandra-template.yaml deleted file mode 100644 index 7049792f2..000000000 --- a/astyanax-cassandra/conf/cassandra-template.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Cassandra storage config YAML -cluster_name: '$CLUSTER$' -initial_token: 0 -auto_bootstrap: false -hinted_handoff_enabled: false -max_hint_window_in_ms: 3600000 # one hour -authenticator: org.apache.cassandra.auth.AllowAllAuthenticator -authority: org.apache.cassandra.auth.AllowAllAuthority -partitioner: org.apache.cassandra.dht.RandomPartitioner -#partitioner: org.apache.cassandra.dht.Murmur3Partitioner -data_file_directories: - - $DIR$/data -commitlog_directory: $DIR$/commitlog -saved_caches_directory: $DIR$/saved_caches -commitlog_sync: periodic -commitlog_sync_period_in_ms: 10000 -seed_provider: - # Addresses of hosts that are deemed contact points. - # Cassandra nodes use this list of hosts to find each other and learn - # the topology of the ring. You must change this if you are running - # multiple nodes! - - class_name: org.apache.cassandra.locator.SimpleSeedProvider - parameters: - # seeds is actually a comma-delimited list of addresses. - - seeds: "127.0.0.1" -flush_largest_memtables_at: 0.75 -reduce_cache_sizes_at: 0.85 -reduce_cache_capacity_to: 0.6 -concurrent_reads: 32 -concurrent_writes: 32 -memtable_flush_queue_size: 4 -storage_port: $STORAGE_PORT$ -listen_address: 127.0.0.1 -rpc_address: 127.0.0.1 -rpc_port: $PORT$ -rpc_keepalive: true -thrift_framed_transport_size_in_mb: 15 -thrift_max_message_length_in_mb: 16 -incremental_backups: false -snapshot_before_compaction: false -column_index_size_in_kb: 64 -in_memory_compaction_limit_in_mb: 64 -compaction_throughput_mb_per_sec: 16 -compaction_preheat_key_cache: true -endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch -dynamic_snitch: true -dynamic_snitch_update_interval_in_ms: 100 -dynamic_snitch_reset_interval_in_ms: 600000 -dynamic_snitch_badness_threshold: 0.0 -request_scheduler: org.apache.cassandra.scheduler.NoScheduler -index_interval: 128 diff --git a/astyanax-contrib/build.gradle b/astyanax-contrib/build.gradle new file mode 100644 index 000000000..06ebc116e --- /dev/null +++ b/astyanax-contrib/build.gradle @@ -0,0 +1,19 @@ +dependencies { + compile project(':astyanax-cassandra') + compile project(':astyanax-core') + compile 'com.netflix.eureka:eureka-client:1.1.110' + compile 'com.netflix.archaius:archaius-core:0.5.12' + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-contrib/conf/log4j.xml b/astyanax-contrib/src/main/resources/log4j.xml similarity index 100% rename from astyanax-contrib/conf/log4j.xml rename to astyanax-contrib/src/main/resources/log4j.xml diff --git a/astyanax-core/build.gradle b/astyanax-core/build.gradle new file mode 100644 index 000000000..4aff9e28e --- /dev/null +++ b/astyanax-core/build.gradle @@ -0,0 +1,17 @@ +apply plugin: 'osgi' + +dependencies { + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-core/conf/log4j.xml b/astyanax-core/src/main/resources/log4j.xml similarity index 100% rename from astyanax-core/conf/log4j.xml rename to astyanax-core/src/main/resources/log4j.xml diff --git a/astyanax-entity-mapper/build.gradle b/astyanax-entity-mapper/build.gradle new file mode 100644 index 000000000..7c7c5f4cc --- /dev/null +++ b/astyanax-entity-mapper/build.gradle @@ -0,0 +1,20 @@ +dependencies { + compile project(':astyanax-core') + compile project(':astyanax-cassandra') + compile project(':astyanax-recipes') + compile "javax.persistence:persistence-api:$jpaVersion" + testCompile project(':astyanax-thrift') + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-entity-mapper/conf/log4j.xml b/astyanax-entity-mapper/src/main/resources/log4j.xml similarity index 100% rename from astyanax-entity-mapper/conf/log4j.xml rename to astyanax-entity-mapper/src/main/resources/log4j.xml diff --git a/astyanax-examples/build.gradle b/astyanax-examples/build.gradle new file mode 100644 index 000000000..ddd0110d5 --- /dev/null +++ b/astyanax-examples/build.gradle @@ -0,0 +1,19 @@ +dependencies { + compile project(':astyanax-core') + compile project(':astyanax-cassandra') + compile project(':astyanax-thrift') + testCompile project(':astyanax-thrift') + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-examples/conf/log4j.xml b/astyanax-examples/src/main/resources/log4j.xml similarity index 100% rename from astyanax-examples/conf/log4j.xml rename to astyanax-examples/src/main/resources/log4j.xml diff --git a/astyanax-queue/build.gradle b/astyanax-queue/build.gradle new file mode 100644 index 000000000..cc9454b74 --- /dev/null +++ b/astyanax-queue/build.gradle @@ -0,0 +1,21 @@ +apply plugin: 'osgi' + +dependencies { + compile project(':astyanax-core') + compile project(':astyanax-cassandra') + compile project(':astyanax-thrift') + compile project(':astyanax-recipes') + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-queue/conf/log4j.xml b/astyanax-queue/src/main/resources/log4j.xml similarity index 100% rename from astyanax-queue/conf/log4j.xml rename to astyanax-queue/src/main/resources/log4j.xml diff --git a/astyanax-recipes/build.gradle b/astyanax-recipes/build.gradle new file mode 100644 index 000000000..d48d0e14f --- /dev/null +++ b/astyanax-recipes/build.gradle @@ -0,0 +1,18 @@ +dependencies { + compile project(':astyanax-core') + compile project(':astyanax-cassandra') + testCompile project(':astyanax-thrift') + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-recipes/conf/log4j.xml b/astyanax-recipes/src/main/resources/log4j.xml similarity index 100% rename from astyanax-recipes/conf/log4j.xml rename to astyanax-recipes/src/main/resources/log4j.xml diff --git a/astyanax-thrift/build.gradle b/astyanax-thrift/build.gradle new file mode 100644 index 000000000..88415b843 --- /dev/null +++ b/astyanax-thrift/build.gradle @@ -0,0 +1,21 @@ +apply plugin: 'osgi' + +dependencies { + compile project(':astyanax-core') + compile project(':astyanax-cassandra') + compile "org.apache.cassandra:cassandra-thrift:$cassandraVersion" + compile "org.apache.thrift:libthrift:$thriftVersion" + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/astyanax-thrift/conf/log4j.xml b/astyanax-thrift/src/main/resources/log4j.xml similarity index 100% rename from astyanax-thrift/conf/log4j.xml rename to astyanax-thrift/src/main/resources/log4j.xml diff --git a/astyanax/build.gradle b/astyanax/build.gradle new file mode 100644 index 000000000..b57de1921 --- /dev/null +++ b/astyanax/build.gradle @@ -0,0 +1,24 @@ +dependencies { + compile project(':astyanax-core') + compile project(':astyanax-cassandra') + compile project(':astyanax-thrift') + compile project(':astyanax-queue') + compile project(':astyanax-recipes') + compile project(':astyanax-entity-mapper') + compile project(':astyanax-examples') + compile project(':astyanax-contrib') + + compile "joda-time:joda-time:$jodaTimeVersion" + compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" + compile "com.google.guava:guava:$guavaVersion" + compile "com.eaio.uuid:uuid:$uuidVersion" + compile "org.slf4j:slf4j-api:$slf4jVersion" + compile "org.codehaus.jettison:jettison:$jettisonVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-lang:commons-lang:$commonsLangVersion" + compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" + testCompile "junit:junit:$junitVersion" +} diff --git a/build.gradle b/build.gradle index 3b8193ec9..6749e76d0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,144 +1,24 @@ -// Establish version and status -ext.githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name - -buildscript { - repositories { - mavenLocal() - mavenCentral() // maven { url 'http://jcenter.bintray.com' } - } - apply from: file('gradle/buildscript.gradle'), to: buildscript +plugins { + id 'nebula.netflixoss' version '2.2.5' } -allprojects { - repositories { - mavenCentral() // maven { url: 'http://jcenter.bintray.com' } - } -} +// Establish version and status +ext.githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name apply plugin: 'idea' apply plugin: 'osgi' -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') -apply from: file('gradle/dependency-versions.gradle') +apply from: file('dependency-versions.gradle') subprojects { - group = "com.netflix.${githubProjectName}" - - apply plugin: 'eclipse' - apply plugin: 'idea' - - dependencies { - compile "joda-time:joda-time:$jodaTimeVersion" - compile "com.github.stephenc.high-scale-lib:high-scale-lib:$highScaleLibVersion" - compile "com.google.guava:guava:$guavaVersion" - compile "com.eaio.uuid:uuid:$uuidVersion" - compile "org.slf4j:slf4j-api:$slf4jVersion" - compile "org.codehaus.jettison:jettison:$jettisonVersion" - compile "commons-codec:commons-codec:$commonsCodecVersion" - compile "commons-lang:commons-lang:$commonsLangVersion" - compile "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:$concurrentLinkedHashMapVersion" - compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" - compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" - compile "org.xerial.snappy:snappy-java:$snappyVersion" - testCompile "junit:junit:$junitVersion" - } -} - -project(':astyanax') { - dependencies { - compile project(':astyanax-core') - compile project(':astyanax-cassandra') - compile project(':astyanax-thrift') - compile project(':astyanax-queue') - compile project(':astyanax-recipes') - compile project(':astyanax-entity-mapper') - compile project(':astyanax-examples') - compile project(':astyanax-contrib') - } -} - -project(':astyanax-core') { - apply plugin: 'osgi' - apply plugin: 'java' - dependencies { - testCompile "junit:junit:$junitVersion" - } -} - -project(':astyanax-thrift') { - apply plugin: 'osgi' - apply plugin: 'java' - dependencies { - compile project(':astyanax-core') - compile project(':astyanax-cassandra') - compile "org.apache.cassandra:cassandra-thrift:$cassandraVersion" - compile "org.apache.thrift:libthrift:$thriftVersion" - } -} - -project(':astyanax-queue') { - apply plugin: 'osgi' - apply plugin: 'java' - dependencies { - compile project(':astyanax-core') - compile project(':astyanax-cassandra') - compile project(':astyanax-thrift') - compile project(':astyanax-recipes') - } -} - -project(':astyanax-cassandra') { - apply plugin: 'osgi' - apply plugin: 'java' - dependencies { - compile "org.apache.cassandra:cassandra-all:$cassandraVersion" - compile "org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-csv:$commonsCsvVersion" - compile "io.netty:netty:$nettyVersion" - compile project(':astyanax-core') - } -} - -project(':astyanax-recipes') { + apply plugin: 'nebula.netflixoss' apply plugin: 'java' - dependencies { - compile project(':astyanax-core') - compile project(':astyanax-cassandra') - testCompile project(':astyanax-thrift') - } -} + group = "com.netflix.${githubProjectName}" -project(':astyanax-entity-mapper') { - apply plugin: 'java' - dependencies { - compile project(':astyanax-core') - compile project(':astyanax-cassandra') - compile project(':astyanax-recipes') - compile "javax.persistence:persistence-api:$jpaVersion" - testCompile project(':astyanax-thrift') - testCompile "junit:junit:$junitVersion" - } -} + sourceCompatibility = 1.6 + targetCompatibility = 1.6 -project(':astyanax-examples') { - apply plugin: 'java' - dependencies { - compile project(':astyanax-core') - compile project(':astyanax-cassandra') - compile project(':astyanax-thrift') - testCompile project(':astyanax-thrift') - } -} - -project(':astyanax-contrib') { - apply plugin: 'java' - dependencies { - compile project(':astyanax-cassandra') - compile project(':astyanax-core') - compile 'com.netflix.eureka:eureka-client:1.1.110' - compile 'com.netflix.archaius:archaius-core:0.5.12' + repositories { + jcenter() } } diff --git a/codequality/HEADER b/codequality/HEADER deleted file mode 100644 index 3102e4b44..000000000 --- a/codequality/HEADER +++ /dev/null @@ -1,13 +0,0 @@ -Copyright ${year} Netflix, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/gradle/dependency-versions.gradle b/dependency-versions.gradle similarity index 100% rename from gradle/dependency-versions.gradle rename to dependency-versions.gradle diff --git a/gradle.properties b/gradle.properties index 8f9d6b5f1..ef6032984 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=1.56.50-SNAPSHOT +release.scope=patch diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle deleted file mode 100644 index 0b6da7ce8..000000000 --- a/gradle/buildscript.gradle +++ /dev/null @@ -1,11 +0,0 @@ -// Executed in context of buildscript -repositories { - // Repo in addition to maven central - repositories { maven { url 'http://dl.bintray.com/content/netflixoss/external-gradle-plugins/' } } // For gradle-release -} -dependencies { - classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.6.1' - classpath 'com.mapvine:gradle-cobertura-plugin:0.1' - classpath 'gradle-release:gradle-release:1.1.5' - classpath 'org.ajoberstar:gradle-git:0.5.0' -} diff --git a/gradle/check.gradle b/gradle/check.gradle deleted file mode 100644 index a3e4b4e7f..000000000 --- a/gradle/check.gradle +++ /dev/null @@ -1,26 +0,0 @@ -subprojects { -// Checkstyle -apply plugin: 'checkstyle' -checkstyle { - ignoreFailures = true - configFile = rootProject.file('codequality/checkstyle.xml') -} - -// FindBugs -apply plugin: 'findbugs' -findbugs { - ignoreFailures = true -} - -// PMD -apply plugin: 'pmd' -//tasks.withType(Pmd) { reports.html.enabled true } - -apply plugin: 'cobertura' -cobertura { - sourceDirs = sourceSets.main.java.srcDirs - format = 'html' - includes = ['**/*.java', '**/*.groovy'] - excludes = [] -} -} diff --git a/gradle/convention.gradle b/gradle/convention.gradle deleted file mode 100644 index 2720c8b40..000000000 --- a/gradle/convention.gradle +++ /dev/null @@ -1,100 +0,0 @@ -// GRADLE-2087 workaround, perform after java plugin -status = project.hasProperty('preferredStatus')?project.preferredStatus:(version.contains('SNAPSHOT')?'snapshot':'release') - -subprojects { project -> - apply plugin: 'java' // Plugin as major conventions - - sourceCompatibility = 1.6 - - // Restore status after Java plugin - status = rootProject.status - - task sourcesJar(type: Jar, dependsOn:classes) { - from sourceSets.main.allSource - classifier 'sources' - extension 'jar' - } - - task javadocJar(type: Jar, dependsOn:javadoc) { - from javadoc.destinationDir - classifier 'javadoc' - extension 'jar' - } - - configurations.add('sources') - configurations.add('javadoc') - configurations.archives { - extendsFrom configurations.sources - extendsFrom configurations.javadoc - } - - // When outputing to an Ivy repo, we want to use the proper type field - gradle.taskGraph.whenReady { - def isNotMaven = !it.hasTask(project.uploadMavenCentral) - if (isNotMaven) { - def artifacts = project.configurations.sources.artifacts - def sourceArtifact = artifacts.iterator().next() - sourceArtifact.type = 'sources' - } - } - - artifacts { - sources(sourcesJar) { - // Weird Gradle quirk where type will be used for the extension, but only for sources - type 'jar' - } - javadoc(javadocJar) { - type 'javadoc' - } - } - - configurations { - provided { - description = 'much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive.' - transitive = true - visible = true - } - } - - project.sourceSets { - main.compileClasspath += project.configurations.provided - main.runtimeClasspath -= project.configurations.provided - test.compileClasspath += project.configurations.provided - test.runtimeClasspath += project.configurations.provided - } -} - -apply plugin: 'github-pages' // Used to create publishGhPages task - -def docTasks = [:] -[Javadoc,ScalaDoc,Groovydoc].each{ Class docClass -> - def allSources = allprojects.tasks*.withType(docClass).flatten()*.source - if (allSources) { - def shortName = docClass.simpleName.toLowerCase() - def docTask = task "aggregate${shortName.capitalize()}"(type: docClass, description: "Aggregate subproject ${shortName}s") { - source = allSources - doFirst { - def classpaths = allprojects.findAll { it.plugins.hasPlugin(JavaPlugin) }.collect { it.sourceSets.main.compileClasspath } - classpath = files(classpaths) - } - } - docTasks[shortName] = docTask - processGhPages.dependsOn(docTask) - } -} - -githubPages { - repoUri = "git@github.com:quidryan/${rootProject.githubProjectName}.git" - pages { - docTasks.each { shortName, docTask -> - from(docTask.outputs.files) { - into "docs/${shortName}" - } - } - } -} - -// Generate wrapper, which is distributed as part of source to alleviate the need of installing gradle -task createWrapper(type: Wrapper) { - gradleVersion = '1.5' -} diff --git a/gradle/license.gradle b/gradle/license.gradle deleted file mode 100644 index abd2e2c0e..000000000 --- a/gradle/license.gradle +++ /dev/null @@ -1,10 +0,0 @@ -// Dependency for plugin was set in buildscript.gradle - -subprojects { -apply plugin: 'license' //nl.javadude.gradle.plugins.license.LicensePlugin -license { - header rootProject.file('codequality/HEADER') - ext.year = Calendar.getInstance().get(Calendar.YEAR) - skipExistingHeaders true -} -} diff --git a/gradle/maven.gradle b/gradle/maven.gradle deleted file mode 100644 index 817846d77..000000000 --- a/gradle/maven.gradle +++ /dev/null @@ -1,70 +0,0 @@ -// Maven side of things -subprojects { - apply plugin: 'maven' // Java plugin has to have been already applied for the conf2scope mappings to work - apply plugin: 'signing' - - signing { - required { gradle.taskGraph.hasTask(uploadMavenCentral) } - sign configurations.archives - } - -/** - * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html - * artifactory will execute uploadArchives to force generation of ivy.xml, and we don't want that to trigger an upload to maven - * central, so using custom upload task. - */ -task uploadMavenCentral(type:Upload, dependsOn: signArchives) { - configuration = configurations.archives - onlyIf { ['release', 'snapshot'].contains(project.status) } - repositories.mavenDeployer { - beforeDeployment { signing.signPom(it) } - - // To test deployment locally, use the following instead of oss.sonatype.org - //repository(url: "file://localhost/${rootProject.rootDir}/repo") - - def sonatypeUsername = rootProject.hasProperty('sonatypeUsername')?rootProject.sonatypeUsername:'' - def sonatypePassword = rootProject.hasProperty('sonatypePassword')?rootProject.sonatypePassword:'' - - repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') { - authentication(userName: sonatypeUsername, password: sonatypePassword) - } - - snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') { - authentication(userName: sonatypeUsername, password: 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 { - name "${project.name}" - description "${project.name} developed by Netflix" - developers { - developer { - id 'netflixgithub' - name 'Netflix Open Source Development' - email 'talent@netflix.com' - } - } - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - 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" - } - } - } - } -} diff --git a/gradle/netflix-oss.gradle b/gradle/netflix-oss.gradle deleted file mode 100644 index c75055369..000000000 --- a/gradle/netflix-oss.gradle +++ /dev/null @@ -1,25 +0,0 @@ -apply from: 'http://artifacts.netflix.com/gradle-netflix-local/artifactory.gradle' - -rootProject { - afterProject { project -> - def compileConf = project.configurations.findByName('compile') - if (compileConf==null) { - return - } - def deps = compileConf.dependencies - - def cassThriftDep = deps.find { it.group == 'org.apache.cassandra' && it.name == 'cassandra-thrift' } - if (cassThriftDep != null) { - def version = cassThriftDep.version - deps.remove(cassThriftDep) - project.dependencies.add('compile', "org.apache.cassandra:cassandra-thrift:1.2.11") - } - - def cassAllDep = deps.find { it.group == 'org.apache.cassandra' && it.name == 'cassandra-all' } - if (cassAllDep != null) { - def version = cassAllDep.version - deps.remove(cassAllDep) - project.dependencies.add('compile', "org.apache.cassandra:cassandra-all:1.2.1.2") - } - } -} \ No newline at end of file diff --git a/gradle/release.gradle b/gradle/release.gradle deleted file mode 100644 index 7979dc3a1..000000000 --- a/gradle/release.gradle +++ /dev/null @@ -1,61 +0,0 @@ -apply plugin: 'release' - -[ uploadIvyLocal: 'uploadLocal', uploadArtifactory: 'artifactoryPublish', buildWithArtifactory: 'build' ].each { key, value -> - // Call out to compile against internal repository - task "${key}"(type: GradleBuild) { - startParameter = project.gradle.startParameter.newInstance() - doFirst { - startParameter.projectProperties = [status: project.status, preferredStatus: project.status] - } - startParameter.addInitScript( file('gradle/netflix-oss.gradle') ) - startParameter.getExcludedTaskNames().add('check') - tasks = [ 'build', value ] - } -} - -// Marker task for following code to key in on -task releaseCandidate(dependsOn: release) -task forceCandidate { - onlyIf { gradle.taskGraph.hasTask(releaseCandidate) } - doFirst { project.status = 'candidate' } -} -task forceRelease { - onlyIf { !gradle.taskGraph.hasTask(releaseCandidate) } - doFirst { project.status = 'release' } -} -release.dependsOn([forceCandidate, forceRelease]) - -task uploadMavenCentral(dependsOn: subprojects.tasks.uploadMavenCentral) -task releaseSnapshot(dependsOn: [uploadArtifactory, uploadMavenCentral]) - -// Ensure our versions look like the project status before publishing -task verifyStatus << { - def hasSnapshot = version.contains('-SNAPSHOT') - if (project.status == 'snapshot' && !hasSnapshot) { - throw new GradleException("Version (${version}) needs -SNAPSHOT if publishing snapshot") - } -} -uploadArtifactory.dependsOn(verifyStatus) -uploadMavenCentral.dependsOn(verifyStatus) - -// Ensure upload happens before taggging, hence upload failures will leave repo in a revertable state -preTagCommit.dependsOn([uploadArtifactory, uploadMavenCentral]) - - -gradle.taskGraph.whenReady { taskGraph -> - def hasRelease = taskGraph.hasTask('commitNewVersion') - def indexOf = { return taskGraph.allTasks.indexOf(it) } - - if (hasRelease) { - assert indexOf(build) < indexOf(unSnapshotVersion), 'build target has to be after unSnapshotVersion' - assert indexOf(uploadMavenCentral) < indexOf(preTagCommit), 'preTagCommit has to be after uploadMavenCentral' - assert indexOf(uploadArtifactory) < indexOf(preTagCommit), 'preTagCommit has to be after uploadArtifactory' - } -} - -// Prevent plugin from asking for a version number interactively -ext.'gradle.release.useAutomaticVersion' = "true" - -release { - git.requireBranch = null -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index faa569a9a..c97a8bdb9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 061b536b4..06059e919 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Apr 02 11:45:56 PDT 2013 +#Fri Jan 30 13:37:57 PST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip