1
0
mirror of synced 2025-12-19 18:14:56 -05:00

upgrade to Gradle 7.2 (#7070)

* upgrade to gradle 7.2

* get build working with gradle 7.2

* fix build

* fix connector build?

* EXCLUDE distTar and switch includes to excludes

* switch back to includes

* temporarily try to adjust properties

* don't know why this was modified

* revert spotless upgrade

* upgrade gradle node (better arm support it says)

* add back in Xss since we are getting StackOverflowError without it

* revert bad spotless fmt

* fix acceptance tests duplicates strategy

* add zip for jdbc includes

* check if this helps for java connectors

* remove accidental commit

* remove redundant

* fix warning explosion

* oops

* override gradle.properties

* remove set-env
This commit is contained in:
Jared Rhizor
2021-10-15 14:03:30 -07:00
committed by GitHub
parent c129e02ffa
commit 1b5922896b
16 changed files with 77 additions and 30 deletions

View File

@@ -97,6 +97,15 @@ jobs:
- name: Install Pyenv
run: python3 -m pip install virtualenv==16.7.9 --user
- name: Set up CI Gradle Properties
run: |
mkdir -p ~/.gradle/
cat > ~/.gradle/gradle.properties <<EOF
org.gradle.jvmargs=-Xmx8g -Xss4m
org.gradle.workers.max=8
org.gradle.vfs.watch=false
EOF
- name: Generate Template scaffold
run: ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates --scan
@@ -231,6 +240,15 @@ jobs:
- name: Install Pyenv
run: python3 -m pip install virtualenv==16.7.9 --user
- name: Set up CI Gradle Properties
run: |
mkdir -p ~/.gradle/
cat > ~/.gradle/gradle.properties <<EOF
org.gradle.jvmargs=-Xmx8g -Xss4m
org.gradle.workers.max=8
org.gradle.vfs.watch=false
EOF
- name: Format
run: SUB_BUILD=PLATFORM ./gradlew format --scan --info --stacktrace
@@ -355,6 +373,15 @@ jobs:
- name: Install Cypress Test Dependencies
run: sudo apt-get update && sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- name: Set up CI Gradle Properties
run: |
mkdir -p ~/.gradle/
cat > ~/.gradle/gradle.properties <<EOF
org.gradle.jvmargs=-Xmx8g -Xss4m
org.gradle.workers.max=8
org.gradle.vfs.watch=false
EOF
- name: Build Platform Docker Images
run: SUB_BUILD=PLATFORM ./gradlew --no-daemon composebuild --scan
@@ -441,6 +468,15 @@ jobs:
run: |
mkdir -p /home/runner
- name: Set up CI Gradle Properties
run: |
mkdir -p ~/.gradle/
cat > ~/.gradle/gradle.properties <<EOF
org.gradle.jvmargs=-Xmx8g -Xss4m
org.gradle.workers.max=8
org.gradle.vfs.watch=false
EOF
- name: Install socat (required for port forwarding)
run: |
sudo apt-get update

View File

@@ -24,7 +24,7 @@ dependencies {
annotationProcessor('org.projectlombok:lombok:1.18.20')
// MongoDB
compile 'org.mongodb:mongodb-driver-sync:4.3.0'
implementation 'org.mongodb:mongodb-driver-sync:4.3.0'
}
task(newConfigsMigration, dependsOn: 'classes', type: JavaExec) {

View File

@@ -15,7 +15,7 @@ dependencies {
implementation project(':airbyte-integrations:bases:base-java')
implementation 'org.apache.kafka:kafka-clients:2.8.0'
compile 'com.joestelmach:natty:0.11'
implementation 'com.joestelmach:natty:0.11'
integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-destination-test')
integrationTestJavaImplementation project(':airbyte-integrations:connectors:destination-keen')

View File

@@ -16,7 +16,7 @@ dependencies {
implementation project(':airbyte-integrations:bases:base-java')
implementation project(':airbyte-protocol:models')
compile 'org.mongodb:mongodb-driver-sync:4.3.0'
implementation 'org.mongodb:mongodb-driver-sync:4.3.0'
testImplementation 'org.testcontainers:mongodb:1.15.3'

View File

@@ -16,7 +16,7 @@ dependencies {
implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
implementation project(':airbyte-integrations:connectors:source-relational-db')
compile 'org.mongodb:mongodb-driver-sync:4.3.0'
implementation 'org.mongodb:mongodb-driver-sync:4.3.0'
testImplementation 'org.testcontainers:mongodb:1.15.3'

View File

@@ -12,6 +12,6 @@ dependencies {
// todo (cgardens) - remove this dep. just needs temporal client.
implementation project(':airbyte-workers')
compile 'com.google.cloud:google-cloud-storage:2.0.1'
implementation 'com.google.cloud:google-cloud-storage:2.0.1'
}

View File

@@ -95,3 +95,7 @@ task automaticMigrationAcceptanceTest(type: Test) {
}
mustRunAfter test
}
tasks.withType(Copy) {
duplicatesStrategy DuplicatesStrategy.INCLUDE
}

View File

@@ -1,6 +1,6 @@
plugins {
id "base"
id "com.github.node-gradle.node" version "2.2.4"
id "com.github.node-gradle.node" version "3.1.1"
}
node {
@@ -33,6 +33,7 @@ build.finalizedBy test
task copyDocs(type: Copy) {
from "${System.getProperty("user.dir")}/docs/integrations/getting-started"
into "${buildDir}/docs/getting-started/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
}
copyDocs.dependsOn npm_run_build

View File

@@ -2,7 +2,7 @@ plugins {
id 'base'
id 'pmd'
id 'com.diffplug.spotless' version '5.7.0'
id 'com.github.hierynomus.license' version '0.15.0'
id 'com.github.hierynomus.license' version '0.16.1'
}
repositories {
@@ -168,7 +168,7 @@ subprojects {
pmd {
consoleOutput = true
rulePriority = 5
rulesMinimumPriority = 5
ruleSets = []
ruleSetFiles = files(rootProject.file('tools/gradle/pmd/rules.xml'))
}
@@ -237,6 +237,14 @@ subprojects {
testImplementation 'org.mockito:mockito-junit-jupiter:3.9.0'
testImplementation 'org.assertj:assertj-core:3.21.0'
}
tasks.withType(Tar) {
duplicatesStrategy DuplicatesStrategy.INCLUDE
}
tasks.withType(Zip) {
duplicatesStrategy DuplicatesStrategy.INCLUDE
}
}
task composeBuild {

View File

@@ -9,3 +9,7 @@ repositories {
dependencies {
implementation 'ru.vyarus:gradle-use-python-plugin:2.3.0'
}
tasks.withType(Jar) {
duplicatesStrategy DuplicatesStrategy.INCLUDE
}

View File

@@ -4,8 +4,12 @@ import org.gradle.api.Project
import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
import org.slf4j.Logger
@@ -15,16 +19,18 @@ import java.nio.file.Paths
@CacheableTask
abstract class AirbyteDockerTask extends DefaultTask {
@Input
@Internal
abstract File rootDir
@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
abstract FileCollection projectFiles
@Input
abstract Set<String> baseImageHashes
@Input
@InputDirectory
@PathSensitive(PathSensitivity.RELATIVE)
abstract File projectDir
@Input

View File

@@ -1,3 +1,6 @@
# NOTE: some of these values are overwritten in CI!
# NOTE: if you want to override this for your local machine, set overrides in ~/.gradle/gradle.properties
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4g -Xss4m
org.gradle.caching=true

Binary file not shown.

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

2
gradlew vendored
View File

@@ -130,7 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath

21
gradlew.bat vendored
View File

@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,21 +64,6 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
@@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell