Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '21'
distribution: 'temurin'

- name: Cache Gradle packages
Expand Down
64 changes: 1 addition & 63 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,69 +215,7 @@ by Joshua Bloch in his book Effective Java -->
-->
</module>
<!--
WHITESPACE CHECKS
Whitespace checks are disabled because they conflict with GoogleJavaFormat.
-->
<!-- FORK: Whitespace enforcement is handled by other tools in google3, but we need this policy
to enforce consistency in GoB. -->
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="2"/>
<property name="throwsIndent" value="4"/>
<property name="lineWrappingIndentation" value="4"/>
<property name="arrayInitIndent" value="2"/>
</module>
<!-- ENDFORK -->
<module name="WhitespaceAround">
<!-- Checks that various tokens are surrounded by whitespace.
This includes most binary operators and keywords followed
by regular or curly braces.
-->
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR,
BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN,
EQUAL, GE, GT, LAND, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION,
SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN"/>
<property name="severity" value="error"/>
<property name="ignoreEnhancedForColon" value="false"/>
</module>
<module name="WhitespaceAfter">
<!-- Checks that commas, semicolons and typecasts are followed by
whitespace.
-->
<property name="tokens" value="COMMA, SEMI, TYPECAST"/>
</module>
<module name="NoWhitespaceAfter">
<!-- Checks that there is no whitespace after various unary operators.
Linebreaks are allowed.
-->
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS,
UNARY_PLUS"/>
<property name="allowLineBreaks" value="true"/>
<property name="severity" value="error"/>
</module>
<module name="NoWhitespaceBefore">
<!-- Checks that there is no whitespace before various unary operators.
Linebreaks are allowed.
-->
<property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/>
<property name="allowLineBreaks" value="true"/>
<property name="severity" value="error"/>
</module>
<module name="ParenPad">
<!-- Checks that there is no whitespace before close parens or after
open parens. Allows whitespace after open parens if it is followed
by the end of a line or by the start of a comment. Allows whitespace
before close parens if it is preceeded by the start of a line or by
the end of a block comment.
-->
<metadata name="altname" value="ParenPad"/>
<!-- FORK: This property isn't supported by the open-source implementation. -->
<!-- <property name="ignoreComments" value="true"/> -->
<!-- ENDFORK -->
<property name="severity" value="warning"/>
</module>
</module>
</module>
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
13 changes: 11 additions & 2 deletions kokoro/gcp_ubuntu/kokoro_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@
# Fail on any error
set -e

sudo update-java-alternatives --set java-1.11.0-openjdk-amd64
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
sudo apt update

# Install OpenJDK 21
sudo apt install -y openjdk-21-jdk

# List available Java alternatives to confirm the name (optional, for debugging)
# sudo update-java-alternatives --list

# Set Java 21 as the default
sudo update-java-alternatives --set java-1.21.0-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64

cd "${KOKORO_ARTIFACTS_DIR}/git/data-lineage-producer-java-library"
./tests.sh
Expand Down
10 changes: 3 additions & 7 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@

plugins {
id 'java-library'
// TODO upgrade this to https://plugins.gradle.org/plugin/com.gradleup.shadow
id 'com.github.johnrengelman.shadow' version '7.1.2'
id("com.gradleup.shadow") version "9.2.1"
id 'com.github.sherter.google-java-format' version '0.9'
id 'checkstyle'
id 'maven-publish'
id 'signing'

// v"2.2.5" is recommended, but it uses Java21 which is incompatible with other
// plugins (e.g. "com.github.johnrengelman.shadow"), therefore, using latest compatible version
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.1.5"
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.5"
}

googleJavaFormat {
Expand Down Expand Up @@ -149,7 +145,7 @@ java {
publishing {
publications {
mavenJava(MavenPublication) {
version = '1.1.0'
version = '1.1.1'
group = 'com.google.cloud.datalineage'
artifactId = 'producerclient'

Expand Down
Loading