@Nullable String testOutputPath,
JpsSdk<T> sdk,
M moduleType) {
JpsModule module = myProject.addModule(moduleName, moduleType);
JpsSdkType<T> sdkType = sdk.getSdkType();
JpsSdkReferencesTable sdkTable = module.getSdkReferencesTable();
sdkTable.setSdkReference(sdkType, sdk.createReference());
if (sdkType instanceof JpsJavaSdkTypeWrapper) {
JpsSdkReference<T> wrapperRef = sdk.createReference();
sdkTable.setSdkReference(JpsJavaSdkType.INSTANCE, JpsJavaExtensionService.
getInstance().createWrappedJavaSdkReference((JpsJavaSdkTypeWrapper)sdkType, wrapperRef));
}
module.getDependenciesList().addSdkDependency(sdkType);
if (srcPaths.length > 0 || outputPath != null) {
for (String srcPath : srcPaths) {