Skip to content

Move data classes to separate deployed library#247

Merged
warting merged 6 commits into
mainfrom
copilot/fix-188
Mar 23, 2026
Merged

Move data classes to separate deployed library#247
warting merged 6 commits into
mainfrom
copilot/fix-188

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2025

This PR moves the data classes SpdxLicenses, Scm, UnknownLicenses, and Artifact to a separate deployed library so that they can be used by other modules.

Changes

  1. Core Module Setup:

    • Added maven-publish plugin to core/build.gradle.kts
    • Added publishing configuration to expose the core module as a library
    • Core data classes are now properly published with group ID se.premex.gross
  2. Dependencies:

    • Added dependency from gross-plugin to the core module: implementation("se.premex.gross:core:1.0")
    • This ensures the plugin uses the shared data classes from the core module
  3. Code Cleanup:

    • Removed duplicate data classes from gross-plugin/src/main/kotlin/se/premex/gross/core/Artifact.kt
    • Updated test cases to work correctly with the core module data classes
  4. Documentation:

    • Updated README.md with information about the core library
    • Added usage instructions for consuming the core library data classes

Now other modules can access these data classes by adding a dependency to the core module:

dependencies {
    implementation("se.premex.gross:core:1.0")
}

Fixes #188.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.fwupd.org
    • Triggering command: /usr/bin/fwupdmgr refresh (dns block)
  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/gradle-daemon-main-8.13.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/agents/gradle-instrumentation-agent-8.13.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.13 (dns block)
  • plugins-artifacts.gradle.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/gradle-daemon-main-8.13.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/agents/gradle-instrumentation-agent-8.13.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.13 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Move data classes to separate deployed library Move data classes to separate deployed library May 21, 2025
Copilot AI requested a review from warting May 21, 2025 06:46
Copilot AI and others added 5 commits March 23, 2026 18:49
Co-authored-by: warting <657973+warting@users.noreply.github.com>
Co-authored-by: warting <657973+warting@users.noreply.github.com>
Co-authored-by: warting <657973+warting@users.noreply.github.com>
The gross-plugin is a composite build (includeBuild) that cannot directly
access root subprojects. This fixes the build by:

- Adding core/settings.gradle.kts for standalone builds (publishToMavenLocal)
- Adding mavenLocal() to gross-plugin and test fixture repositories
- Publishing core to mavenLocal in CI before builds that need it
- Removing duplicate LicenseParser.kt from gross-plugin
- Fixing smart cast errors in ArtifactCodeGenerator (cross-module nullable access)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Even targeted tasks like :core:check and :ui:check trigger full root
build configuration, which includes gross-plugin classpath resolution
requiring se.premex.gross:core:1.0 from mavenLocal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@warting warting marked this pull request as ready for review March 23, 2026 19:00
@warting warting merged commit 8f7e3c2 into main Mar 23, 2026
6 of 7 checks passed
@warting warting deleted the copilot/fix-188 branch March 23, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move data classes to separate deployed library

2 participants