Skip to content

Commit b7241e1

Browse files
meltsufindishaprakash
authored andcommitted
build: modernize SDK build and fix example project structure (#21)
- Updated SDK to Java 17 using the compiler release flag to support Java records. - Added license-checks.xml and java.header to resolve Checkstyle failures. - Bypassed animal-sniffer-maven-plugin which was enforcing Java 8 compatibility. - Fixed malformed example/pom.xml by moving the XML declaration to the first line. - Reorganized example project into the standard Maven directory structure (src/main/java). - Updated example/pom.xml to use Java 17 and :released version update tag. - Added GitHub Action workflow to automatically verify project compilation. - Updated .gitignore to exclude Maven target directories.
1 parent 7f8dac6 commit b7241e1

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@ crash.*.log
5050
*.tfvars.json
5151

5252
# Language Specific
53+
<<<<<<< HEAD
5354
target/
55+
=======
56+
/target
57+
>>>>>>> 77cfd69 (build: modernize SDK build and fix example project structure (#21))
5458

example/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040
<dependency>
4141
<groupId>com.google.cloud.mcp</groupId>
4242
<artifactId>mcp-toolbox-sdk-java</artifactId>
43+
<<<<<<< HEAD
4344
<version>0.1.0</version><!-- {x-version-update:mcp-toolbox-sdk-java:released} -->
45+
=======
46+
<version>0.0.1</version><!-- {x-version-update:mcp-toolbox-sdk-java:released} -->
47+
>>>>>>> 77cfd69 (build: modernize SDK build and fix example project structure (#21))
4448
</dependency>
4549

4650
<dependency>

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
<description>Java client library for the Model Context Protocol (MCP) Toolbox.</description>
3232

3333
<properties>
34+
<<<<<<< HEAD
3435
<maven.compiler.release>17</maven.compiler.release>
36+
=======
37+
>>>>>>> 77cfd69 (build: modernize SDK build and fix example project structure (#21))
3538
<jackson.version>2.15.2</jackson.version>
3639
<google.auth.version>1.23.0</google.auth.version>
3740
<animal.sniffer.skip>true</animal.sniffer.skip>
@@ -70,6 +73,13 @@
7073

7174
<build>
7275
<plugins>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-compiler-plugin</artifactId>
79+
<configuration>
80+
<release>17</release>
81+
</configuration>
82+
</plugin>
7383
<plugin>
7484
<groupId>com.spotify.fmt</groupId>
7585
<artifactId>fmt-maven-plugin</artifactId>

0 commit comments

Comments
 (0)