Skip to content

Commit ce5998f

Browse files
authored
chore: create logging module structure (#3706)
In this PR: - Setup logging module structure.
1 parent a43dc50 commit ce5998f

File tree

8 files changed

+206
-1
lines changed

8 files changed

+206
-1
lines changed
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
21+
paths:
22+
- java-sdk-logging/**
23+
24+
name: java-sdk-logging-ci
25+
jobs:
26+
unit-test:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-java@v4
31+
with:
32+
java-version: 8
33+
distribution: temurin
34+
- name: Install parent module
35+
run: |
36+
mvn install -B -ntp -pl gapic-generator-java-pom-parent
37+
- name: Unit Tests
38+
working-directory: java-sdk-logging
39+
run: |
40+
mvn test -B -ntp -Dcheckstyle.skip -Dfmt.skip
41+
module-lint:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: actions/setup-java@v4
46+
with:
47+
java-version: 11
48+
distribution: temurin
49+
- name: Install parent module
50+
run: |
51+
mvn install -B -ntp -pl gapic-generator-java-pom-parent
52+
- name: Java Linter
53+
run: |
54+
mvn -B -ntp fmt:check
55+
working-directory: java-sdk-logging

gapic-generator-java-pom-parent/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<j2objc-annotations.version>3.0.0</j2objc-annotations.version>
3939
<threetenbp.version>1.7.0</threetenbp.version>
4040
<junit.version>5.11.4</junit.version>
41+
<mockito.version>4.11.0</mockito.version>
4142
<slf4j.version>2.0.16</slf4j.version>
4243
</properties>
4344

gax-java/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
<dependency>
164164
<groupId>org.mockito</groupId>
165165
<artifactId>mockito-bom</artifactId>
166-
<version>4.11.0</version>
166+
<version>${mockito.version}</version>
167167
<type>pom</type>
168168
<scope>import</scope>
169169
</dependency>

java-sdk-logging/java.header

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
^/\*$
2+
^ \* Copyright 20\d\d Google LLC$
3+
^ \*$
4+
^ \* Redistribution and use in source and binary forms, with or without$
5+
^ \* modification, are permitted provided that the following conditions are$
6+
^ \* met:$
7+
^ \*$
8+
^ \* \* Redistributions of source code must retain the above copyright$
9+
^ \* notice, this list of conditions and the following disclaimer.$
10+
^ \* \* Redistributions in binary form must reproduce the above$
11+
^ \* copyright notice, this list of conditions and the following disclaimer$
12+
^ \* in the documentation and/or other materials provided with the$
13+
^ \* distribution.$
14+
^ \* \* Neither the name of Google LLC nor the names of its$
15+
^ \* contributors may be used to endorse or promote products derived from$
16+
^ \* this software without specific prior written permission.$
17+
^ \*$
18+
^ \* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS$
19+
^ \* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT$
20+
^ \* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR$
21+
^ \* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT$
22+
^ \* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,$
23+
^ \* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \(INCLUDING, BUT NOT$
24+
^ \* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,$
25+
^ \* DATA, OR PROFITS; OR BUSINESS INTERRUPTION\) HOWEVER CAUSED AND ON ANY$
26+
^ \* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT$
27+
^ \* \(INCLUDING NEGLIGENCE OR OTHERWISE\) ARISING IN ANY WAY OUT OF THE USE$
28+
^ \* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.$
29+
^ \*/$

java-sdk-logging/license-checks.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5+
<module name="Checker">
6+
<module name="RegexpHeader">
7+
<property name="fileExtensions" value="java"/>
8+
<property name="headerFile" value="./java-sdk-logging/java.header"/>
9+
</module>
10+
</module>
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>com.google.api</groupId>
8+
<artifactId>java-sdk-logging-parent</artifactId>
9+
<version>0.1.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
11+
</parent>
12+
<artifactId>log4j2-extension</artifactId>
13+
14+
<properties>
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
</properties>
17+
18+
<dependencies>
19+
<dependency>
20+
<groupId>org.junit.jupiter</groupId>
21+
<artifactId>junit-jupiter-api</artifactId>
22+
<scope>test</scope>
23+
</dependency>
24+
<dependency>
25+
<groupId>org.mockito</groupId>
26+
<artifactId>mockito-core</artifactId>
27+
<scope>test</scope>
28+
</dependency>
29+
</dependencies>
30+
</project>
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>com.google.api</groupId>
8+
<artifactId>java-sdk-logging-parent</artifactId>
9+
<version>0.1.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
11+
</parent>
12+
<artifactId>logback-extension</artifactId>
13+
14+
<properties>
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
<logback.version>1.2.13</logback.version>
17+
<logstash.encoder.version>7.3</logstash.encoder.version>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>ch.qos.logback</groupId>
23+
<artifactId>logback-classic</artifactId>
24+
<version>${logback.version}</version>
25+
</dependency>
26+
<dependency>
27+
<groupId>net.logstash.logback</groupId>
28+
<artifactId>logstash-logback-encoder</artifactId>
29+
<version>${logstash.encoder.version}</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.junit.jupiter</groupId>
33+
<artifactId>junit-jupiter-api</artifactId>
34+
<scope>test</scope>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.mockito</groupId>
38+
<artifactId>mockito-core</artifactId>
39+
<scope>test</scope>
40+
</dependency>
41+
</dependencies>
42+
</project>

java-sdk-logging/pom.xml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<artifactId>java-sdk-logging-parent</artifactId>
7+
<version>0.1.0-SNAPSHOT</version>
8+
<packaging>pom</packaging>
9+
<parent>
10+
<groupId>com.google.api</groupId>
11+
<artifactId>gapic-generator-java-pom-parent</artifactId>
12+
<version>2.55.2-SNAPSHOT</version><!-- {x-version-update:gapic-generator-java:current} -->
13+
<relativePath>../gapic-generator-java-pom-parent</relativePath>
14+
</parent>
15+
<modules>
16+
<module>log4j2-extension</module>
17+
<module>logback-extension</module>
18+
</modules>
19+
20+
<dependencyManagement>
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.junit</groupId>
24+
<artifactId>junit-bom</artifactId>
25+
<version>${junit.version}</version>
26+
<scope>import</scope>
27+
<type>pom</type>
28+
</dependency>
29+
<dependency>
30+
<groupId>org.mockito</groupId>
31+
<artifactId>mockito-bom</artifactId>
32+
<version>${mockito.version}</version>
33+
<scope>import</scope>
34+
<type>pom</type>
35+
</dependency>
36+
</dependencies>
37+
</dependencyManagement>
38+
</project>

0 commit comments

Comments
 (0)