diff --git a/Justfile b/Justfile index 2522911e09..562d618cea 100644 --- a/Justfile +++ b/Justfile @@ -4,7 +4,7 @@ dev: install-jars # Install all JARs to local Maven repository and local build directory install-jars: - bit 'build/**/*.jar' + bit 'kotlin-runtime/**/*.jar' # Deploy the Go time module deploy-time: diff --git a/buildengine/deps.go b/buildengine/deps.go index 9e5dcd0137..aee06c4f1d 100644 --- a/buildengine/deps.go +++ b/buildengine/deps.go @@ -99,7 +99,7 @@ func extractKotlinFTLImports(self, dir string) ([]string, error) { dependencies := map[string]bool{} kotlinImportRegex := regexp.MustCompile(`^import ftl\.([A-Za-z0-9_.]+)`) - err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { + err := filepath.WalkDir(filepath.Join(dir, "src/main/kotlin"), func(path string, d fs.DirEntry, err error) error { if err != nil { return err } @@ -127,7 +127,7 @@ func extractKotlinFTLImports(self, dir string) ([]string, error) { }) if err != nil { - return nil, fmt.Errorf("%s: failed to extract dependencies from Go module: %w", self, err) + return nil, fmt.Errorf("%s: failed to extract dependencies from Kotlin module: %w", self, err) } modules := maps.Keys(dependencies) sort.Strings(modules) diff --git a/buildengine/testdata/modules/alphakotlin/Alpha.kt b/buildengine/testdata/modules/alphakotlin/src/main/kotlin/ftl/alpha/Alpha.kt similarity index 95% rename from buildengine/testdata/modules/alphakotlin/Alpha.kt rename to buildengine/testdata/modules/alphakotlin/src/main/kotlin/ftl/alpha/Alpha.kt index f3d80703ee..722a78f183 100644 --- a/buildengine/testdata/modules/alphakotlin/Alpha.kt +++ b/buildengine/testdata/modules/alphakotlin/src/main/kotlin/ftl/alpha/Alpha.kt @@ -1,4 +1,4 @@ -package ftl.echo +package ftl.alpha import ftl.builtin.Empty import ftl.other.Other