From 94145e409d96f3156afae7cd057d96f5e2635d01 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 15 May 2026 17:46:49 +0000
Subject: [PATCH 1/4] Initial plan
From 1f1a241c13952c04079f4a10e50642514a9853da Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 15 May 2026 17:55:32 +0000
Subject: [PATCH 2/4] Add Java module descriptor
Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
---
config/checkstyle/checkstyle.xml | 4 +--
src/main/java/module-info.java | 22 +++++++++++++++
.../copilot/sdk/ModuleDescriptorTest.java | 28 +++++++++++++++++++
3 files changed, 52 insertions(+), 2 deletions(-)
create mode 100644 src/main/java/module-info.java
create mode 100644 src/test/java/com/github/copilot/sdk/ModuleDescriptorTest.java
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index 9a6f3761b5..fcde1f6c97 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -11,9 +11,9 @@
-
+
-
+
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
new file mode 100644
index 0000000000..b5c6c87ace
--- /dev/null
+++ b/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+/**
+ * GitHub Copilot SDK for Java.
+ */
+module com.github.copilot.sdk.java {
+ requires transitive com.fasterxml.jackson.annotation;
+ requires com.fasterxml.jackson.core;
+ requires transitive com.fasterxml.jackson.databind;
+ requires com.fasterxml.jackson.datatype.jsr310;
+ requires static com.github.spotbugs.annotations;
+ requires static java.compiler;
+ requires static java.net.http;
+ requires java.logging;
+
+ exports com.github.copilot.sdk;
+ exports com.github.copilot.sdk.generated;
+ exports com.github.copilot.sdk.generated.rpc;
+ exports com.github.copilot.sdk.json;
+}
diff --git a/src/test/java/com/github/copilot/sdk/ModuleDescriptorTest.java b/src/test/java/com/github/copilot/sdk/ModuleDescriptorTest.java
new file mode 100644
index 0000000000..36be137345
--- /dev/null
+++ b/src/test/java/com/github/copilot/sdk/ModuleDescriptorTest.java
@@ -0,0 +1,28 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+package com.github.copilot.sdk;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.lang.module.ModuleDescriptor;
+import org.junit.jupiter.api.Test;
+
+class ModuleDescriptorTest {
+
+ @Test
+ void sdkHasExplicitModuleDescriptor() {
+ Module module = CopilotClient.class.getModule();
+ assertTrue(module.isNamed());
+ assertEquals("com.github.copilot.sdk.java", module.getName());
+
+ ModuleDescriptor descriptor = module.getDescriptor();
+ assertTrue(descriptor.exports().stream().anyMatch(export -> export.source().equals("com.github.copilot.sdk")));
+ assertTrue(descriptor.exports().stream()
+ .anyMatch(export -> export.source().equals("com.github.copilot.sdk.json")));
+ assertTrue(descriptor.requires().stream()
+ .anyMatch(require -> require.name().equals("com.fasterxml.jackson.databind")));
+ }
+}
From 3cb91793aebf743f74ea69f5c110e4845f3566b9 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 15 May 2026 21:00:09 +0000
Subject: [PATCH 3/4] Remove redundant Automatic-Module-Name manifest entry
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
---
pom.xml | 7 -------
1 file changed, 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index 4e3273cf41..ac258afdb9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -172,13 +172,6 @@
org.apache.maven.plugins
maven-jar-plugin
3.5.0
-
-
-
- com.github.copilot.sdk.java
-
-
-
From d2ea79ac6524ff51db2d880688a069629de9bba3 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 15 May 2026 22:06:39 +0000
Subject: [PATCH 4/4] Open SDK packages for Jackson reflection in JPMS
descriptor
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
---
src/main/java/module-info.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
index b5c6c87ace..d912fb420f 100644
--- a/src/main/java/module-info.java
+++ b/src/main/java/module-info.java
@@ -19,4 +19,8 @@
exports com.github.copilot.sdk.generated;
exports com.github.copilot.sdk.generated.rpc;
exports com.github.copilot.sdk.json;
+
+ opens com.github.copilot.sdk to com.fasterxml.jackson.databind;
+ opens com.github.copilot.sdk.generated to com.fasterxml.jackson.databind;
+ opens com.github.copilot.sdk.json to com.fasterxml.jackson.databind;
}