Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ jobs:
comment_phrase: ${{ matrix.job_phrase }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
# The test requires Java 21 and Java 8 versions.
# Java 8 is installed second because JAVA_HOME needs to point to Java 8.
# The test requires Java 21 and Java 11 versions.
# Java 11 is installed second because JAVA_HOME needs to point to Java 11.
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/beam_PreCommit_SQL_Java17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
comment_phrase: ${{ matrix.job_phrase }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
# The test requires Java 17 and Java 8 versions.
# Java 8 is installed second because JAVA_HOME needs to point to Java 8.
# The test requires Java 17 and Java 11 versions.
# Java 11 is installed second because JAVA_HOME needs to point to Java 11.
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
Expand Down
8 changes: 5 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,20 @@ repositories {
dependencies {
implementation(gradleApi())
implementation(localGroovy())
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.1")
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.8") { // Enable shading Java dependencies
exclude(group="org.codehaus.plexus", module="plexus-xml") // plexus-xml 4.x requires Java17
}
runtimeOnly("org.codehaus.plexus:plexus-xml:3.0.2")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14")

runtimeOnly("com.google.protobuf:protobuf-gradle-plugin:0.8.13") // Enable proto code generation
runtimeOnly("com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.9.1") // Enable Avro code generation. Version 1.1.0 is the last supporting avro 1.10.2
runtimeOnly("com.diffplug.spotless:spotless-plugin-gradle:5.6.1") // Enable a code formatting plugin
runtimeOnly("gradle.plugin.com.dorongold.plugins:task-tree:1.5") // Adds a 'taskTree' task to print task dependency tree
runtimeOnly("gradle.plugin.com.github.johnrengelman:shadow:7.1.1") // Enable shading Java dependencies
runtimeOnly("net.linguica.gradle:maven-settings-plugin:0.5")
runtimeOnly("gradle.plugin.io.pry.gradle.offline_dependencies:gradle-offline-dependencies-plugin:0.5.0") // Enable creating an offline repository
runtimeOnly("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0") // Enable errorprone Java static analysis
runtimeOnly("org.ajoberstar.grgit:grgit-gradle:4.1.1") // Enable website git publish to asf-site branch
runtimeOnly("org.ajoberstar.grgit:grgit-gradle:5.3.2") // Enable website git publish to asf-site branch
runtimeOnly("com.avast.gradle:gradle-docker-compose-plugin:0.16.12") // Enable docker compose tasks
runtimeOnly("ca.cutterslade.gradle:gradle-dependency-analyze:1.8.3") // Enable dep analysis
runtimeOnly("gradle.plugin.net.ossindex:ossindex-gradle-plugin:0.4.11") // Enable dep vulnerability analysis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1495,11 +1495,6 @@ class BeamModulePlugin implements Plugin<Project> {
project.dependencies {
errorprone("com.google.errorprone:error_prone_core:$errorprone_version")
errorprone("jp.skypencil.errorprone.slf4j:errorprone-slf4j:0.1.2")
// At least JDk 9 compiler is required, however JDK 8 still can be used but with additional errorproneJavac
// configuration. For more details please see https://github.com/tbroyer/gradle-errorprone-plugin#jdk-8-support
if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) == 0) {
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
}
}

project.configurations.errorprone { resolutionStrategy.force "com.google.errorprone:error_prone_core:$errorprone_version" }
Expand All @@ -1512,8 +1507,7 @@ class BeamModulePlugin implements Plugin<Project> {
// i.e. Java 9 and up. The flags became mandatory in Java 17 with JEP-403.
// The -J prefix is not needed if forkOptions.javaHome is unset,
// see http://github.com/gradle/gradle/issues/22747
if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
&& options.forkOptions.javaHome == null) {
if (options.forkOptions.javaHome == null) {
options.fork = true
options.forkOptions.jvmArgs += errorProneAddModuleOpts
}
Expand Down Expand Up @@ -1633,7 +1627,7 @@ class BeamModulePlugin implements Plugin<Project> {
//
// TODO: Enforce all relocations are always performed to:
// getJavaRelocatedPath(package_suffix) where package_suffix is something like "com.google.commmon"
project.apply plugin: 'com.github.johnrengelman.shadow'
project.apply plugin: 'com.gradleup.shadow'

// Create a new configuration 'shadowTest' like 'shadow' for the test scope
project.configurations {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class VendorJavaPlugin implements Plugin<Project> {
config.version += '-SNAPSHOT'
}

project.apply plugin: 'com.github.johnrengelman.shadow'
project.apply plugin: 'com.gradleup.shadow'

project.apply plugin: 'java'

Expand Down
2 changes: 1 addition & 1 deletion examples/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

applyJavaNature(
Expand Down
2 changes: 1 addition & 1 deletion examples/java/cdap/hubspot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

applyJavaNature(
Expand Down
2 changes: 1 addition & 1 deletion examples/java/cdap/salesforce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

applyJavaNature(
Expand Down
2 changes: 1 addition & 1 deletion examples/java/cdap/servicenow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

applyJavaNature(
Expand Down
2 changes: 1 addition & 1 deletion examples/java/cdap/zendesk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

applyJavaNature(
Expand Down
2 changes: 1 addition & 1 deletion examples/java/sql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

applyJavaNature(
Expand Down
2 changes: 1 addition & 1 deletion examples/java/twitter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

applyJavaNature(
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/get-started/try-apache-beam-java.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
" id 'application'\n",
"\n",
" // 'shadow' allows us to embed all the dependencies into a fat jar.\n",
" id 'com.github.johnrengelman.shadow' version '4.0.3'\n",
" id 'com.gradleup.shadow' version '8.3.8'\n",
"}\n",
"\n",
"// This is the path of the main class, stored within ./src/main/java/\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ First, build a shaded JAR file that includes:
### Gradle build file
```groovy
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.gradleup.shadow' version '8.3.8'
id 'application'
}

Expand Down
Loading