OpenSearch Plugin Compilation Error After Adding Dependency

Good day all,

I am trying to create a plugin but I am getting compilation error when adding a dependency. It specifically happens when adding the ‘org.tribuo:tribuo-all:4.1.0’ dependency. It also works fine when I remove opensearchplugin and keeps ‘org.tribuo:tribuo-all:4.1.0’ .

I highly appreciate your help.

I only have the class below:
package my.plugin;

import org.tribuo.classification.Label;

public class Test2 {

}

build.gradle
apply plugin: ‘java’
apply plugin: ‘idea’
apply plugin: ‘opensearch.opensearchplugin’

opensearchplugin {
name ‘my-plugin’
description ‘Custom OpenSearch plugin’
classname ‘my.plugin.Test2’
licenseFile rootProject.file(‘LICENSE.txt’)
noticeFile rootProject.file(‘NOTICE.txt’)
}

// disabling some unnecessary validations for this plugin
testingConventions.enabled = false
loggerUsageCheck.enabled = false
validateNebulaPom.enabled = false

forbiddenApisMain.enabled = false
licenseHeaders.enabled = false

dependencyLicenses.enabled = false
thirdPartyAudit.enabled = false

buildscript {
ext {
opensearch_version = System.getProperty(“opensearch.version”, “1.2.2”)
opensearch_group = “org.opensearch”
}
repositories {mavenLocal()
mavenCentral()
jcenter()

}

dependencies {
    classpath "org.opensearch.gradle:build-tools:1.2.2"
    classpath 'org.tribuo:tribuo:4.1.0'
}    

}

dependencies {
implementation ‘org.tribuo:tribuo-all:4.1.0’
}

repositories {

mavenCentral()
mavenLocal()
jcenter()

}

The error:

Task :compileJava FAILED
~/src/main/java/my/plugin/Test2.java:3: error: package org.tribuo.classification does not exist
import org.tribuo.classification.Label;