diff --git a/.github/workflows/java_sdk_logging.yaml b/.github/workflows/java_sdk_logging.yaml new file mode 100644 index 0000000000..c363513a81 --- /dev/null +++ b/.github/workflows/java_sdk_logging.yaml @@ -0,0 +1,55 @@ +# Copyright 2025 Google LLC +# +# 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. +on: + push: + branches: + - main + pull_request: + paths: + - java-sdk-logging/** + +name: java-sdk-logging-ci +jobs: + unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: 8 + distribution: temurin + - name: Install parent module + run: | + mvn install -B -ntp -pl gapic-generator-java-pom-parent + - name: Unit Tests + working-directory: java-sdk-logging + run: | + mvn test -B -ntp -Dcheckstyle.skip -Dfmt.skip + module-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: temurin + - name: Install parent module + run: | + mvn install -B -ntp -pl gapic-generator-java-pom-parent + - name: Java Linter + run: | + mvn -B -ntp fmt:check + working-directory: java-sdk-logging diff --git a/gapic-generator-java-pom-parent/pom.xml b/gapic-generator-java-pom-parent/pom.xml index a6f226bc79..6897f27afc 100644 --- a/gapic-generator-java-pom-parent/pom.xml +++ b/gapic-generator-java-pom-parent/pom.xml @@ -38,6 +38,7 @@ 3.0.0 1.7.0 5.11.4 + 4.11.0 2.0.16 diff --git a/gax-java/pom.xml b/gax-java/pom.xml index f72d3b72a8..eff5ffbc6f 100644 --- a/gax-java/pom.xml +++ b/gax-java/pom.xml @@ -163,7 +163,7 @@ org.mockito mockito-bom - 4.11.0 + ${mockito.version} pom import diff --git a/java-sdk-logging/java.header b/java-sdk-logging/java.header new file mode 100644 index 0000000000..0ae9545dbb --- /dev/null +++ b/java-sdk-logging/java.header @@ -0,0 +1,29 @@ +^/\*$ +^ \* Copyright 20\d\d Google LLC$ +^ \*$ +^ \* Redistribution and use in source and binary forms, with or without$ +^ \* modification, are permitted provided that the following conditions are$ +^ \* met:$ +^ \*$ +^ \* \* Redistributions of source code must retain the above copyright$ +^ \* notice, this list of conditions and the following disclaimer.$ +^ \* \* Redistributions in binary form must reproduce the above$ +^ \* copyright notice, this list of conditions and the following disclaimer$ +^ \* in the documentation and/or other materials provided with the$ +^ \* distribution.$ +^ \* \* Neither the name of Google LLC nor the names of its$ +^ \* contributors may be used to endorse or promote products derived from$ +^ \* this software without specific prior written permission.$ +^ \*$ +^ \* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS$ +^ \* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT$ +^ \* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR$ +^ \* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT$ +^ \* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,$ +^ \* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \(INCLUDING, BUT NOT$ +^ \* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,$ +^ \* DATA, OR PROFITS; OR BUSINESS INTERRUPTION\) HOWEVER CAUSED AND ON ANY$ +^ \* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT$ +^ \* \(INCLUDING NEGLIGENCE OR OTHERWISE\) ARISING IN ANY WAY OUT OF THE USE$ +^ \* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.$ +^ \*/$ \ No newline at end of file diff --git a/java-sdk-logging/license-checks.xml b/java-sdk-logging/license-checks.xml new file mode 100644 index 0000000000..1e4f8692f1 --- /dev/null +++ b/java-sdk-logging/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/java-sdk-logging/log4j2-extension/pom.xml b/java-sdk-logging/log4j2-extension/pom.xml new file mode 100644 index 0000000000..8bb288adab --- /dev/null +++ b/java-sdk-logging/log4j2-extension/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + com.google.api + java-sdk-logging-parent + 0.1.0-SNAPSHOT + ../pom.xml + + log4j2-extension + + + UTF-8 + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.mockito + mockito-core + test + + + \ No newline at end of file diff --git a/java-sdk-logging/logback-extension/pom.xml b/java-sdk-logging/logback-extension/pom.xml new file mode 100644 index 0000000000..86c9d7ca21 --- /dev/null +++ b/java-sdk-logging/logback-extension/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + com.google.api + java-sdk-logging-parent + 0.1.0-SNAPSHOT + ../pom.xml + + logback-extension + + + UTF-8 + 1.2.13 + 7.3 + + + + + ch.qos.logback + logback-classic + ${logback.version} + + + net.logstash.logback + logstash-logback-encoder + ${logstash.encoder.version} + + + org.junit.jupiter + junit-jupiter-api + test + + + org.mockito + mockito-core + test + + + \ No newline at end of file diff --git a/java-sdk-logging/pom.xml b/java-sdk-logging/pom.xml new file mode 100644 index 0000000000..a1e46287a8 --- /dev/null +++ b/java-sdk-logging/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + java-sdk-logging-parent + 0.1.0-SNAPSHOT + pom + + com.google.api + gapic-generator-java-pom-parent + 2.55.2-SNAPSHOT + ../gapic-generator-java-pom-parent + + + log4j2-extension + logback-extension + + + + + + org.junit + junit-bom + ${junit.version} + import + pom + + + org.mockito + mockito-bom + ${mockito.version} + import + pom + + + + \ No newline at end of file