Add sourceBundle task to download and prepare source bundles (#1902)

* Add tasks to generate source jars for java executables

* native source bundles

* source bundles in separate plugin

* Wire up sourceBundle task

* Produce bundles on a per-variant basis (Java fat jar, each native variant)
* Introduce `pklNativeSourceBundle` and `pklJvmSourceBundle` plugins for handling fat jar vs. GraalVM bits
* Download compiled classes list, and exclude Java sources for executable stuff specifically
* Include native sources when appropriate (GraalVM, JDK, zlib, musl, libpkl)

---------

Co-authored-by: Jen Basch <jbasch@apple.com>
This commit is contained in:
Daniel ChaoandJen Basch authored and GitHub committed 2026-10-14 10:03:45 -07:00
1 parent f4ad0da658
commit d062312df9
17 files changed
+777 -23

No files matched your search

+9
View File
@@ -65,6 +65,15 @@ dependencies {
testImplementation(projects.pklCommonsTest)
testImplementation(libs.wiremock)
// used by `pklJavaExecutable` plugin (ideally this would be inferred automatically)
firstPartySourcesJars(project(":pkl-cli", "sourcesJar"))
firstPartySourcesJars(project(":pkl-commons", "sourcesJar"))
firstPartySourcesJars(project(":pkl-commons-cli", "sourcesJar"))
firstPartySourcesJars(project(":pkl-core", "sourcesJar"))
firstPartySourcesJars(project(":pkl-formatter", "sourcesJar"))
firstPartySourcesJars(project(":pkl-parser", "sourcesJar"))
firstPartySourcesJars(project(":pkl-server", "sourcesJar"))
}
tasks.jar {