You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For the k-NN plugin, I wanted to clean up our build.gradle a little bit and pull BWC tests out into a separate subproject. For this, I would like to apply the StandaloneRestTestPlugin or StandaloneTestPlugin as is done for OpenSearch.
However, I am unable to apply the plugin because it adds a project dependency on test-framework, which external plugins do not have access to.
I am wondering if it is possible to modify this so that external plugins can use this gradle plugin? External plugins are able to add dependencies like this:
Describe the solution you'd like
StandaloneRestTestPlugin can be applied to external plugin build scripts.
Describe alternatives you've considered
Currently, in opensearch-project/k-NN#359, I apply the opensearch build plugin and disable several tasks it adds.
The text was updated successfully, but these errors were encountered:
Im wondering if something like this would make sense:
// For internal projects, using the project test framework dependency. Otherwise, use the opensearch test
// framework one
if (project.rootProject.name == "OpenSearch" && project.project(':test:framework') != null) {
project.dependencies.add('testImplementation', project.project(':test:framework'))
EclipseModel eclipse = project.extensions.getByType(EclipseModel)
eclipse.classpath.sourceSets = [testSourceSet]
eclipse.classpath.plusConfigurations = [project.configurations.getByName(JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME)]
IdeaModel idea = project.extensions.getByType(IdeaModel)
idea.module.testSourceDirs += testSourceSet.java.srcDirs
idea.module.scopes.put('TEST', [plus: [project.configurations.getByName(JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME)]] as Map<String, Collection<Configuration>>)
}
jmazanec15@ba391b1 fails because the plugins don't have the Idea/Eclipse Models. In addition, the above snippet removes the auto addition of the dependency so that external projects can configure it to whatever version they want.
This would then require plugins to add their own dependency on test-framework. This seems okay to me, but want to get feedback from team on this.
Is your feature request related to a problem? Please describe.
For the k-NN plugin, I wanted to clean up our build.gradle a little bit and pull BWC tests out into a separate subproject. For this, I would like to apply the StandaloneRestTestPlugin or StandaloneTestPlugin as is done for OpenSearch.
However, I am unable to apply the plugin because it adds a project dependency on test-framework, which external plugins do not have access to.
I am wondering if it is possible to modify this so that external plugins can use this gradle plugin? External plugins are able to add dependencies like this:
Describe the solution you'd like
StandaloneRestTestPlugin can be applied to external plugin build scripts.
Describe alternatives you've considered
Currently, in opensearch-project/k-NN#359, I apply the opensearch build plugin and disable several tasks it adds.
The text was updated successfully, but these errors were encountered: