Skip to content

Integrate creedengo-rules-specifications as Maven dependency #115

Description

@jduigoudev

Category: Infrastructure
Effort: M
Description: Align creedengo-android with creedengo-ios by consuming rule metadata (JSON + HTML descriptions) from the shared creedengo-rules-specifications artifact instead of maintaining them locally. This is how iOS does it (Maven dependency with classifier per language).

Sub-tasks:

  • Add creedengo-rules-specifications.version property to the parent pom.xml
  • Add Maven dependency in android-plugin/pom.xml:
    <dependency>
        <groupId>org.green-code-initiative</groupId>
        <artifactId>creedengo-rules-specifications</artifactId>
        <version>${creedengo-rules-specifications.version}</version>
        <classifier>java</classifier>
    </dependency>
  • Add a second dependency with <classifier>xml</classifier> for XML rules
  • Refactor JavaRulesDefinition.java and XmlRulesDefinition.java to load rule metadata from the specifications JAR (classpath resources)
  • Remove locally duplicated rule metadata files (JSON/HTML) that are now provided by the dependency
  • Verify all rules still load correctly in SonarQube after refactor
  • Ensure existing rules (GCI500–GCI549) map correctly between the specs repo and the plugin
  • Update CI build to resolve the creedengo-rules-specifications artifact

Acceptance criteria:

  • Rule metadata comes from creedengo-rules-specifications dependency (no local duplicates)
  • All 35 Java rules + 10 XML rules still display correct names/descriptions in SonarQube
  • Adding a new rule requires adding its spec in creedengo-rules-specifications first
  • Build passes locally and in CI

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚀 enhancementNew feature or requestandroidSomething tied to the android OS🏆 challenge 🏆Work done during the ecoCode Challenge

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions