Gradle: build.gradle / build.gradle.kts — group = '...' */
| 583 | |
| 584 | /* Gradle: build.gradle / build.gradle.kts — group = '...' */ |
| 585 | static void parse_build_gradle(const char *source, int source_len, const char *rel_path, |
| 586 | cbm_pkg_entries_t *entries) { |
| 587 | const char *end = source + source_len; |
| 588 | /* Look for group = '...' or group '...' or group = "..." */ |
| 589 | const char *val = find_line_value(source, source_len, "group"); |
| 590 | if (!val) { |
| 591 | return; |
| 592 | } |
| 593 | char *group = extract_quoted(val, end); |
| 594 | if (!group) { |
| 595 | return; |
| 596 | } |
| 597 | char *dir = path_dirname(rel_path); |
| 598 | /* Check for src/main/java or src/main/kotlin */ |
| 599 | char entry[PKGMAP_PATH_BUF]; |
| 600 | snprintf(entry, sizeof(entry), "%s%ssrc/main/java", dir[0] ? dir : "", dir[0] ? "/" : ""); |
| 601 | pkg_entries_push(entries, group, strdup(entry)); |
| 602 | free(dir); |
| 603 | } |
| 604 | |
| 605 | /* Elixir: mix.exs — app: :name */ |
| 606 | static void parse_mix_exs(const char *source, int source_len, const char *rel_path, |
no test coverage detected