DEV Community

Query Filter
Query Filter

Posted on

docker128

etsf-project/
├── src/
│   ├── main/java/          <-- Your etsf Java 21 code
│   └── stubs/java/         <-- Put your Validation stubs here
│       └── com/citigroup/valengine/
│           ├── ValidationContext.java
│           └── ValidationResult.java
└── build.gradle

sourceSets {
    stubs {
        java {
            srcDir 'src/stubs/java'
        }
    }
}

dependencies {
    // This makes the stubs available to compile 'main'
    // but DOES NOT put them in the final JAR.
    compileOnly sourceSets.stubs.output


// Safety check: ensure the final JAR task does not include the stubs package
jar {
    eachFile { details ->
        if (details.path.contains('com/citigroup/valengine/')) {
            details.exclude()
        }
    }
}

----------------------
package com.citigroup.valengine;

import com.citigroup.workflow.WorkflowContext;
import java.io.Serializable;

// Keep the interface to match the legacy 'coes-nam' implementation
public class ValidationContext extends WorkflowContext implements Serializable {
    // No logic OR SERIAL NUMBER needed, just the signature for the compiler
}


---------------
package com.citigroup.valengine;

import com.citigroup.workflow.WorkflowResult;
import java.io.Serializable;

public class ValidationResult extends WorkflowResult implements Serializable {
    // No logic OR SERIAL NUMBER needed, just the signature for the compiler
}

Enter fullscreen mode Exit fullscreen mode

Top comments (0)