(ctx context.Context, modSource *dagger.ModuleSource)
| 387 | } |
| 388 | |
| 389 | func (m *JavaSdk) setModuleConfig(ctx context.Context, modSource *dagger.ModuleSource) error { |
| 390 | modName, err := modSource.ModuleName(ctx) |
| 391 | if err != nil { |
| 392 | return err |
| 393 | } |
| 394 | subPath, err := modSource.SourceSubpath(ctx) |
| 395 | if err != nil { |
| 396 | return err |
| 397 | } |
| 398 | var dirPath string |
| 399 | if kind, err := modSource.Kind(ctx); err != nil { |
| 400 | return err |
| 401 | } else if kind == dagger.ModuleSourceKindLocal { |
| 402 | dirPath, err = modSource.LocalContextDirectoryPath(ctx) |
| 403 | if err != nil { |
| 404 | return err |
| 405 | } |
| 406 | } |
| 407 | m.moduleConfig = moduleConfig{ |
| 408 | name: modName, |
| 409 | subPath: subPath, |
| 410 | dirPath: dirPath, |
| 411 | } |
| 412 | |
| 413 | return nil |
| 414 | } |
| 415 | |
| 416 | func (m *JavaSdk) getDaggerVersionForModule(ctx context.Context, introspectionJSON *dagger.File) (string, error) { |
| 417 | content, err := introspectionJSON.Contents(ctx) |
no test coverage detected