Skip to content

Commit

Permalink
[GOBBLIN-1293] Upgrades to Gradle 5.6.4
Browse files Browse the repository at this point in the history
Closes #3159 from Will-Lo/upgrade-to-gradle-5
  • Loading branch information
Will-Lo authored and autumnust committed Dec 4, 2020
1 parent 44d7aa0 commit 0aad6d4
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 62 deletions.
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,11 @@ Apache Gobblin handles the common routine tasks required for all data ingestion
Gobblin ingests data from different data sources in the same execution framework, and manages metadata of different sources all in one place. This, combined with other features such as auto scalability, fault tolerance, data quality assurance, extensibility, and the ability of handling data model evolution, makes Gobblin an easy-to-use, self-serving, and efficient data ingestion framework.

# Requirements
* Java >= 1.8
* gradle-wrapper.jar version 2.13
* Java >= 1.8

If building the distribution with tests turned on:
* Maven version 3.5.3

# Instructions to download gradle wrapper
Run the following command for downloading the gradle-wrapper.jar from Gobblin git repository to gradle/wrapper directory.

wget --no-check-certificate -P gradle/wrapper https://github.com/apache/incubator-gobblin/raw/0.12.0/gradle/wrapper/gradle-wrapper.jar
(or)
curl --insecure -L https://github.com/apache/incubator-gobblin/raw/0.12.0/gradle/wrapper/gradle-wrapper.jar > gradle/wrapper/gradle-wrapper.jar

Alternatively, you can download it manually from:
https://github.com/apache/incubator-gobblin/blob/0.12.0/gradle/wrapper/gradle-wrapper.jar

Make sure that you download it to gradle/wrapper directory.

# Instructions to run Apache RAT (Release Audit Tool)
1. Extract the archive file to your local directory.
2. Download gradle-wrapper.jar (version 2.13) and place it in the gradle/wrapper folder. See 'Instructions to download gradle wrapper' above.
Expand Down
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ buildscript {
classpath 'gradle.plugin.org.inferred:gradle-processors:1.1.2'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:1.0.2'
classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
classpath 'me.champeau.gradle:jmh-gradle-plugin:0.4.4'
classpath 'me.champeau.gradle:jmh-gradle-plugin:0.4.8'
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
}

repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
}

}

apply plugin: "com.github.hierynomus.license"
Expand Down Expand Up @@ -138,8 +137,6 @@ apply from: 'gradle/scripts/javaVersionCheck.gradle'
apply from: 'gradle/scripts/rat.gradle'
apply from: 'gradle/scripts/release.gradle'

task wrapper(type: Wrapper) { gradleVersion = '2.13' }

/*
* Hack for upgrading pegasus to version 11.0.0. For some reason, the gradle-plugins in
* that version fails to bring in "tools.jar" into the classpath. The rest.li team is actively
Expand Down
3 changes: 2 additions & 1 deletion gobblin-metrics-libs/gobblin-metrics-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/

plugins {
id "com.commercehub.gradle.plugin.avro-base" version "0.9.0"
// Bump up version to 0.9.1 in order for generateAvro task to work with Gradle 5
id "com.commercehub.gradle.plugin.avro-base" version "0.9.1"
}

apply plugin: 'java'
Expand Down
3 changes: 2 additions & 1 deletion gobblin-modules/gobblin-elasticsearch-deps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
// Bump up shadow version to support Gradle 5.x https://github.com/johnrengelman/shadow
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
}
}

Expand Down
3 changes: 2 additions & 1 deletion gobblin-modules/gobblin-http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/

plugins {
id "com.commercehub.gradle.plugin.avro-base" version "0.9.0"
// Bump up version to 0.9.1 in order for generateAvro task to work with Gradle 5
id "com.commercehub.gradle.plugin.avro-base" version "0.9.1"
}

apply plugin: 'java'
Expand Down
3 changes: 2 additions & 1 deletion gobblin-modules/gobblin-orc-dep/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
// Bump up shadow version to support Gradle 5.x https://github.com/johnrengelman/shadow
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
}
}

Expand Down
4 changes: 3 additions & 1 deletion gobblin-rest-service/gobblin-rest-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ buildscript {
}
}

task compileTest(dependsOn: ['compileTestGeneratedDataTemplateJava', 'compileTestJava']) << {
task compileTest(dependsOn: ['compileTestGeneratedDataTemplateJava', 'compileTestJava']){
doLast {
}
}

3 changes: 2 additions & 1 deletion gobblin-rest-service/gobblin-rest-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ test {
workingDir rootProject.rootDir
}

task compileTest(dependsOn: ['compileTestGeneratedDataTemplateJava', 'compileTestJava']) << {
task compileTest(dependsOn: ['compileTestGeneratedDataTemplateJava', 'compileTestJava']) {
doLast{}
}

3 changes: 2 additions & 1 deletion gobblin-restli/client.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
// Bump up shadow version to support Gradle 5.x https://github.com/johnrengelman/shadow
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
}

}
Expand Down
3 changes: 2 additions & 1 deletion gobblin-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* limitations under the License.
*/
plugins {
id "com.commercehub.gradle.plugin.avro-base" version "0.9.0"
// Bump up version to 0.9.1 in order for generateAvro task to work with Gradle 5
id "com.commercehub.gradle.plugin.avro-base" version "0.9.1"
}

apply plugin: 'java'
Expand Down
3 changes: 2 additions & 1 deletion gobblin-test-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/
plugins {
id "com.google.protobuf" version "0.8.8"
id "com.commercehub.gradle.plugin.avro-base" version "0.9.0"
// Bump up version to 0.9.1 in order for generateAvro task to work with Gradle 5
id "com.commercehub.gradle.plugin.avro-base" version "0.9.1"
}

apply plugin: 'java'
Expand Down
3 changes: 2 additions & 1 deletion gobblin-yarn/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/

plugins {
id 'com.github.johnrengelman.shadow' version '1.2.4'
// Bump up shadow version to support Gradle 5.x https://github.com/johnrengelman/shadow
id 'com.github.johnrengelman.shadow' version '5.2.0'
}

apply plugin: 'java'
Expand Down
6 changes: 4 additions & 2 deletions gradle/scripts/defaultBuildProperties.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ def BuildProperties BUILD_PROPERTIES = new BuildProperties(project)
.register(new BuildProperty("publishToNexus", false, "Enable publishing of artifacts to Nexus"))
.register(new BuildProperty("salesforceVersion", "42.0.0", "Salesforce dependencies version"))

task buildProperties(description: 'Lists main properties that can be used to customize the build') << {
BUILD_PROPERTIES.printHelp();
task buildProperties(description: 'Lists main properties that can be used to customize the build') {
doLast {
BUILD_PROPERTIES.printHelp();
}
}

// Gobblin build customization
Expand Down
5 changes: 4 additions & 1 deletion gradle/scripts/globalDependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ subprojects {
}

dependencies {
// Gradle 5 compatibility
compileOnly externalDependency.lombok
testCompile externalDependency.lombok
testCompileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok
testAnnotationProcessor externalDependency.lombok
}
}
4 changes: 2 additions & 2 deletions gradle/scripts/idesSetup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ subprojects {
// and "out/test/$MODULE_NAME". Changing it so IDEA and gradle share
// the class output directory.

outputDir = sourceSets.main.output.classesDir
testOutputDir = sourceSets.test.output.classesDir
outputDir = file(sourceSets.main.output.classesDirs.getSingleFile())
testOutputDir = file(sourceSets.test.output.classesDirs.getSingleFile())
}

}
Expand Down
25 changes: 12 additions & 13 deletions gradle/scripts/javadoc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@ task javadocTarball(type: Tar) {
compression = Compression.GZIP
extension = 'tgz'
description = "Generates a tar-ball with all javadocs to ${destinationDir}/${archiveName}"
}

javadocTarball << {
def indexFile = new File(destinationDir, "index.md")
def version = rootProject.ext.javadocVersion
indexFile << """----
layout: page
title: Gobblin Javadoc packages ${version}
permalink: /javadoc/${version}/
----
doLast {
def indexFile = new File(destinationDir, "index.md")
def version = rootProject.ext.javadocVersion
indexFile << """----
layout: page
title: Gobblin Javadoc packages ${version}
permalink: /javadoc/${version}/
----
"""
rootProject.ext.javadocPackages.each {
indexFile << "* [${it}](${it})\n"
"""
rootProject.ext.javadocPackages.each {
indexFile << "* [${it}](${it})\n"
}
}
}

Expand Down
26 changes: 14 additions & 12 deletions gradle/scripts/utilities.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@ def getAllDependentProjectsImpl(project) {

ext.getAllDependentProjects = {getAllDependentProjectsImpl(it)}

task dotProjectDependencies(description: 'List of gobblin project dependencies in dot format') << {
println "// ========= Start of project dependency graph ======= "
println "digraph project_dependencies {"
subprojects.each { Project project ->
def project_node_name = project.name.replaceAll("-","_")
if (project.configurations.findByName("compile") != null) {
project.configurations.compile.dependencies.each { Dependency dep ->
if (dep instanceof ProjectDependency) {
def dep_node_name = dep.dependencyProject.name.replaceAll("-","_")
println "\t${project_node_name} -> ${dep_node_name};"
task dotProjectDependencies(description: 'List of gobblin project dependencies in dot format') {
doLast {
println "// ========= Start of project dependency graph ======= "
println "digraph project_dependencies {"
subprojects.each { Project project ->
def project_node_name = project.name.replaceAll("-", "_")
if (project.configurations.findByName("compile") != null) {
project.configurations.compile.dependencies.each { Dependency dep ->
if (dep instanceof ProjectDependency) {
def dep_node_name = dep.dependencyProject.name.replaceAll("-", "_")
println "\t${project_node_name} -> ${dep_node_name};"
}
}
}
}
println "}"
println "// ========= End of project dependency graph ======= "
}
println "}"
println "// ========= End of project dependency graph ======= "
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip

0 comments on commit 0aad6d4

Please sign in to comment.